What is the point of Blenders camera sensor width? Forgive me for my lack of camera knowledge. There's an option for sensor width which zooms the camera in and out. The focal length option seems to do the exact same thing. What is difference and functional purpose of these two similar options? (Note: it's slightly confusing when attempting to match cameras and one is different from the other even when checking to make the focal lengths the same. My confusion prompted this question.)

Cameras in Blender are made to resemble cameras in real world. The size of the sensor is important when you need to match content created with a real camera with your CG, and that happens really often. Obviously, you might have a hard time to match your camera if you don't enter the correct sensor size. You should search for it online for the specific camera model your content is captured with.

You may also be used to real world cameras so it is easier to reach some desired result if you already know what to expect from some settings or parameters because they match real cameras.

If you have a look, you can see that Blender even comes with lot of presets matching real cameras:

Focal length and sensor width (aperture) are highly misunderstood and abused concepts.  The property you are primarily concerned with is actually angle of view or field of view, but Blender does not provide such a camera attribute.  Angle of view is the result of combining focal length with sensor width.  Ordinarily you will want to adjust your angle of view using focal length since that is most intuitive and consistent with how a real world camera is used.  But be aware that focal length means nothing without a known sensor width.  A focal length of 50mm in front of a sensor width of 36mm does not provide the same angle of view as it does in front of a sensor width of 24mm.  First decide on your sensor size and don't touch it.  If you don't know it just accept the default.  The only time you need to care about sensor size is if you are integrating real world images with a CG render.  Find your desired angle of view using the lens focal length, but don't try to make the numbers mean anything.  Just make it look the way you want.   If someone says to you, "I want this to look like it does through a 50mm lens", you have to immediately ask them "what is your sensor size?"  Otherwise tell them to F*ck off, and ask them how much they want to see in the image (angle of view).


Does PNG files size affect video output file size? I’m creating 15 second animations with approx 500 frames (1280x720) at 24FPS resulting in 20Mb file size. Similar videos online are well under 5Mb even under 2Mb. I’m currently video editing using the default blender settings for 720p MPG4 H264 with no audio. I tried various video output settings to reduce file size but there is a noticeable drop in quality.

My initial PNG renders are at blender’s default settings but with 100% compressed RGB (no alpha) with each image about 1.2Mb. Would compressing these images further in blender or using other programs etc reduce the video output of these images? Or is there no correlation between the PNGs and MPG4 file size?

Either way, what are the ideal PNG and video output settings within blender to reduce the final video file size whilst maintaining the same quality? Or should I be compressing the videos further using an external program?

Yes...and no.

First of all, I would 100% recommend that you render at the same resolution that you plan to make your video unless you're planning on using AI Upscaling. Doing otherwise would result in the same effect that zooming really closely into an image produces - you start seeing the individual pixels.

Video files will always be smaller than the summation of the frame outputs. That's because videos don't actually store every single frame as an image, they instead use algorithms to store some frames and record what changes between different frames. Rather than trying to explain this myself here's a good short video explanation for this by Tom Scott on Youtube.

From my experience (and it should be noted that I've done some video editing using Adobe Premiere in the past, but nothing professionally), you shouldn't need to further compress the video - MPG4 will already compress the output to be much much smaller.

A partial answer to my own question for others to add or clarify...
I undertook a small sample test to compare a few variables without resulting in a noticeable reduction in final video quality of 65 frames at 720p.

Original PNGs 32 samples, 720p, 100% compression
Video output settings default
video file size 2.68Mb
Comparisons (all settings as above unless stated)
a) @128 samples 0% compression = 1.92Mb
b) @32 samples, 1080p, 0% compression = 1.97Mb
c) @128 samples, 1080p, 0% compression = 1.82Mb
That gives about 30% file size reduction by increasing the source PNGs sampling/resolution and outputting to 720p video.

My theory here is that lower quality rendered stills will have minor imperfections or variations (eg: slightly mis-shaded pixels) not obvious to naked eye but requires a higher bitrate to process these variations than higher quality stills with fewer variations between frames.

Additionally, having higher quality original PNGs allowed a reduction in video processing settings without significant loss in video output quality which wasn’t possible with original lower quality PNGs. For example I reduced video output quality to “low” instead of the default “medium”, increased keyframe intervals above the number of actual frames and used the slowest encoding speed.

Final video file size = 0.99Mb. An amazing 37% of the original file size.

The biggest downside to achieving this unfortunately was initial rendering of each frame rose from slightly over 1 minute for lowest quality PNGs to just under 10 minutes per frame. As with many things in this field there is often a trade off somewhere depending on where your priorities lie.


Set background color: always black despite horizon color? The documentation here says

So I followed, setting mine as follows

However, the rendered background is still black instead of white, as below.

What might've gone wrong here? Many thanks in advance.

If you would like to view the background in the viewport, in the Properties Tool Shelf (Shown by pressing the "N" key) and under the "Display" tab, check "World Background"

In shading section of the render tab in the Properties panel, change the Alpha from Transparent to Sky (little camera icon).
I faced the same problem in Blender render.


How to add linked groups symmetrically around an object So I've been learning lots and getting better at blender. Today I learned about linked objects, and after much research managed to get them to behave as desired using groups.

I'm working on creating a model for the engine for a light cycle, based off this image: http://www.filmedge.net/Tron/hello/SP_lightcycle_engine.jpg

I created two .blend files, one for the basic shape, and the second for the "fins" (the repeated angled blue bits that go from left to right). As you can see this one object is repeated lots, so using linked objects / groups makes sense. By my reckoning there should be 12 of these around the central cylinder. Which means they should be placed at 30 degree angles around the outside.

Googling suggests that you can use the spin dup tool, however that needs to be in edit mode, and because I'm using linked groups, I can't get into edit mode for that. I also read about the mirror modifier, but you can't apply modifies to linked groups either.

Is there a way to do this automatically?

Thanks

EDIT: I've been reading about pivot points, which would at least let me duplicate the group and manually rotate around the correct centre. Except you can't set the pivot point of a linked group.

I would suggest Array modifier. You need to turn off the two checkboxes for constant and relative displacement, and place an empty on top of the object you want to duplicate. Then, you change the center of rotation to the 3D cursor, then set the empty as the object in the Array modifier, and move the 3D cursor to the center of your model. Increase the number of array iterations by however many objects you want on the outside, then divide 360 by the number of iterations to find out how much you need to rotate the empty. It's a slightly convoluted way of using the array modifier, but it works for me.

Sometimes there will be a freaky scaling problem when you turn on the array modifier, but it can be fixed by pressing ctrl A --> apply scale.


Copy and Paste creates random null objects from existing geometry i have a really annoying and strange copy & paste bug.

Sometimes when i want to copy & paste an object, blender creates random null objects from my existing geometry, sometimes everything is deleted exept the copied object.
I couldn't reproduce this bug in a new file.

Maybe changed some settings accidentally with a shortcut?

Iam using Blender 2.9 A

Best, Joseph

If you want to duplicate objects in your scene, instead of using Ctrl-C to copy them, consider using Shift-D instead. Admitedly. It's a bit confusing that there are both methods available when they don't seem to completely work the same way. I don't use Ctrl-C for anything except copying poses in Pose Mode. And I have no issues. Interestingly, when I just tried to use Ctrl-C on an object in a scene, as you have done, I got a weird result also: It made an extra copy of my armature object. However, it's an armature that wasn't even part of the object I tried to copy. Very odd.


How do I obtain an untriangulate rendered image in Cycles? I have an object that is only triangulated in rendered view, so how do i un-triangulate this object for the rendered view?

Go to edit mode and Press Alt+J or Press Ctrl+F and select Tris to Quad


Topology Circluar Quads I can't seem to wrap my head around on how to make a cricle from a square in a nondestructive way.

The result I'm trying to achieve is this:

Starting from this:

I've tried inserting a face but it won't let me slide it anywhere from it's starting point. I've also tried extruding and then scaling it in but the shading gets all weird. I just want to add the extra edges and make it more like a circle.

Any help would be appricated!

Inset the faces with I, then use To Sphere tool (Shift+Alt+S,1) to make the edge loops round.

Next enable the proportional editing (with a Sphere falloff type) and transform the middle vertex upwards (G,Z). Finally extrude the four middle faces upwards (E,Z).

Spin a subdivided section around its vertex and deform the result if you like.

Ok, here you are

Ađd a plane
Delete its three edges
Subdivide the remaining edge as many times as you want
Put the 3D cursor at one end of this edge
Select all and spin the edge with 3D cursor as your pivot

DONE

You may want to UPVOTE and ACCEPT it now.


How to edit a photo for texture How can I custom crop an image in blender? I need to cut off edges of a photo before I can use it as a texture.

Check CGmatter tutorial on youtube :https://youtu.be/gz4qV5_zuMo
Or you can use gimp to crop the image


Quick way to add Bump node This is what i got but how it works can anybody explain me.

Node wrangler auto texture setup

This is my image below

Is there any quick way to add a bump node. With press 1 click it should set the nodes and just can add the images in the position. Like a macro or any addon just press 1 click and it set all bump nodes and i have to just drop the images in that. Im having 75 buildings and i want to add all of them the bump so always i have to select the material add 5-6 nodes so if there is a quick way. Any suggestion or help. Thanks

or

Activate the Node Wrangler Addon.

With the sphere unwrap

Click on add material with the selected default material just change the diffuse material to Principled BSDF.

Before u go to next step u must save the image with the name (normal, spec, Ambient, disp.) Note : without name it will not work so just the normal name should be to the images so that addon find out correctly.

With the Principled BSDF Node Selected Press Ctrl+Shift+T

A window target select the file which are saved with the name

Click ok and render


Why is my mesh flipping? (Rigid body simulation) I'm attempting to run a simple rigid body simulation with the following parameters: A plane as a "floor" set as a passive rigid body, and a mesh "scrabble tile" as an active rigid body and all defaults except for "Box" as the collision shape.

I'd like the scrabble tile to start face up, fall, and settle on the ground. The problem is that at frame 2, the mesh seems to completely flip so that the bottom side of the tile is facing up, for no apparent reason. See screenshots (can't post a 3rd, but if you rotate underneath the tile in frame 2, you'd see the text).

Any advice on fixing this would be greatly appreciated. Thanks!

Here is frame 1 (good):

Here is frame 2 (bad):

I had the same problem in blender 3.0, the cause was the object having a negative scale. It worked fine after updating the object's scale with positive values.
This link posted in one of the previous answers was useful:

https://blenderartists.org/forum/showthread.php?311350-Rigid-Body-Tools-turns-my-object-upside-down.

A little more searching and I found the answer... https://blenderartists.org/forum/showthread.php?311350-Rigid-Body-Tools-turns-my-object-upside-down!


Getting started with animation accelartion? My animations look completely robotic and lack any acceleration, how can I solve this?

I saw something similar using curve graphs, but I'm not that advanced yet, if someone could give me a get started tutorial.

I knew blender well just not the graph stuff.

Perhaps this will help you get the acceleration you want:

Blender Basic Animation - Using the Graph Editor and Interpolation Modes

https://www.youtube.com/watch?v=R9gCHhJOjlQ

In this intro, inascott888 positions a cube and keyframes location at the start frame, he then goes to the end frame, repositions the cube and keyframes location there. In the graph editor window, he then uses the bezier handles to change the shape of the transition curve, and shows how this can be used to effect acceleration of the cube (when the animation is played back), that is by making a very slow start, but increasingly steep curve up.


How to repeat an Image Map in blender 2.8 In Blender 2.79, there is a way to repeat images in a tab:

Whenever I try to apply this in Blender 2.8, in node form, I don't get the same results as mirror x and y in Internal. I know it is the Mapping node, but how do I get a repeating option like these examples:

Without the repeat

With the repeats

Here is the current node being used in EEVEE:

You might look into this, seems like a lot of nodes for what was just a checkbox. Hopefully someone else has a better answer.
Is there a way to do mirror Image mapping in EEVEE?

The "repeat" under the "flat" in the base color node is enough


How do I combine two node trees? I have a node tree that gives me a background with a colour of my choice instead of the default black.

I also have a node tree that controls mist in my scene.

No problem with either of these. They both work as I wish. My question is how do I combine two node trees? In other words, in my example, how do I have a coloured 'sky' and mist?

If I have nodeTrees that I would like to share between Files or anywhere -> I group all the nodes I need - give it a proper name and insert the grouped-Tree anywhere else from shift-A menu...or append it in some other file.


Front ortho opposite way around to expected I have a box and have drawn with grease pencil
F on the front (+Y)
B on the back (-Y)
R on the right (+X)
L on the left (-X)
T on the top (+Z)

Right ortho shows the R
Top ortho shows the T (upside down)
Front ortho shows the B!?

Is this correct? It's extremely confusing.

You should accept the orientation presented by Blender.
You should not fight with Blender on this small matter
I think you should switch to each view and then use the grease pencil
I think it is more likely that you can work successfully with Blender on a second try ... rather than you have discovered a flaw in Blender.
You may want to see a tutorial on grease pencil


How to select the faces that have reversed normals? Ctrl+Shift+Alt+M doesn't work.
There is a solution ?

I want select this faces :

Here's my .blend file:

If you wanna select only reversed faces, use Ctrl+Shift+Alt+M but in Edge select mode. It doesn't work in Face select mode, and if you use it in Vertex select mode, it will select too much.

I assume you want to clean up the wrong normals?
Go into edit-mode, select everything (a), and press ctrl+n. This will recalculate the normals.


How to I create swirls of dust? I made this using other software:
https://youtu.be/yS1SEQP11o0

I want the dust to look like it was blown by the propellers as it swirls in the turbulence to eventually settle.

There is this exact question that ended up in the chat rooms but that doesn't help me any.

Creating dust deflated by wind

In this tutorial you will see exactly what is needed to learn do to to get something similar as described.

https://youtu.be/k8lHVnQdtSA


What are the most common reasons for not being able to edit UVs? In 2.80

I have unwrapped the UVs. But I can't edit them now.
I tested this with another object in a different file and that was not a problem, so I guess it's something specific to my other file.
Also, the UVs only show while I have them all selected in the 3D view. Is there a way to have them all showing whether they're selected or not?

Thanks

Strangely, the solution was to remove the texture I had on that mesh.


How do i make the camera rotate about the object using the mouse or keyboard in the game engine? please how do i get the camera to use the character as the pivot point while  rotating with the keyboard or mouse? I also want the camera's view still centered on the character like in a normal animation. I tried the pivot constraint,change of the universal pivot found beside the view-port shading and even tried changing the camera's origin point. The first two worked fine in the editor window but not while playing the game while the third one didn't work at all.

Press Shift + F on keyboard
Once you press shift+F on keyboard u can move the camera where you want with the arrow up down front back and A S W D key like games


How to invert the colors properly in Blender? When I invert the colors in Blender, I don't get the same result at all as Photoshop. The middle-grey background should not change, but it gets brighter in Blender while it stay the same value in Photoshop.

Blender will generally linearize colors when importing 8bit images. Photoshop does not. Normally, Blender's behavior is correct but in this case you are encoding data here, not colors. You can inform Blender of this and disable the de-gamma step by setting your input color space to "linear" or "raw" instead of "sRGB".

Here's a visualization of how you can change the color space to "Raw" so that you can do inversion properly:

Before inversion:

After inversion:

And for depth maps (connect the Z-pass to a Normalize node first)

Before inversion:

After inversion:


Make a ring larger but same thickness Is it possible to make a ring larger, but maintain the same thickness?

I only selected the vertices of the ring, the ring is part of a larger object and I don't want to separate it.

If I simply scale it with S, it becomes thicker as well.

Try scaling in the y axis how much you want, then scale the same in the x axis. (Example with things you type: S,Y 90, S,X 90)


How can I distribute various objects based on their size? Are there any techniques or tools in Blender to help make an image like this?

There are a few things in this image that I'm specifically interested in:

size: big objects at the top, small objects at the bottom
density: distribution is less dense near the middle-bottom
packing: there are small stones packed amongst the big stones at the top
collision: there doesn't appear to be any stone/stone overlaps

Disclaimer: This is not a true way of sorting by size, just a way of faking it by scaling objects.

This works by using a vertex group to affect the particle size and density, simply create a gradient to affect particle size as desired

Start by creating a circular mesh, a cobweb like topology will likely help.

Add a new vertex group and use Weight Paint mode to paint in in a gradient shape to your liking.

Create new particle system set to Hair type, and use the previously created Vertex Group to drive both its Density and Length parameters.

2 or More Particle Systems emitted from a circular mesh.
2 or More Physics Systems Baked
Image compositing


Blender 2.76b wont install. Error Message pops up I've been trying to install the latest build of blender on my PC but every time I try I get this error message

Does anyone know why this is happening and how I can fix it?  Thanks!

I also had this problem using chrome, trying all the available packages, downloading to various places including desktop, and running after saving.

I switched to Windows 10 Microsoft Edge browser and was unable to download the installer.  However I was able to download the zip file correctly and run blender from there.

Moral of story, keep trying different things until something works....

I had the same problem using chrome. I changed my browser and I successfully installed it. So I guess you should try another browser. I hope this helps.


CPU baking only uses a fraction of the CPU, starting with 2.90 I just updated the blender version from 2.83 to 2.91 for our baking scripts, and it was running smooth in my local machine tests (GPU rendering), but when we ran the first test jobs on AWS machines (with CPU rendering), it was really slow. From 25mn to bake a few lightmaps, it went to more than 4 hours. The only thing that we changed in the code were two breaking changes from 2.91:
scene.ray_cast(layer, ray_origin, world_normal)
# became
scene.ray_cast(layer.depsgraph, ray_origin, world_normal)

#and

bpy.ops.export_scene.gltf(export_materials=True)
#became
bpy.ops.export_scene.gltf(export_materials='EXPORT')

In the logs, from what I can see, there's not much difference. The most suspicious difference is that in the bakes with 2.83 there was this line before each bake:
Fra:0 Mem:593.81M (0.00M, Peak 725.36M) | Time:00:15.92 | Mem:0.00M, Peak:0.00M | Scene | Loading render kernels (may take a few minutes the first time)

Which is now absent from bakes done in 2.91. Because the logs are reaaally long (90k+ lines) it's difficult to do a thorough analysis. All I can see, when searching for the lines I log before and after baking one map, is that the logged time is much slower with 2.91 and that the line stated above is absent at the beginning. There's not much more I can see...
EDIT: Comparing the documentation for BakeSettings from 2.91 to 2.83 I see there is now a "max_ray_distance" parameter, that is set to infinity by default. It might be my problem. Gonna try and tweak it.
EDIT2: the max_ray_distance parameter didn't change a thing. I was able to reproduce the issue on my computer, and observed that while baking with 2.83 uses 100% of the CPU, on 2.92 it uses almost nothing.
Gonna try the 2.92 beta next and 2.90 to see how they behave
EDIT3: I tried making a simple blender project to reproduce the problem and open an issue. But strangely, the problem did not occur then. There must be something we're doing in our code that makes it behave differently than just making a simple plane mesh and hitting the bake button...

I found the reason! We were setting the tile size to the size of the map. According to the comment next to the code it was an optimisation recommended on Blender forums, and indeed it was way faster than setting a small tile size on 2.83. On 2.90 however, it was sluggish as hell. Setting a 32 tile size made things much better (it's even a wee bit faster than with 2.83)

Could it be that now your CPU is having to complete more tasks as it is a new version and it may have different processes to complete?


Trying to find a way to make a true pixel screen Using UVs to animate the shapes on the screen would be hard and tedious so i want to use geometry to impact which dots light up

the compositor won't really help as it pixelates where the camera is facing rather than where the mesh is facing

when i used animation nodes the matrix wouldn't parent to my plane, and the rotation only affected the induvidual bounds of each sphere (which is what i used to make the leds)

something like this effect: https://blenderartists.org/t/animatable-pixel-matrix-display/1126033/11

Can i make a mesh light up when something touches it?

^ it's better explained in this new one i made

I still think UV map could be quite handy:

Scale the UV maps into individual pixels by scaling them to 0
Connect the UV map to Image texture
Use Mapping node to animate it

Color with falloff | Animation nodes 2.1 in blender 2.81a

this was the effect that i was looking for (the one posted in the answers)


Error: Object has no mesh data to be used for ray casting I'm writing an operator that casts rays from the center towards certain amounts of points and finds the faces rays hit. I'm facing this annoying error, when I change the property of the operator.

I've managed to strip the code down to minimal code to reproduce this, that works on default scene

Code:

import bpy
import bmesh
from bpy.props import *
from mathutils import *

class SomeOperator(bpy.types.Operator):
    bl_idname = "some_operator"
    bl_label = "Some operator"
    bl_options = {'REGISTER', 'UNDO', 'PRESET'}

    prop = IntProperty(name="Prop",
        description="Prop",
        min=10,
        max=50,
        default=10)

    def execute(self, context):

        obj = context.active_object

        if bpy.context.mode != 'OBJECT':
            raise Exception("Please switch to object mode")

        cover = [Vector((0,0,1)), Vector((0,0,-1)), Vector((1,0,0)), Vector((-1,0,0))]

        for pt in cover:
            dummy1, dummy2, faceInd = obj.ray_cast(Vector((0.0, 0.0, 0.0)), pt)

            obj.data.polygons[faceInd].select = True

        return {'FINISHED'}

When you change the SomeProp value, the error occurs.

You need bpy.context.scene.update() just after execute() for it to work. It seems it needs to update some internal relationships.

Full code (modified to work on 2.78):

import bpy
import bmesh
from bpy.props import *
from mathutils import *

class SomeOperator(bpy.types.Operator):
    bl_idname = "object.some_operator"
    bl_label = "Some operator"
    bl_options = {'REGISTER', 'UNDO', 'PRESET'}

    prop = IntProperty(name="Prop",
        description="Prop",
        min=10,
        max=50,
        default=10)

    def execute(self, context):
        bpy.context.scene.update()
        obj = context.active_object

        if bpy.context.mode != 'OBJECT':
            raise Exception("Please switch to object mode")

        cover = [Vector((0,0,1)), Vector((0,0,-1)), Vector((1,0,0)), Vector((-1,0,0))]

        for pt in cover:
            dummy0, dummy1, dummy2, faceInd = obj.ray_cast(Vector((0.0, 0.0, 0.0)), pt)

            obj.data.polygons[faceInd].select = True

        return {'FINISHED'}

def register():
    bpy.utils.register_class(SomeOperator)

def unregister():
    bpy.utils.unregister_class(SomeOperator)

if __name__ == "__main__":
    register()

# test call
#bpy.ops.object.some_operator()

This error happens if you try to raycast in edit mode. For whatever reason, you can only raycast in object mode.


Why does the saturation get stronger in darker areas of a cycles render? I'm rendering a cube with a single light-source with the standard white/grey diffuse-shader and therefore getting a picture with values-only and then multiplying a color on the image, the color on the different surfaces just changes its brightness.

But when I'm giving the diffuse material the color I have multiplied on the first render, in the new image the color just doesn't change its brightness, but also its saturation.

Why? Is there just a simple difference I didn't recognize?
1st picture: Values multiplied with color.
2nd picture: Used the color as material for the diffuse-shader.

EDIT: I found out that monochromatic colors dont change their saturarion.

The answer for this issue is "albedo", a very important aspect to keep in mind when creating shaders.

Albedo is the reflectance of a material, which in layman terms means how much of the light received is bounced (it's a percentage) and therefore how much is absorbed.

Real world materials don't reflect all the light received nor absorb all the light received (materials you'd call "black" in real world always reflect a little light, while the brightest material you'd call "white" bounces less than a 90% of the light received).

That's the main reason why the default cube is 0.8 RGB gray and not 1.0: albedo is somewhat encoded in the RGB values you feed to shaders as base colour, so if you gave your material a 1,1,1 as base colour, it would bounce back 100% of the light received, which is physically incorrect.

So when you render your materials a part of the light is being absorbed, and the resulting pixel is the light hitting the surface scaled by that albedo (present in the base colour).

I suspect you're trying to reproduce what passes do (multiplying shading by base colour as we discussed in your other question), but it can't work that way because you're multiplying the base colour to the already rendered surface.
Your rendered gray cube has an albedo of 0.8, so it reflected an 80% of the light it received. When you render the brown cube, colour affects the albedo too, and the bounced light is different than 80%, and that's the reason why you get a difference when you multiply.

In other words, your rendered gray cube isn't exactly the same as a pure shading pass, so multiplying colour to produce the same result than rendering a colored cube won't work.

Sometimes when you get unexpected color variations it can be due to color management. It might be worth looking at the color management settings in the Scene tab.

Also, how are you "multiplying by a color" and how are you looking at the resulting image? For example, if you're saving an image from Blender and looking at it using an image viewer, you might get different visual colors than when you look at the image inside Blender, as there may be different color management settings between Blender and the image viewer. This is especially likely to produce unexpected colors if you have a monitor that's not accurately compliant to a standard colorspace such as sRGB, because if Blender or your image viewer aren't compensating for the monitor (by using a profile file), then the colors will be inaccurate.

And if you're taking the grayscale image from Blender and multiplying by a hue in, say, the GIMP, it's quite likely that the math will be different to Cycles. :)  After all, it would be pixel math, rather than lighting-driven.


Timer that can interact with context.object? i'd like to create a timer that can interract with the active object.
every time the active object is not the same as the object in my pointer prop it automatically replace pointer object with the active object.

i don't understand why they restric us doing this kind of things.
how can i achieve something similar ?

class SCATTER_OT_terrain_is_active(bpy.types.Operator):
    bl_idname = "scatter.terrain_is_active"
    bl_label = ""
    bl_description = "Constantly use the active object as Terrain"

    def execute(self, context):
        addon_prefs = bpy.context.preferences.addons[__name__].preferences
        C_Slots     = bpy.context.scene.C_Slots_settings

        addon_prefs.active_is_terrain = not addon_prefs.active_is_terrain

        if addon_prefs.active_is_terrain == True:
            print("start timer")
            bpy.app.timers.register(check_active)
        else: print("stop timer")
        return {'FINISHED'}

def check_active():
    addon_prefs = context.preferences.addons[__name__].preferences
    C_Slots     = bpy.context.scene.C_Slots_settings
    Active      = bpy.context.object

    print("check")
    if addon_prefs.active_is_terrain == False:
        return None

    if Active != C_Slots.Terrain_pointer:
        C_Slots.Terrain_pointer = Active
    return 0.65

with a handler it may work

import bpy, os

ao = None

def h(s):
    # just for testing, normally i won't use global
    global ao
    o = bpy.context.active_object
    if(ao != o):
        ao = o
        print(ao)
    if ao.name == "Cam Small":
        return None

bpy.app.handlers.depsgraph_update_post.append(h)

but that doesn't really respond to the goal of the question


How to get rid of the mirroring effect in edit mode after applying the mirror modifier in Blender 2.8 I can't figure out how to get rid of the mirroring effect of the mirror modifier even after I have applied it. I am working in Blender 2.8 but still can't figure out how to get rid of this mirroring effect. As you can see in the picture below I don't have the mirror modifier on the mesh anymore since I have applied it but yet the mesh is still mirorring. If anyone has an answer please let me know.o

Check left toolbar, options tab: Mesh options, X mirror.


How can you make a scratched metal procedurally? I want to use a type of scratched metal thing to use for a robot I'm working on, but I want to know how to do it in a procedural way, just using nodes and math, is there any way I can do that? This is a picture of what I want it to look like, but, just less scratches, so if anyone has a way, please tell me.

If we take a Voronoi Texture set to Distance to Edge, and do a Math -> Less Than operation we get this map:

We can use another Voronoi Texture set to F1 to generate a map that lets us subtract out most of the corners.

Note that we are using the same scale for both Voronoi Textures, and we are clamping the Math -> Subtract operation to prevent our values from falling below 0.

The Less Than threshold controls the thickness of scratches, the Greater Than threshold controls how much of the initial map we remove.
You can stack up as many layers of this as you want:

And then plug it into a Bump node with distance set to -1 to sink it into the mesh instead of pushing out.

Here's a setup attempting to resemble your reference image.

Use texture paint.
Press U on the keyboard-in order to texture paint as you'll need to UV unwrap the object (probably just use simple UV project unless You know specifically what you want).
Then go into the texture paint tab and go into edit mode. If you want depth to the scratches just create extra faces around the color using F.


How can I view the camera through an object as a material in Cycles? Kind of like a TV, CCTV, or the portal for Portal and Portal 2, so I can see what the camera is seeing on an object. I don't care whether its a material or a modifier, or something like that, even if someone will make a script that is a node or whatever as long as it works, nothing specific as in how I would go about it.

I think you have two options: one in "real time" and another two-stepped.

The two steps workflow

This is the simplest one. You have your scene with two cameras and a screen in which we are going to see the view of one of the cameras.

The first step is rendering the view of the CCTV camera so you have an image sequence of what camera is seeing. For this, select the camera Ctrl Numpad 0 to make it the scene's active camera. Then render the scene.

Note that this render might have the same aspect ratio than your screen object.

After the render, simply add the image sequence as a texture on your screen material. Make the other camera the active one and render.

The "real time" workflow

With this workflow, which involves the compositor, you'll be able to see the real view of the CCTV camera in one F12 push.

Having your scene with the two cameras and the screen, these are the steps. (Also I've provided an example .blend below)

As a scene can only have one active camera in any given frame, we need another scene for rendering the CCTV camera. So create a new scene with Linked Object Data. Doing so, if you change datablock related stuff in any scene, it changes in both. But not transformations so I recommend waiting until the end to start this workflow.

In this new scene (lets call it CCTV scene) select your CCTV camera and make it the active one by Ctrl Numpad 0 it.
If necessary, change that scene's render dimensions to match the screen's aspect ratio.
In the main scene select the screen object and move it to another layer alone. Press M and hold Shift when you select the new layer so you can have it in both layers. Doing this you'll have your main render as expected.
Now go to the Render Layers tab add a new layer, name it "Screen". Enable only the layer where the screen object is and, in the Passes panel, enable the UV pass.

Now lets go to the Compositor.
Add the three render layers: the main one and the Screen one from the main scene and the main render layer from the CCTV scene.
Connect the CCTV node image output into the image input of a Map UV node. Then connect the UV output from the Screen render layer to the UV input of the Map UV node.
Now Add the output of that Map UV node to the main render layer.

And here is the example file:

Did you try the compositor?

Just create a camera that points at what you want, render that camera into a file and use that file as a texture on the monitor displaying the "camera feed".

Technically, yes, this will make the "feed" lag behind one frame, but really nobody will notice.


Blender seems to reset keyframes I am new to animating in blender and have a (what I think is) weird behaviour, which makes animating very frustrating and near impossible for me.

Please watch the uploaded .gif: https://imgur.com/nkLGrZ7

First I show my animation. After that i select one IK element in Pose Mode and play the animation again. Please notice that some positions of my bones just change in the animation. I did not modify anything. Since I bought the AK  model online I don't think I am allowed to share the blend file.

For easier comparision here are two pictures. One before clicking on the IK element and one after (same frame in the animation).

This also happens everytime I move something in pose mode. Some positions change on other frames and I can't controll my animation.

Is this a known issue or am I missing something?

Thanks in advance.

EDIT:
uploaded the file without the ak. The arm rig and model is from this video (https://www.youtube.com/watch?v=xzLnkpBQUfA), so I hope it is Ok to share this here.

Steps on how to easily recreate an issue: https://imgur.com/a/2qK00D2

Okay, so I downloaded blender 2.8 a few days ago and just tried to open my animation with this version and it seems to be fine. I don't know what went wrong with my 2.79 version, maybe it is some problem with my local installation...

EDIT:

Nevermind, the problem still persists, however, now I am able to get rid of it by pressing STRG+Z sometimes.


I'm not able to leave a certain selection tool I did, somehow (think I pressed a hotkey), end up with this circle around the mouse cursor, which could select multiple vertices. I do not know how to leave this mode/tool, and I'm not able to do anything but to use this certain tool. I can't use shortcuts, for example cmd+S to save. I cant open any menu, I cant rotate the view, I cant do anything but to change the size of the circle (using the scroll wheel on the mouse) and to select vertices using it. No view hotkeys works (1-9)

This is what the tool looks like:

Would love to at least get to know the name of the tool I'm stuck with, so that I could ask a more accurate question. Since I can't save the file, I don't want to close it. Therefore, if I could get some help soon, that would be very appreciated.

Try pressing "W", it will change the pointer type from select circle to select box, hope that helps.

i accidentally pressed it and had the same issue, pressing it again fixed it for me.

You can change it at the bottom left corner in 1.79. In 2.8 it'll be at the top of Tools


Thin faces warning 3Dprint tools I am using an industrial grade 3d printer, it has a voxel acuracy of 23 micron.
Although i cannot show my model here, its about 1000 times larger then the default suzan, as i export it later to STL, and as blender isnt aware that the default stl scale for 3d printers is mm.  (the STL format itself has no size, but scaling it 1000 times works well)

Anyway with those large objects in reality just a few centimeters tall, i kinda get random warning of thin faces.

Is this normal, or should it reported as a bug ?.

There are two ways for you to handle this.

The first is through the length unit settings in the scene tab of the properties panel (bottom right in the image below). You can simply set the scene units to millimeters instead of meters (which is the default), and the 3D printing toolbox tests will update accordingly.

The other one is by changing the thickness threshold in the 3D printing toolbox thickness tests to whichever is the limit you're aiming for (which corresponds to your 3D printing tools and materials).

The actual thickness of the model should be created in the 3d modeling program itself. If you want to know how thick the model is after you export it, you may have to use a secondary program like Meshmixer. That program can tell you how thick certain objects are by millimeters. I learned that lesson when I was making my 3d printed helmet for the first time and when I was still learning the ropes, I learned that in order to get a more sturdier build, I had to increase the thickness of the mesh in Blender and examine it in Meshmixer before I send it out for print.


Why does my model reorient itself when I render it? It was facing in Y+ direction, so i turned it to X+ direction so that it fits my scene, but when i render it turns back around it sound stupid but i am not joking!

Here is the File

You have inserted keyframes , the viewport is displaying frame 2922 and you are rendering frame 0.

you can change what frame you want to render in the render settings.

to clear all keyframes select all objects and press Alt+I

Press NumPad 0 to enter camera view. Move and rotate the camera to change the rendered view. In the properties panel (shortcut N in the 3D window) you can lock the camera to the view, to adjust the shot.


Backface visibility for Blender exported JSON files When I export a model from Blender to three.js, it loads fine on the webpage. faces are visible only when I look at them from the direction of its normal and not from the other side. Is there a way to get the visibility of these faces from the back side / opposite side as well?

Edit 1:

I tried using bpy.context.object.active_material.THREE_double_sided = True and that did not work. I also added .doubleSided = true in the html. Still did not work.

In Blend4Web you can do it by disabling Backface Culling https://www.blend4web.com/doc/en/materials.html#rendering-properties

material.doubleSided = True seems obsolete.

I Found the answer here
https://stackoverflow.com/questions/25061271/three-jsonloader-double-sided-texture-png


Mirror modifier without seam I'm using mirror modifier with merge and clipping enabled to create a very low poly model. Generally - every single triangle counts. I'm also a newbie, so this question might be stuipid.

Is there a way to use mirror modifier so that it DOESN'T create new vertexes at the point my model and mirrored parts merge? I know they are needed in most cases, but in my it's just extra work to remove them.

Assuming you mean by seam an edge loop like the one selected in this image (along the y-axis).

Once you have applied the mirror modifier you could:

Select the edge loop Ctrl-RMB
Delete edge loop X

I wouldn't recommend to apply the modifier since you couldn't apply symetrical changes as easy as before. IMHO it's not worth to sacrifice editability for saving a few faces.

I had a similar problem it took a while but I figured it out, my mesh seemed to split in the middle when I applied a multires modifier.  I found that when I turned off the mirror modifier for some reason when I had done an edge loop cut and slide it had added faces to the loop edge that was my clipping so when ever I was applying the mirror it was confused because the edge loop it was supposed to merge had faces.  Turn off the mirror and if the side you want to merge has faces delete them and all will be good. (Tthe side you want to merge is the side you can't see when the mirror mod is on.)


operator draw() method in Node Editor I am creating a script that creates node in the node editor. I need to accept some properties from the user after creating the node. So I wrote a draw method.
But looks like operator.draw is not being called when the context is the node editor. I have put a print statement inside draw(self, context) to verify this. If I change the space type to 'VIEW_3D', the draw method is called.
Is the operator draw method only available in 3d view?
Edited with example:
In example below the message "inside op draw" is called on click of panel in 3d view not in node view:
import bpy

bl_info = {
    'name': 'test node editor op',
    'category': 'Object',
    'blender': (2, 80, 0),
}

class my_op(bpy.types.Operator):
    bl_idname = 'object.test_op'
    bl_label = 'test node op'
    bl_options = {'REGISTER', 'UNDO'}

    x : bpy.props.FloatProperty(name='X')
    y : bpy.props.FloatProperty(name='Y')

    def execute(self, context):
        if(context.area.type == 'VIEW_3D'):
            bpy.ops.mesh.primitive_cube_add(enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
            bpy.context.object.location.x=self.x
            bpy.context.object.location.y=self.y
        else:
            if(bpy.context.active_object!=None):
                if(bpy.context.active_object.active_material == None):
                    m=bpy.data.materials.new('my material')
                    bpy.context.active_object.data.materials.append(m)
                bpy.context.active_object.active_material.use_nodes = True
                n = bpy.context.active_object.active_material.node_tree.nodes.new('ShaderNodeValue')
                n.location = (self.x, self.y)

        return {'FINISHED'}

    def draw(self, context):
        print('inside op draw')
        col = self.layout.column()
        col.prop(self, 'x')
        col.prop(self, 'y')

class simple_3dview_panel(bpy.types.Panel):
    bl_label = 'simple 3d'
    bl_idname = 'simple_3d_panel'

    bl_space_type = 'VIEW_3D'

    bl_region_type = 'UI'
    bl_category = 'My View 3D Panel'

    def draw(self, context):
        col = self.layout.column()
        col.operator('object.test_op')

class simple_node_panel(bpy.types.Panel):
    bl_label = 'simple node'
    bl_idname = 'simple_node_panel'

    bl_space_type = 'NODE_EDITOR'

    bl_region_type = 'UI'
    bl_category = 'My Node Panel'

    def draw(self, context):
        col = self.layout.column()
        col.operator('object.test_op')

def register():
    bpy.utils.register_class(my_op)
    bpy.utils.register_class(simple_node_panel)
    bpy.utils.register_class(simple_3dview_panel)

def unregister():
    bpy.utils.unregister_class(simple_node_panel)
    bpy.utils.unregister_class(simple_3dview_panel)
    bpy.utils.unregister_class(my_op)

if(__name__ == '__main__'):
    register()
```

Yes, you are right. The operator draw method is only available in 3d view and not in node editor.


hardops addon in blender 2.69 ubuntu 14.04 enabled hardops 007 addon just fine when my imac was running osx Yosemite
i try to install it now here on ubuntu and i keep getting these errors... all of my other plugins work just fine.

why ubuntu why!!!!!

problem solved. simple updated needed. just make sure hardops 007 is updated with blender 2.77 should work fine no special thing needed here.


3d tracking: after render video is shorter than original (same fps and amount of frames) I made a 3D track.

When I render the sequence, with the same number of frames (even more) as the original video, and the same fps, I get the video which is shorter than the original. Where I made mistake and how to fix it?

Looks like I've just realized what the problem is. In the render settings are the same fps as in the original video, but when I export the rendered sequence in adobe premiere - FPS different! Why is this happening and how to fix it?

The problem is solved! Unrelated to Blender, but on Adobe Premiere. It was in the interpretation of the frame rate of sequence (in the project panel, right click on the clip-modify-interpret footage-assume this frame rate)


Giants i3d exporter addon When I install the add on it keeps saying upgrade to 2.8x why is this showing when I just want to create a map for Farming Simulator 2019 Giants editor software.

Any ideas what the issue would be?

Because the plugin is version 7.1.0, and you need the plugin version 8.0.0, unfortunately there is no such plugin


Why object deformed in Follow Path (ctrl + p)? I'm trying this method I found in youtube: https://youtu.be/ZgdobdXzKM4
But the problem is the child/duplicated objects deformed when applying the "Follow Path". What would be the reason deformed and what would be missing settings should I configure?

I do not know what you did wrong, but, I did everything that was shown on the video and it worked. Try again.


Camera and Object tracking I want to track one particle in a video and have some questions:

What data files are compatible with the program?
What data (position, Velocity of the particle,…) will be obtain?
Is the software for free or are there some costs?

The software is 100% free

here is a list of supported video formats

https://www.blender.org/manual/data_system/files/video_formats.html

But as far as motion tracking it depends if the camera is moving or not.

If the camera is moving, you can find out how it was moved by tracking things in the scene that dont move.

But if the camera is stationary, and you simply want to track a moving target.
Then you can do some simple math by finding out at what frame rate the video was recorded,
then checking how much the particle moved over how many frames.


My tracks stop tracking I am almost new with camera tracking and I am working on a small test. But in frame 93 15 of my 18 tracks stop tracking. The rest stops one frame later. The video ends in frame 220. Can someone help me?

Move the tracking point back to the correct position (manually) and continue tracking. If it looses track again, put it on the right track manually again.

If the video is blurry or jumpy the tracking can have problems. Rotating the camera fast will give you a blurry image.

go to file, preferences and then increase the cache limit.


How to properly render smoke on a transparent background? When rendering volumes with Film > Transparent enabled, the alpha appears to be the wrong type (premultiplied/straight).
In the 3D view it works as expected:

This is a known bug.

Is there any way to work around this?

It's a viewer issue only. Try compositing over a gray background using the alpha-over node.
If the result is correct, then your file output (without the gray background, of course) will be correct as long as you store it as EXR or any other format with associated (premultiplied) alpha channel, as it's the only way to store pixels that are both transparent and emissive (which is what fire is).
The resulting EXR will be fine to be composited over any background, and fire should look ok.

Unfortunately, (as you mentionned), this issue is a bug.

There is a workaround however (as @NoviceInDisguise mentioned), which isn't ideal or 100% polished, but its a quick and dirty method to get the job done.

1. As you can see in the screenshot, I have the same issue (Note: This bug only applies to the 'Fire' flow type, the 'Fire & Smoke' type renders without issues).

2. Begin by ensuring that Transparent is checked under Film in the Render Properties Panel, and also that the PNG Type is set to RGBA in Output.

3. Next add a large plane behind the fire object. Ensure that it is wider than the bounds of the camera and is far enough back from the fire object as not to cast light onto it. Give it a simple deep blue emission shader, with strength set to 1. (Note: I've noticed a bug here in 2.74 whereby if there is an object behind the viewport display of the smoke and fire, it wont dispay properly. Don't worry though, this doesn't seem to affect the renders.)

4. Render the image and jump on into the Compositing Screen Layout. Check the Use Nodes, Free Unused, and Backdrop boxes below the Node Editor, and add in a Viewer node.

5. Hit Shift+A and go Matte>Keying, add this to the Node tree.

6. In the Key Colour setting, use the Eye Dropper tool to sample the blue from the original render, this will mask out all hues from the render which display the selected colour. If the blue appears black, it's likely that you don't have the Use Alpha check-box ticked on the Viewer and Composite nodes.

7. This should update the render automatically in the bottom left Image Editor. If it has simply hover over the transparent render and hit F3. If not just give it another render, ensuring that the Compositing check-box is ticked under the Post Processing tab in the Render Properties Panel, and it should display the composite fine.

Et Voila, the final render! :) As I mentioned it's not a perfect solution, and where the blue was subtracted from the edge of the flame it has become slightly pink tinted, but for all intensive purposes it works okay, and colour correction could be applied either in Blender or in Photoshop/Gimp. Finger's crossed the bugs'll be fixed in the next release.

Note: I also posted this workaround in the following thread... Smoke+fire wispy and transparent in render, but fine in render preview


Uploading an object from Blender to UE4 looks different so I have created this ak-47 mesh using blender

and when I try to export it to UE4 it looks like this(I exported it as a .fbx file so I don't think this is the problem)

As you can see for some reason the parts that are white in blender works fine but the parts that are grey are not.

when I crated this ak I first built it as a one object and then separated it to 4 different objects so I would be able to add different materials to each part later and I think this might be the problem somehow.

I'm new to blender and this is the first time I try to crate something without a tutorial so this might be a very stupid problem but I couldn't figure it out so thank you for the help :)

I experienced this same problem. Open Blender and go into edit mode by clicking Tab. Then you need to select all the faces, and use Ctrl-N to recalculate the faces' normals. Finally click that thing that looks like a wrench and click solidify. By doing that you're making every face solid like a room and that should work.


Ctrl + J doesn't work Currently I'm using the 'Cell Fracture Add-on' and want to remove the doubles. To do that I have to make all fractures into one single object so that I'm able to go into Edit Mode. Normally you only need to press Ctrl+J, but somehow nothing happens.

How can I fix this problem?

Make sure you are in Blender keyboard preset, not in Maya or 3DS Max keyboard shortcuts, then you will be able to do that by pressing Ctrl+J.


Faces doesn't show up in game? I've got a question.
I modelled a character and importet it into Gmod. I had the problem recently, that some face were flipped.
Then I searched how to fix it and in Blender, it seems that they are showing to the right direction.
But when I'm running the game, the faces on many spots of my character were still invisible when I look direktly from the front...

Here are screenshots of my issue:

This is the edit mode in blender, and the Faces are showing to the right direction o-o

here are they still missing. The characters right eye shows up when I'm turning to the left...

In crowbare, everything seems to be alright too...

so what can I do? did I oversee something there?
(btw it's my first character and playermodel I did ^^')

Silly question; have you tried flipping the normals, and checking that no overlapping faces are present? Its hard for me to see the normals on the left part of the face, and the right looks fine as of where I can see them.

Other than that check that the Vertices are not being weight pulled by other bones. Check it in zero mode in the left hand tool panes when weight painting.

click on your object
select the material
check if the Transparency section has a check mark next to it. remove the check mark.

In the Properties window, Material tab then you are looking for the Transparency section.


In blender 2.8 how do you make a local instance of an object in use by multiple scenes? I have created a new scene using linked copies.

Now I need to make a few of the object single-user so there is a separate object in the original and in the new scene.

Back in 2.79 there was a button for that:

Blender 2.8 seems to lack that button.  How do I make a single-user copy of the object?

Do not confuse the object with the object data (like mesh or curve).  The mesh panel does have the button, but I need to make the object single user and that panel is missing the necessary button.

Based on some of the comments I have concluded I am going to have to get horribly detailed, because what other people are experiencing does not match how my stock blender 2.80 behaves:

Start with the default scene:

Add a cone:

duplicate the scene

and let's change the outliner to let us see both scenes

Notice that my Object panel lacks the button that would allow me to make the object single-user.

Let's rotate the cone by 180.

Oh no!  It affected the original scene

And if we delete the object from one scene, it disappears from both scenes.  WHAT!

Undo that deletion.
Let's use the Object>Relations>Make Single User>Selected Objects .

Oh no.  Now both scenes have Cone.001 and Cone has disappeared.

How do I change my workflow to accomplish the mission of having two scenes with some objects in common , and other objects have single-user versions of objects from the original scene?

Make New Scene with Copy Settings. Go to your first scene and link all necessary object to newly created scene. Go to your new scene and now Make Single User under Object->Relations works as expected.

at the top of the screen, click object - relations and there are two options there that should do what you want:  make local or make single user.

hope this helps


Can't get armature to move mesh! I am trying to get an armature to move one limb on a deer I have made. Here is my design process!

I made the body and limbs as separate meshes. I wasn't sure how to create limbs out of the body of the mesh and make them look good.
I tried joining  the meshes, creating the armature and setting automatic weights and then moving the armature in pose mode. The mesh would not move with the armature
I thought maybe it was because many vertices between the mesh and the limb were crossing so I thought maybe that was why the armature was not moving the limbs
I used the cut tool to remove the intersecting mesh on the limb and the body so that there were no intersecting vertices.
I then joined this set of meshes and created a new armature, set the weights to automatic and tried to move the mesh in pose mode and it still won't work.

What should I do? I don't know what else to try. I have been following any other online instructions exactly.

File Link:

First, you needed to join all parts of the deer by selecting the misc ones, then the main one, and keying Ctrl + J.

You also needed to parent the mesh to the armature by first selecting the mesh, then the armature, and keying Ctrl + P. You would select Armature Deform > With Automatic Weights.

Lastly, some weight painting had to be done. I did all of this. Here is the finished .blend file:

Actually you must join all joints together with Ctrl+J
and then parent to the mesh, only then can you truly use the mesh with armature. One armature must become many, and use mesh with that just one! Awesome huh!

Joine all armatures! All becomes one, literally, just one armature with Ctrl+J.

And then parent the mesh to that one armature that can use it, else you cannot do.

There cannot be multiple armatures on one mesh, because it must be parented under one armature and you cant use many... simply put unless you clone...


How to slowly increase rotation speed of actuator So i'm making a game in bge and i've came across a problem. It's a driving game and i noticed for turning if i just put a certain number for rotation in the actuator the steering would be messed up. So i tried coding it and came across a problem. Idk how to make the rotation speed go up slowly. sorry.
Code:

import bge
cont = bge.logic.getCurrentController()
own = cont.owner
#Sensors
leftSensor = cont.sensors["Left"]
rightSensor = cont.sensors["Right"]
#Actuator
turningSensor = cont.actuators["Turning"]
turning = 0
if leftSensor.positive:
    turning = turning - .03
if rightSensor.positive:
    turning = turning + .03
own.applyRotation((0, 0, turning))

I have tried using a while loop instead of a if so it will loop(like i want it to) but a while command will completly crash bge. How do i do this

Timing
A logic brick represents the behavior of a single step. This step should be as fast as possible. It does not describe behavior that lasts longer than a single frame.
Therefore you should not try to describe a whole journey unless you want to finish it with one step. Even with that it has to be a fast calculation.
Bricks and Python
Your code reads an actuator but does not use it. Either the code is obsolete or it is missing something. I guess your original design was to reconfigure the actuator's parameter. Later you decided to use the applyRotation() making the actuator to act as actuator. Both ways are possible.
They do not make a difference regarding your question.
Model
A model describes the inner status of a specific aspect. In your case the aspect is how much to turn. So the model is "turning".
( A model can be much more complex. e.g. it can describe the status of a complete car including, speed, position, if doors are open, what lights are on ...).
Here the model describes how much to turn (single value).
Lifetime
You chose a variable as model. Please be aware that a variable exist only with the current processing of the code. It will not survive the exit of the controller. In other words you get a new variable at each single frame.
Thinking about a car model: your get a brand new car with each single frame .   (This might be a nice idea at the first sight, but it the car is always located at the car dealers place, without gas ).
You can see that at the console when you add print(turning).
It is better to keep the same model as long as the car exist. You need a model that survives when the controller's completed it's processing at the current frame.
There are several different ways to achieve that.
Property as storage
I suggest you use an object property. It will bind the "turning model" to the game object that performs turning. This allows different game object that all can perform individual turns.
The change to your code is minimal but has major impact:
import bge
controller = bge.logic.getCurrentController()
owner = controller.owner

PROPERTY_TURNING = "turning"

#Sensors
leftSensor = controller.sensors["Left"]
rightSensor = controller.sensors["Right"]

turning = owner.get(PROPERTY_TURNING , 0.0) # get your model from storage

if leftSensor.positive:
    turning = turning - .03
if rightSensor.positive:
    turning = turning + .03

owner[PROPERTY_TURNING] = turning # update the storage with the modified model

own.applyRotation((0, 0, turning))

I hope it helps

+= is your friend. something like turning += 0.3 will incrementally keep adding 0.3 atop of 0.3 on and on until the script stops.


Cycles rendering dim lighting This has been going on for a while now but I just want to fix this.

I have a nice bright scene in the viewport, but then when I render it, it looks way too dark.

Here is the .blend https://drive.google.com/open?id=1a7bX40YrLo2u1lplQ9KYhogwmmlm3XqG

I downloaded i tried your mesh. Number 1, if possible use a surface below the object. That way a lot more light bounces and illuminates it. Number 2, you might want to switch your "Color Mangement - View transform - to Filmic (instead of film". Its giving nice results over hear.

Play with the Exposure and Color Management settings:


Vector math to get Curve object silhouette If you color ramp the Facing output of a Layer Weight node, you can make a mask of faces at glancing angles. This can be used as a material based silhouette mask for effects, or directly as line art.

Here is a curve beveled into a cylinder showing the effect working pretty nicely.

However, the effect doesn't work so well on larger faces, such as the sides of a cube, or down the length of this cylinder. In those cases, it shades the whole surface because it is all the same normal facing. I am trying to find a way around this problem.

I learned from this question that it is possible to use UVs and vector math to get a curve's direction. It seems it should be possible then to either use a similar method to get the silhouette of the curve, or use it to mask out of the Layerweight along the curve, or something along those lines. But I'm not strong enough on my vector math to figure out what needs to be done to make this work.

Anyone tried something like this before, or know what to do? Of course, it will only work on curve objects.

The solution is to calculate the crossproduct of the incoming and curve direction vectors. The absolute of the dotproduct of that and the normal is the facing which you can connect up to your color ramp.

Yeah, you want send the View Vector from a Camera Data node into the Normal input on your shaders.

I added Subsurf to soften it a bit.  Object masks often do better if they don't cut off suddenly, so that was the thought there.  You can tweak that if you want.

You may decide you don't need Glossy.
I thought it looked decent, but it might not be needed for your purposes.

Hope that's what you were going for.  Lemme know what'cha think.


Patch for Non-ASCII Characters My OS (WIN7) uses non ASCII characters in the file system. Doesn't have to, but does.

I know in general it's not a great idea, but some of my directories have names which use these characters.

Blender shows it all non-readable gibberish, which makes it pretty difficult to understand what directory I'm looking at.

Is there some kind of UTF-8 patch, or update to help out here?

Blender does display unicode (utf8 and latin1), try change the system user-preferences to enable 'international fonts'.

This loads a font with a wider range of characters that may display your paths correctly.

write arabic text in inkscape program.

from path menu in inkscape convert the text to path (first choice in
the menu).

save it as svg.

open blender then import svg file.

goodbye


Why doesn't the baked texture match with the render preview? I'm totally new to blender and I'm stuck looking for a solution to my problem. I want to bake the texture just like it is in the render preview. How can I do that?

Why is the one side darker in the bake than in the render preview? I am using Cycles and I want to use it in unity.

Here is the blend:

It's hard to answer this question because it will look harsh. But don't take it bad, it's only for giving you the chance to realize what 3D is so you can improve your knowledge and skill.

You can't start learning to drive and go directly to a formula 1 competition. It's the same in 3D.

You want to bake and use Unity but you haven't learn the basics (how to model something, how to unwrap...)

Your mesh is really bad, you have inverted faces, self intersected mesh, edge over faces, ngons,... try to learn what topology is about (quads, tris, ngons... why and when to use or not), even if it's just a hobby and you don't want to model like a pro you really need the basics.
The same for your unwrap, there are overlaping parts, in fact quite all is overlaping, so no chance at all to even have an acceptable bake.  And I don't speak about using it in Unity.

3D is hard at the begining but if you like it learn step by step, I swear, it'll really be easier than moving forward with a collection of crappy things at each level.

One more time, sorry if it looks harsh but I opened your Blend, and there is a lot to learn before going to the baking part.

If we really want something there is nothing we can't learn.

Edit:

Regarding the first point of my answer, the flaps (wings parts) have inverted normals, the small parts on the hood are self intersected, the wing is mostly a big really not suitable ngon.
The unwrapping part need to have different places in UV space (not overlapping), otherwise you'll end up with bake parts covering other piece of the mesh.
You have more marging parts than the bake itself, learn about resolution of baking image, if you have an image really too small like yours the marging take most of the picture and covers baked parts.

One more time, the question isn't about having a simple answer but about learning a bit more. Hope it can help peoples who start to learn 3D to not rush to "advanced" topics and make baby steps.

Finally done by adding light to the dark side, it seem the shadow which make it dark.


Extension of standard operator How can I add additional code for already existing operator? For example, I want to add into bpy.ops.wm.save_mainfile this string:

print("My code")

I know that I can override this operator by creating a custom one with similar bl_idname, but previous features (saving functions in this example) will be destroyed too.

Hope for your help!

Okay, after many time of research I found a quite enough answer on my question. I rephrased what I want and made the following things.

Custom operator

First I created a custom operator. It looks like this:

class SaveFile(bpy.types.Operator):
    bl_idname = "my_wm.save"
    bl_label = "Save My File"

    def __init__(self):
        print("It is working now")

    def execute(self, context):
        try:
            bpy.ops.wm.save_mainfile()
            print("My code!")
        except RuntimeError:
            print("ERROR: Can't save file!")

        return {'FINISHED'}

    def invoke(self, context, event):
        return self.execute(context)

After that I registered it:

bpy.utils.register_class(SaveFile)

Invocation

In the places, where I want to execute my custom code, I use this:

bpy.ops.my_wm.save()

Hope that it will be helpful for somebody else.

try to Going back.to ,>mainfile>findfilefolder>
/export// mainfile..<
/<
~resavefolder:>
(i hope this helps you.)


Is there a fast way to render an obj+mtl file to PNG I'm using command line blendering an obj+mtl file to PNG this question. However, it takes 2 seconds to render a scene.

Is there a faster way to do so? Because, I need to render hundreds of output with the same scene, different texture?

Generally, my task is to render hundred of output every time user put a new logo on a t-shirt model on web interface, so I need a quick rendering method.

Here is my updated blender file .blend and with_texture.blend

Follow @edna suggestion, I have turned off anti-aliasing. It still takes ~2s to render.

bpy.context.scene.render.use_antialiasing = False

Here is my output for rendering

We can't help you without knowing what it is in your scene that is taking the time. Two seconds is almost nothing, so presumably it is a very simple scene and rendered using the Eevee or Internal engine.

Simplest answer is to lower the resolution. Beyond that, I would suggest that this question would be better on BlenderArtists, where there is more room to discuss things like render settings and their impact on the final image.

Regardless, I suggest you post an example file here: PasteAll.org

Have you heard to talk about E_cycle? It's 7% faster than the regular release but this build is only useful if you use multiple GPUs in your PC.

You can find it on Gumrod or on Blender market, but for a better result, you have to download the last Nvidia content creator driver that has excellent performance with the last RTX GPUs.


Ugly Shadows On Model? I was trying to create a low poly model and the shadows on her hair look pretty bad. They look fine on the rest of the body. I'm sure it's a modeling error on my end, but I'm not really sure what I'm doing wrong.

Here is an image:

Here is the blend file: https://drive.google.com/file/d/1iVsAB1jhIeeZM4LSjsm5mwWmVu2pLkuQ/view?usp=sharing

Any advice or help would be appreciated.

You need more geometry to have a smooth surface.

If you add a subsurf modifier the problem goes away.

Select the Sun and change it to a Hemi in the Lamp settings. That will give you better shadows.


Script that supposed to change value of the text is only working on viewport I have a text object and a scrip that takes an int value from custom property and applies to the text.
The script works in animation preview (User Perspective), but then it comes to rendering script isn't being called out to change value.
import bpy

scene = bpy.context.scene
TextObject = scene.objects['TimerText']
#function that formats string
def TimeCounter(scene):
    value = TextObject.data['time']
    min = int(round(value/60, 60))
    sec = value-(min*60)

    TextObject.data.body = 'Time ' + str(min) + ':' + str(sec).zfill(2)

bpy.app.handlers.frame_change_post.append(TimeCounter)

I looked at other results and I applied their examples to my code.
I added this variable in my TimeCounter function, that gets evaluated value from custom property.
eval_text = TextObject.evaluated_get(depsgraph)
and also changed def TimeCounter(scene): to def TimeCounter(scene, depsgraph):
And in the end this script was here to recompile the results,
    bpy.app.handlers.frame_change_post.clear()
    bpy.app.handlers.frame_change_post.append(TimeCounter)

def unregister():
    bpy.app.handlers.frame_change_post.remove(TimeCounter)

if __name__ == "__main__":
    register()

It also works without this long code.
bpy.app.handlers.frame_change_post.append(TimeCounter)

Here's full working code:
import bpy

scene = bpy.context.scene
TextObject = scene.objects['TimerText']

def TimeCounter(scene, depsgraph):
    eval_tex = TextObject.evaluated_get(depsgraph)
    value = eval_tex.data['time']
    min = int(round(value/60, 60))
    sec = value-(min*60)

    TextObject.data.body = 'Time ' + str(min) + ':' + str(sec).zfill(2)
def register():
    bpy.app.handlers.frame_change_post.clear()
    bpy.app.handlers.frame_change_post.append(TimeCounter)

def unregister():
    bpy.app.handlers.frame_change_post.remove(TimeCounter)

if __name__ == "__main__":
    register()


Rice meme simulation I am trying to simulate the "rice challenge" that is the latest meme with them kids, see this youtube video for a fun example.
This is my best result so far:
  (Video: https://i.imgur.com/KxlzB84.mp4)
which isn't quite there yet.
Any general advice on how to approach this? A particle system is the obvious solution but I'm struggling to make it work.

here the "long story short" - so i assume you have some experience with BLender.

make a text

convert to mesh

remesh modifier

add particles, tweak some settings

add plane with collision, tweak some settings

rotate text mesh so that is lies horizontal on the plane

animate the plane with location movement to positive z axis and some rotation on x axis

enjoy your rice challenge animation

Result: https://youtu.be/wAtmM0UhLQo
Video tutorial: https://youtu.be/sz-6LapA_yk


Background environment texture not rendered in viewport or final render How do i make this visible?.

Every tutorial I see, it is automatic. But my scene is not mine, aparently they made it invisible, but I want to see how it is positioned and I need it to be displayed in the viewport with rendered option on.

Your environment is disabled.

Check your scene settings, "use environment".


Steel material nodes in blender I would like to apply a steel material to plate &fork which i have modelled. Doea anyone know nodes for thos kind of material?

This Blender Artists thread has some great ideas. One of the best (created by IkariShinji) produces Img 1's result using Img 2's node setup. A decent scratches map can be found by Googling "scratches map."

Img 1:

Img 2:


How can I make a desert with sand that interacts with a car? I want to make a scene with a car in a desert, starting off on pavement then going to sand. How could I make the sand "kick up" behind the car, on the pavement and on the sand? And is it possible to have it leave tire marks in the sand? I have pretty much no clue how to do this. I was thinking maybe a particle system with rigid body. This is pretty much what I want https://www.youtube.com/watch?v=8GaBm26mUMM.

I have seen your Question and the video you have provided. Your first question is that whether it is possible to create that kickup effect. The answer is yes, but not the way you thought. You can't actually use a particle system for this one. For this, you need to use a smoke sim. They are easier to control and are way better. But I am warning you, YOU_ARE_GONNA_HAVE_A__BAD_TIME.
As for the tire tracks, that would probably need the particle system or some sort of addon like the molecular script. To create the dust simulation, you have to do this. Delete the default cube because its only purpose was to get deleted. Next, add a circle and flip it to be straight like this:
                               |
                               |
                               |

Next, go to the particles tab and create a new particle system. Go to End and set it to 1 and set the lifetime to 3. Next, go to velocity and set the speed to something like 10 m/s or something you prefer, and set randomize to 3 or something higher than 1. Next, use quick smoke and it has turned into a quick smoke simulation. Do you think I am done? No, I am just getting started.
Now, click on the emitter, click on the physics tab and select the flow source as the particle system. Next, select initial velocity. Now click on the box thingy and go to settings and set the resolution division to 120 or higher or lower depending on the quality you want. Set the time scale to the minimum value as a dust sim is a slow sim.  Now as you want a dust sim, it is pretty clear that you want the dust to rise, but no so much, so set density to 0.2 in behavior. Next, skip to Vorticity and set it to 4, the maximum value, as dust swirls a lot.
If you want ultra high resolution, select a high resolution for a very high-quality dust sim.
For more realism, add a turbulence force field behind the emitter (the circle) and play with the noise for how much strength you want. I recommend going very high because dust goes very long. Now click on the black box and select dissolve and set time to a very high number because dust takes a lot of time to dissolve. Select adaptive domain. Next name your simulation cache whatever you want and bake the simulation if you are happy with your sim. Next,
go to shading and add a volume info node. There, pick density and attach it to density in the principled bsdf density. If you want more naturalism, add a math node and set it to multiply, and set the value to some large number like 30 or anything depending on the visibility of the dust. Keep in mind the math node should be in the middle of the volume info node and principled bsdf node. Set the color to whatever you like but I would recommend setting it to the hex code #C0A080, the literal color of a dust storm.
Next, you have to render this out obviously so you can render it on your computer if it is beefy, watch it burn if it is weak, or what I suggest, send it to a render farm like fox render. Please don't strike me for spam as I am just suggesting a name. You have your dust sim ready. As for the tire tracks, I would say use an addon, as the molecular script addon. Please note that you don't necessarily have to use the values in this answer, you can mess with the values as you prefer. I will be sharing a video link. It is mostly for reference and I would recommend going with the answer than the video. (Please don't strike me for a huge wall of text.)
Here's the link:
https://www.youtube.com/watch?v=sNHIdcjhJT4
Hope it helps.


Tube Deformation Animation with Pill Passing Through I'm making a medical video featuring a robotic pill passing through the human digestive tract. The animation features the pill sliding down a cross-section of the esophagus and small intestine. I'm wondering if anyone has an idea of how I would create the deformation effect of the pill pressing against the wall of the tube. For example, the pill is larger than the diameter of the tube, when when the tube is relaxed, but when the pill passes through, the tube stretches to fit the pill as it slides through the tube. I'm trying to find a more procedural way of going about this to avoid shape-keying the whole thing. Any ideas?

I looked up the Dynamic Paint approach that @vklidu cited and it worked very well. Blender 2.8+ changed a few things, which actually made this task easier. There's a displacement option directly in the canvas settings for the object, and when everything's set up right, it works great, and procedurally, is flawless.


Does Blender no longer support Make Human file format? Does Blender no longer support the use of Make Human file format MHX1?

The file type is changed from mhx to dae and the mhx file type no longer shows up in Blender as a supported file type. I mention this as I see some creators
point out the changing of Blender settings in their tutorial videos that no longer match the current configuration and it makes it more confusing .

The MHX1 format is extremely old and has been deprecated (in favor of MHX2) for many years. MHX1 should not be used, and no modern version of MakeHuman supports it.

Contrary to MHX1, MHX2 is an add-on that needs to be installed. It is not bundled with Blender.

How to get MHX2 support is answered in a MakeHuman FAQ, see http://www.makehumancommunity.org/wiki/FAQ:What_happened_to_the_MHX_export_in_MH_1.1.x_and_later%3F

Quick summary:

In a Blender + MakeHuman 1.1.x setup, you need to install MHX2 from https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/overview
In a Blender + MakeHuman 1.2.x (currently in alpha) setup, both the MH side and Blender side of MHX2 are shipped with the MakeHuman zip.

As pointed out on the Blender side ,left click upper left corner for scroll down menu .pick user preference ,Ctrl\alt\U ,go to center tab user panel,
pick add-ons, add files and activate with check , save user preference , go to
makehuman side find plugin folder add plugins.have loaded the files into 3
zip files per file  in a master file for Blender and MH side for anyone that wants them and are having a problem getting them just email me ,they cover MHX2 and DAE , thanks all.


How to properly create hollow text letter suitable for 3D print? I am doing this project, where the objective is to print some hollow letters. I get to the following result with the spets that I took, where the objective is to make the letter 5 mm thick, with walls and bottom being 1 mm thick.

Steps I took:

I wrote a specific letter, resized it to proper size.
Then I apply extrude (5 mm) and set fill to BACK in the type settings.
I added Modifier (Solidify), with thickness 1 mm to the edges. Checked boxed: flip normals, even thickness and fill rim. The result so far was this.

Then i converted text to curves and then to mesh. I mirror the letter for printing.
I get a lot of intections (intersect face) and overhang face errors as seen below.

What can I do to fix this and is there another way to get the same result that I don't know of?

To create a hollow letter :

create a new project and remove the cube
Add a text object
press TAB to enter Edit mode
change the text to the letter your want
press TAB to exit Edit Mode
press ALT + C and select "Mesh from curve/meta/surf/text"
press TAB to enter Edit mode
press A to select all vertices
press E to extrude to the alf of the final letter depth
press Shift + S and select "Cursor to selected"
press X to delete faces
press TAB to exit edit mode
select menu "Object / Transform / Origin to 3D cursor"
add a solidify modifier
change the thickness
apply the solidify modifier
press TAB to enter edit mode
change the view to Front Ortho (5 1)
press Z to change to Wireframe display
press B and draw a border to select faces on the top of your letter

press X and select "Faces"
press Z to come back to Solid display
press TAB to exit Edit mode
add a mirror modifier
select the proper option X/Y/Z (unselect X and select Z)
apply the mirror modifier

I have seen some tutorials for cleaning up the mesh on converted text by using the Remesh modifier to create an even grid mesh.  Might be worth a try at one of the earlier stages after converting the font.  Be sure to uncheck "Remove disconnected parts" and play with the octree depth to see if you can get something workable.

Here is a vid showing its use on a single character. https://www.youtube.com/watch?v=PEt07reVhJ0

Added:

I just ran across this video https://youtu.be/QxDOhxjdFOs

The first part of it shows a way to make text with very clean geometry.

Hopefully one if these ideas will help with your project.


how to turn a square into a circle in 2.8 In blender 2.79 there was an ability "to circle", i believe, that took a series of vertices and made a circle with them. i am not finding that ability anywhere in 2.8, is it gone?

You're looking for To Sphere.
Go into Edit Mode, select the vertices you want to change, press Shift+Alt+S and move the mouse till you get the shape you want (or use the menu Mesh > Transform > To Sphere).

LMB  to confirm changes, RMB  to cancel.

You have to activate an addon called loop tools.


Black lines where a transparent mesh intersects I have a simple piece of geometry with a cloth simulation on it (a tube). I have a second piece of geometry rigged to it with a bone chain. I need the cloth simmed piece to not render, so I made it fully transparent. However, in areas where the two pieces intersect, I get black lines. How do I prevent this?

Normally I would use a mask modifier to hide the simmed geometry, but that causes the bone chain constrained to it to get messed up as the geometry it is constrained to no longer exists.

Disabling rendering of the cloth object entirely isn't an option as other parts of it need to render, and it's running off a mesh cache, so I can't alter the object.

Up the Max bounces under Render > Light Paths > Transparency to a high number, even numbers like 48 or higher. The more overlapping transparent surfaces there are the more likely to get black artifacts if the transparency bounces isn't high enough.
If that doesn't work, perhaps check the normals aren't getting inverted mid-way, but it's likely the former.

You could also disable the cloth rendering completely by unticking everything under the Object Panel > Cycles Settings, which should speed up the render.

I am speaking for Blender 2.82. Under Render Prop.>Light Pass>Max Bounces I raised the transparency bounces a bit and it cleans the artifects well for the hair meshes I am working on.


What is the best way to learn Blender? I have no prior experience with graphics at all. I only found Blender useful and interesting, and as a result, started trying to make use of it.

I want to master skills like modeling, animation and texturing.

What will be the best way to learn and master this very good tool? Are there any resources that would be useful?

As a beginner myself, I think the best way to learn blender is by trying to model something you find interesting. That way, you're going to know what you want to do, and then know what tutorial you should search on the internet.

Because only following tutorial from chapter 1 to end is going to be boring, if you don't know what you want to make or project based.

Just try to model something, and when you don't know how to do what you want to do, google it. I've come pretty far compared to when I was starting by using this method.

I would recommend the Blender for Beginners tutorial by Blender Guru (free on youtube) it is sometimes a little bit old fashioned (for example he doesn't use the Principled Shader there) but it's very very good and he is explaining literally everything - from modeling to materials.
So another good course I did and found useful was Environments on Udemy by Rob Tuytel - long, but cheap and you can learn much more advanced stuff. Like building a complex building and roads.
Also rule number one! Always do something for yourself - this way you ask questions and search the answers ;)


VSE script for to add constant gaps between strips? How to add equal distance between the selected strips ?

Is there a script to access strips it will be great ?

Note: The I am aware or Shift + = to remove the gap between strips
I want to do the reverse of it I want to add equal space

I turned your question into one of my example scripts.  I'll include it inline because that's how stackexchange works:

import bpy

def gap_strips(strips, gap):
    strips = sorted(strips, key=lambda strip: strip.frame_start)

    cleanup = []
    for i in range(1, len(strips)):
        st0 = strips[i-1]
        st1 = strips[i]
        cleanup.append( [ st1, st1.channel ])
        st1.frame_start = st0.frame_start + st0.frame_final_duration + gap
    # blender's anti-overlap code might change the channel.  put it back.
    for x in cleanup:
        x[0].channel = x[1]

def gap_selected_strips(gap):
    gap_strips( bpy.context.selected_editable_sequences , gap)

gap_selected_strips(15)

Improvised from @Mutant Bob script. Thanks @Mutant Bob
the perpose of this script is to add a same amount of gap between all the clips or reduce the gap with same amount
Please select all the clips before running the script
import bpy

def gap_strips(strips, gap):
    strips = sorted(strips, key=lambda strip: strip.frame_start)

    if ( gap > 0 ):
        for i in range(len(strips)-1,0,-1):
            st1 = strips[i]
            st1.frame_start = st1.frame_start + gap*i
    elif ( gap < 0 ):
        for i in range(0,len(strips)):
            st1 = strips[i]
            st1.frame_start = st1.frame_start + gap*i
    elif ( gap == 0):
        for i in range(1,len(strips)):
            st0 = strips[i-1]
            st1 = strips[i]
            print(st0.frame_start + st0.frame_final_duration,st1.frame_start)
            st1.frame_start = st0.frame_start + st0.frame_final_duration

def gap_selected_strips(scn, gap):
    gap_strips(
        [strip for strip in scn.sequence_editor.sequences if strip.select],
        gap)

gap_selected_strips(bpy.context.scene, 20)


Confusing problem when I'm trying to mix Diffuse with Glossy shader Alright, so I have a confusing problem when I'm trying to mix together a Diffuse and a Glossy shader. To be more precise, this is how the scene I'm trying to create looks like with only the Diffuse shader active:

Then, when I'm adding the Glossy shader, it looks like this:

Is this normal? I mean, it seems to work somehow, but why is everything grayed out? I mention that I have a specularity texture that I'm using on the factor socket on the Mix shader. This is how my node setup looks like:

The only way (that I know) to fix this issue is to connect the default image texture (the one that I"m using for the Diffuse shader) to the Glossy shader as well. But from what I learned so far this isn't a good practice.

Am I doing something wrong or that's how it is supposed to look like? Is this the correct workflow?

I've tweaked a lot of settings here and there and I'm thinking that maybe I've messed up something. Do you have any clue on what's going on? :)

Thanks!

The problem appears to be that you're trying to apply techniques common to older raytracing software like Blender Internal to a physically-based rendering engine - cycles in this case.

It's a real problem if you come from a world of specular maps, shadow maps, bump maps, displacement maps and so on.

Some of these maps are simply there to help the fake the look of objects in the real world. Indeed, I use maps in my own ubershader which allow me to include metals, paints, glass and even holdouts all in a single (albeit complicated) map image.

It's really hard to wrap your head around physically-based rendering, but once it clicks, you won't want to go back to the old methods.

For basic specularity the following:

The two shaders - diffuse (also called albedo) which is your colour and only the colours.
A mix shader to make sure that the light leaving the scene does not exceed the amount of light entering it.
A fresnel node to keep the mix looking as it should.

Try a setup like this:

and experiment with the IOR value in the fresnel node: values below 1 are not physically accurate and values above 2 are getting outside of a reasonable range too - but you can use them if you like the effect!

That's really all there is to it. You can feed the colour input of the diffuse node with your image and let Cycles do the rest.

If you're doing metallic objects, remember that they don't have any colour of their own (by and large) and get everything from their environment. There are a few exceptions like gold, but metals are so hard that pretty much all light bounces right off them. There are also fresnel effects for a very few metals such that the fringe around the object (a sphere is great for experimenting on) changes colour.

You can see these effects here. An IOR of 1.25 gives a nice effect (and is reasonable for objects like this but as we push it higher you can see how the light appears to creep around the edges. When I push it to ridiculous levels (5 in the example) you can see the entire surface looks unreal.

One area where you might want to use a specular map (or at least, the equivalent) is where you have a wet surface such as a road with puddles. The puddles are reflective and the road is a dielectric (a fancy word for non-metal).

I get around this using the fact that the colour in real-life is limited so that no colour should be darker than 20% or brighter than 80% (0.2 to 0.8 in your Cycles engine.)

This allows you to cheat by putting areas of 100% white or 100% black on the image and then filtering using a value node to switch to a different shader group.

Here's a simple node setup - not that where I've used a chequer texture to make the effect visible, you'd plug in your albedo/specular map and area that's 100% black or very dark using these values, gets the glossy treatment. I left the fresnel out of this to keep the node setup cleaner.

and the result:

I think the problem with your material setup is that it's missing Fresnel (surface is more reflective at grazing view angles).

Good tutorial on how to correctly setup physically accurate materials by Andrew Price: https://www.blenderguru.com/tutorials/pbr-shader-tutorial-pt1/


"No layers in render result" - please help :( I'm at my wits' end. I did an animation which was quite a lot of work, then rendered it, disliked it repaired the mesh cause it was all out of shape. Next time I tried to render the animation, I got the "no layers in render result" message and Blender hasn't been able to render even a single frame ever since. First they were all black, now they're all empty. I checked other files which render without problem. I went back to factory settings but still no render so I guess the file bugged out. How can I rescue my mesh, rig and animation? Can I export them somehow?

I have v 2.76 and it never had a problem like this. When I rendered the animation, I followed this tip: How to save animation as a video format

Help please. :(

Ok, I uploaded the file. For some reason, the date doesn't get saved properly. I edited it yesterday and today but the date is still March 6.

Yes export your file as obj, you have options available to include the animations and other datas


Displacement node doesn't show up on mesh correctly After looking online the past hour, I decided to make a post here. I am having trouble where the displacement in my render view is extremely different than the one in the material view. After looking online for tutorials and such, I always end up with the same problem too. I'm using Blender 2.79. Photos below

Material View

Render View

Nodes

Material view does not support actual mesh displacement, so you're just seeing your displacement map approximated as a bump map. Unless your displacement has a very small scale, a bump map approximation will be very different from the final displaced mesh.

I find that using displace modifier is a better way than using the node. In this way, you can adjust the strength of the displacement map.


How do I re-link the video of a project when editing on a different computer? I know this is asked a lot but the answers i found haven't worked. I recently made a speech on a different laptop using blender 2.78 and then i sent the file to myself in an email and downloaded it onto my macbook pro. But for some reason when i try and watch the video in blender nothing is appearing. I've been trying to rebuild the proxies and everything else but nothing is working. I have audio in it as well that's not playing. Any suggestions?

Yu could try packing it into the blend file. I dont have 2.7x anymore but I think it is File->External Data->Pack All Into .blend