text:
Create background quickly?
So I've modeled a simple ufo and now I want it to be in a scene of course. So I don't want to just have the object in blank space, but an environment (background) around it. Now, I'm asking if there's a way to do that quickly or do I have to model the whole environment too? Is it possible to just set up an HDRI? Until now it just looked fake when I tried that. Please note I'm not talking about the lighting, but the objects behind the "main object", so the environment.
Thanks for your help. I searched for over an hour on this site and on youtube. But I also tried around in blender.

Example background. I'm talking about the rails, the trees,...

you can use HDRI, you can model objects, you can also project some textures on some planes

The easiest way to do this is to change your world shader to one that uses High Dynamic Range images (HDRIs).  There are many sites online that provide high quality HDRIs and you can find them by searching for "free HDRI" in your favorite search engine.
There are two steps to this.

Download the image from a web site.  Each site will have its own instructions but usually it's simply 'download image'
Change your world shader to use the HDRI as the lighting source.

go to the Shader Editor
In the header change from Object to World

Enable Use Nodes

Enter this shader:

Note: I've already added an HDRI, so you can't tell, but the node with the orange header is an Environmental Texture.

Click on the folder in the environmental texture and navigate to where you downloaded the HDRI.  Select it.  It's a good idea to create a folder where you store HDRIs and always select your HDRI from that folder.

Switch the Shader Editor back to Object so you won't be confused the next time you edit a material.

Explanation of the node group
The first two nodes are a Texture Coordinate node and a Vector Mapping node.  Together they allow you to change what part of the HDRI is behind your object from the Camera's viewpoint.  Changing anything but Z Rotation will distort the HDRI, but changing the Z rotation is a common technique.
The next node is an Environmental Texture. This is the node that changes the image into a form that can be used as a Background.  It has 5 imput fields:

The image name, already mentioned.
Texture Interpolation.  Leave this as Linear
Projection Type. HDRI images come in two formats, mirror ball, or the more common Equirectangular.  Unless the site describes an HDRI as being a mirror ball, leave the setting at Equirectangular
Where the image comes from. Leave this as Single Image.
Color Space. Leave this as Linear

The green node is a Background node.  This converts the output of the Environmental texture into a light source.  The Strength Field sets how strong the light is.
The final node is the World Output node.  It simply tells the render engine that this is the world lighting.  Leave the one setting at All for an HDRI

One of the easiest ways:

download this free add-on here: https://codeofart.com/easy-hdri-2-8/ and install it

Create a folder named "HDRI" on your computer.

Download free HDRIs here: https://polyhaven.com/hdris and store them in your HDRI folder

tap on "rendered":

tap on "Easy HDRI"-tab here

Tap on "create world nodes"

tap on the folder button and choose your hdri-folder

then tap right in the middle of the image to choose the hdri you like

enjoy your objects right in the middle of you HDRI

Note: what's pretty cool about it that you can

change the sun strength (bit similar to changing strength of light)
change the sky strength (same, but sky)
change rotation, so you even can change how the light is coming into your scene

... and all for free :D

Thank you very much! One question though: Can't I do that without the addon? Just install the HDRI, go to shading tab, switch to world, open HDRI, press Ctrl+T when Node Wrangler installed and then change rotation?

Yes you can do it without an add-on.  I'll add an answer with a step by step for that.

of course you can - but i think the add-on makes it much easier. I use it a lot.

Thank you! But how can I really make the object fit into the HDRI? The HDRI is way too big and I can't find a way to scale it down?


text:
How to get correct context in animation nodes script
I am trying to apply Set Inverse on all the ChildOf Constraints on the armature, using animation nodes Script Node in blender 2.82.
But when triggering the script I get only this error:

How can I fix that issue?
import bpy

if inverse:
    oby = bpy.data.objects['metarig2']
    bpy.context.view_layer.objects.active = oby
    pbones = bpy.data.objects['metarig2'].pose.bones

    for pbone in pbones:

        isConstraint = False
        if len(pbone.constraints)>0:
            for const in pbone.constraints:

                if const.type == "CHILD_OF":
                    context_copy = bpy.context.copy()
                    context_copy["constraint"] = pbone.constraints["Child Of"]
                    #bpy.data.objects['metarig2'].data.bones.active = pbone.bone
                    bname = pbone.bone.name

                    bpy.data.objects['metarig2'].data.bones.active = bpy.data.objects['metarig2'].data.bones[bname]
                    bpy.ops.constraint.childof_set_inverse(context_copy, constraint="Child Of", owner='BONE')

    bpy.data.objects['metarig2'].select = False
    activ = bpy.data.objects['metarig']
    bpy.context.scene.objects.active = activ

The canonical answer requirement was set by mistake, the bounty was set to draw more attention.

Then you launch script from AN, bpy.context doesn't include active_object anymore. So, I suggest creating context object from scratch, just 2 elements are necessary:
context_py = {
    "constraint" : const,
    "active_object" : rig
    }

This code works for me (but constantly resetting Inverse makes weird result):
import bpy

if Inverse:
    rig = bpy.data.objects['metarig2']
    pbones = rig.pose.bones

    for pbone in pbones:
          for const in pbone.constraints:

                if const.type == "CHILD_OF":
                    context_py = {
                        "constraint" : const,
                        "active_object" : rig
                        }

                    bpy.data.objects['metarig2'].data.bones.active = pbone.bone

                    bpy.ops.constraint.childof_set_inverse(context_py, constraint="Child Of", owner='BONE')

I think what happens is that in blender 2.8 it needs first to clear inverse and then set inverse to avoid weird behavior. I will test it when I'm back home.

Works perfect, I just added childof_clear_inverse before childof_set_inverse line to avoid weird behavior.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How to apply list of rotations to multiple bones using animation nodes
Currently I am  using Expression node to apply rotation to a single bone, is there a way to apply a list of rotations to multiple bones using a single Expression node? I have tried everything, but this expression doesn't accept lists
The order of rotations and the bones is the same.

While it is not encouraged, you can technically use list comprehensions as follows. A list comprehension takes the form:
[element.attribute for element in elements]

element.attribute has to be an actual object, thus writing an assignment operator instead like bone.rotation_quaternion = quat won't work, because assignment operators won't return anything. However, if you used the setattr() function, it will execute and return None. In conclusion, you can write the expression as follows:
[setattr(bone, "rotation_quaternion", quaternion) for bone, quaternion in zip(object.pose.bones, quaternions)]

If you want to assign the quaternion only to the bones at the indices defined by an integer list, you would use an expression as follows:
[setattr(object.pose.bones[i], "rotation_quaternion", quaternions[i]) for i in indices]

Instead of looping over the bones and quaternions themselves, you loop over the indices and get the bones and quaternions at the current index.

If you quaternion list is masked based on the indices, then you should loop over the quaternions directly as follows:
[setattr(object.pose.bones[i], "rotation_quaternion", quaternion) for i, quaternion in zip(indices, quaternions)]

Thank you Omar, bone can be an index or bone name lists, right?

@Denis No, bone is an object (Python object). Your inputs to the expression node should be 1. object: Your armature. 2. quaternions: Your quaternion list.

That works perfect, but how would I modify the expression if I want to filter the bones?

@Denis What do you mean by "filter the bones"? You want to apply the assignment to only a number of specific of bones? What should define whether a bone should have an assignment or not? Based on its name? A boolean list? A list of indices?

I apply the rotation to specific bones and use a list of indices, for example: [2,3,4,7,8,9]

@Denis Edited the answer.

What I mean is that the list of rotations should apply to the filtered bones.

@Denis Edited the answer, check the documentation for the expression node. There are some information about list comprehensions.

Thank you, thats what I needed, I will check the documentation.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to calculate a difference between current and previous location vectors using animation nodes?
In my node tree I have a location vector that is streamed from a sensor, how would I calculate a difference between current and previous location vectors using animation nodes?

The velocity? How is this location vector defined? Parametric equation, Fcurves, ...

Possible duplicate of Animation Nodes and Velocity

@OmarAhmad I don't have Fcurves, the vector is a realtime data that is coming outside of blender.

So you are parsing some file containing the location vectors and you want to compute the difference between vectors across frames? Can you share some more information about your setup?

@OmarAhmad No, the vector data is streamed from a sensor

I see. Will write an answer now. Can you add this information to your original question by editing it?

This answer is based on my other answer about passing data between executions in Animation Nodes.
We store the vector list received from the sensor in memory by storing it in an attribute in the AN python module using this command:
AN.sensorLocations = sensorLocations

At the next execution, if we get the data at AN.sensorLocations it will be that of the last execution. And thus, if we subtract it from the data received from the sensor we will get the information we want. So, the node tree is as follows.

Where the output of the subtract node is the output we require. To avoid any confusion due to order of execution of nodes, we use the output of the subtract node as a dummy variable (A non used variable) _ in the expression node that stores the data. This ensures the subtract node executes before the expression node.
The initial execution will face an error due to the fact that there is no data in AN.sensorLocations, but this error disappear at later executions which is fine in our case because the sensor provide an up-to-date information about the location.

You can also use the reassign parameter feature in the loop, which behaves the same way.

@zippy We are talking about moving data across executions, not in the same one. Loops are useless in that regard.

@OmarAhmad I misunderstood.  When OP wrote "vector data is streamed from a sensor" I thought AN would be running/looping to respond to live data.


text:
How to fix outdated internal index table in an addon
I downloaded Blur Weights addon, since it was made for blender 2.63 it is giving an error in blender 2.74 when trying to use it.

Why does this error happens and how can it be fixed to make outdated addons to work with newer versions of blender?
Addon link

https://github.com/assumptionsoup/Blur-Weights/issues/1 someone has already offered a fix in the addon's issue tracker, you can apply the fix locally. or try the fork: https://github.com/zeffii/Blur-Weights

This was added to speed up scripts. The Blender 2.73 release notes mention it and reference the commit that introduced it (in the Python API section)
A backwards compatible solution is the following addition before any code that accesses bm.verts / bm.edges / bm.faces indices explicitly. For clarity, that means if an addon has any code like this:
bm.verts[i]
bm.edges[i]
bm.faces[i]

Then preceding it must be a call to ensure_lookup_table. Often you'll only need to do one such call, and you'll want to stick it outside of any tight loops if possible.
if hasattr(bm.verts, "ensure_lookup_table"):
    bm.verts.ensure_lookup_table()
    # only if you need to:
    # bm.edges.ensure_lookup_table()
    # bm.faces.ensure_lookup_table()

If you add new verts / edges / faces to the bm, and then subsequently do an indexed lookup you might find that you need to call ensure_lookup_table again.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Temporary animating physical objects
I am looking for a way to control physical objects, preferably with an armature, where the bones have variable influence from 100% making objects follow the bones and 0% where physical objects unaffected by the armature.
I have tried to enable Animated option in the rigid body settings, but this does not give an option for a variable influence and the objects jump back to the original position when Animated option is enabled.

Same problem occurs while using object constraints, when the influence changed to 0, the object is displaced to the original location and not following the inertia.
I also have tried applying force to the bone, but then it is not possible to clamp the object/s to the bone/s location.

Do you need to animate the bone to meet the physical object? When the animated checkbox is ticked the object comes under the influence of the armature again so it goes to wherever the bone is.

@d8sconz I need a gradual influence between the bone and the physics, lets say 1 is 100% following the bone and 0 is 100% physical object, and in between the object behaves like its connected with a rubber string.

Look into constraints, they have an influence property that can be animated like this: Keyframing Constraints - Is it possible?
For example you could animate an empty object, and constrain your body with "Copy Location" constraint to it.

I have tried that already, the problem with object constraints is that when the influence is changed to 0 the object falls down like it was in the original position and not following the inertia.

I am not sure that I fully understand what you want, but if you want inertia, you can achieve it by adding more keyframes, like here: http://blender.stackexchange.com/questions/5100/how-can-i-add-motion-to-a-rigid-body

What I am trying to achieve is to make possible to morph gradually between a state where the objects have a physical behavior to a state where the objects clamp to position and rotation of a bones, or vice-versa.

You can mute all the selected channels (Shift W) in graph editor, then you can disable the armature modifier in viewport. This should make the animation start then stop.
If you want truly variable animation, consider using the Blender Python API

There is no such thing as 50% physics.  Or 33%, or 99%.  There is 0% and there is 100%.
You can smoothly interpolate between the orientation given by physics and the orientation given by armature.

Here I have an object linked to an armature, where I can make a bone copy the transformation of a falling rigid body cube more or less closely.
But from the sounds of it, that's not what you want, because when I reduce the influence, the cube will bound back up.
Once you disable physics, you no longer have memory of what has happened-- there is no inertia without physics.
But you can animate physics parameters.  You can animate gravity, for example-- a rigid body without gravity will have inertia, but it will not fall.
You can also create rigid body constraints, with parameters that you can animate.

Here I've got my main cube linked by a rigid body constraint to an animated rigid body (which probably should be set to not render), which is parented to a bone.  Because the constraint's settings are so strong, my rigid body basically follows the bone, and I can animate or drive the strength of those constraints.
During periods of the animation when the constraints are weak, I can move the controller close to the cube without affecting it.  If I don't, making the constraints strong again will just suck the cube back to the bone.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Why are game engine properties changing 1 tick late?
When I pull out a weapon (weapon-switch), a prop ("Timer_Activate") is set to 10, the number of frames for the weapon-switch animation. If you swap weapons, it will set the prop to 20, and the prop will drop every tick by 1 till it reaches 0. Once the prop is at 0, you can fire. The problem is, if you swap between a weapon, and you hold the fire-button, you will fire 1 bullet before the prop turns into 20. This happens all the time and can be a cheat to gain fast-firing weapons. How can I fix this "lag"? Any help is appreciated. Thanks!
Use my .blend to see the issue firsthand:
Press 1 or 2 for any of the 2 weapons, and make sure you are holding down left-click as you are swapping, you will fire 1 bullet, then the animation plays and the timer is set to 20.
If you cannot download the .blend or can't find the issue, be sure to check out a gif of the problem here. (The gif is slightly modified but you can still see the issue.):

Wouldn't it suffice to set it to 46...?

@someonewithpc I agree that it should be closed as either unclear, or too localized; however even mods can not close a question with an open bounty.

It would help if you posted your code or .blend, without which we don't have much hope of debugging the problem..

@gandalf3 I am using logic bricks, so I don't have any code. I heard that logic bricks sometimes need 1 tick to do an action. This might be the problem. Is this true?

@blackhole We want to be able to help you, but this becomes difficult when you don't cooperate with us. It's okay if you don't want to share a .blend you put lots of your own time into (thats completely understandable), but if that's the issue you can just say so. Restating the problem in bold isn't going to help anyone. Take a moment to look your question from the point of view of someone ready to donate their time to debug and answer it. Would you want to spend your time on this question? Or would you rather answer a question which is asked respectfully and includes extra info you ask for?

Communication is important. If there is some issue you are having with the site's policies or features, you are encouraged to bring it up on meta.

@gandalf3 I'm working on a .blend but it seems confusing to understand.

Problem
The problem was that, your integer property Timer was still equal to 45 when the weapon was switched, for exactly one logic tick, allowing a shot to escape. Then, one tick later, the message actuator could deliver the message to assign the property Timer to 0.
Reason
The message system actually takes one logic tick from the time the actuator receives the positive pulse from the controller, to the time when the message sensor on the receiving end receives the message and sends the positive pulse to it's controller(s).
How to fix it
I have un-checked the the check boxes on all of the logic we aren't using so it will be easier to see the necessary change. (re-check them before testing)

Your end result should look like this, only without the actuators on Active_Determiner
Essentially, all you need to do is Delete the logic bricks marked by a red box, and connect the bricks where the Blue lines are.
This will completely cut out the message system, (and the one-tick delay) and directly connect the bricks instead.

result:
It works! - yay!

If you didn't understand that, don't feel bad (logic can be confusing.) here is the blend file in case you did get confused.

I knew this was the issue! Thanks for the answer, but I have my weapons and armatures in another scene. Should I just move the determiner object to the other scene?

Yes, that would be the best way to do it. (and make it by far easier.)

That strategy would cost me days to accomplish considering that I have tons of objects that rely on copying properties from it. This would be difficult. Can I use python or any other way to fix this?

to quote from the documentation, the python controller is essentially an infinity customizable logic brick so obviously it is possible, (But I have no idea how.) Have you considered trying to duplicate the determiner object to the other scene and have the same events that trigger it to change, make both of them change?

"Have you considered trying to duplicate the determiner object to the other scene and have the same events that trigger it to change, make both of them change?" I am confused. What do you mean?

What I mean is, have your empty in the first scene so your other objects can copy from it, and then make another empty in the other scene with the same logic, so your weapons can directly access those properties, and simply make the events (example, a collision) send a message to the empty in  the other scene, and have it directly connected to the empty in it's scene.

What a relief. I appeciate this a lot by the way. I have linked the empty in the weapons scene, duplicated it, removed the linked one, and used the new one. Everything seems fine so far, is this correct? :)

You should have an empty in both scenes, both with their properties changing at the same time.


text:
Volume emitter that is more intense towards the outside of the object
How do I create a volume emitter shader that is more intense towards the outside of the object? I would basically like to create tubes that look like the blue (not purple) tubes in this image:

(source: colorado.edu)
(Figure is by Steve Burrows and the Kapteyn–Murnane Group, JILA. From this article.)
But, I cannot figure out how to get the "depth" coordinate of the image in order to feed this to the intensity of the emitter.
Any ideas on how to do this in cycles?

You might be able to do something with the Ray length output of the lightpath node, however based on your example image I think you might be looking for the layer weight (or fresnel) node:

The above node setup mixes an emission shader with a transparent shader based on the angle of the surface to the camera. In this case sharper angles emit light, while more direct angles are transparent.

But it doesn't look nearly as good with transparent film, per your bug report here: https://developer.blender.org/T42755
unfortunate.

Ah, yes. As a workaround you can use the emit pass and combine it with the render in the compositor, or you can connect a not-entierly-transparent transparent shader to the surface output. (The latter isn't perfect, but it's faster to set up).


text:
Automatic Node Distribution and Alignment
The Unreal Engine has the ability to align and distribute nodes:

Does Blender's node editor have such a feature hidden somewhere?

You can scale and rotate multiple nodes like you would object origins, but it's a little limited. There are some addons which provide this kind of functionality though (e.g. Node Wrangler, which is bundled with blender)

Default transforms:
You can rotate and scale multiple nodes as you can objects with Manipulate origins enabled:

You can use the usual tricks, e.g. press S X (or Y) 0 to align nodes along a particular axis. Note that the "origins" of all nodes are at the top left.
Node wrangler
This addon comes bundled with blender by default, but you'll have to enable it. It comes packed with all kinds of workflow accelerating functions and shortcuts; press ⎈ CtrlSpace in the node editor to get a menu of all of them.
One such function (⇧ Shift=) aligns the selected nodes:

NodeArrange
An experimental script recently featured which completely rearranges an entire node tree:


text:
Combining two shaders, one with color map, one with a specularity map
I'm trying to add a specularity map to a mesh with a color map shader already on it.  However, when I attempt this, I seem to have to choose between one shader or another (see the body and glossy shaders in the materials tab in this screenshot of my screen

(source: deepplanet.com)
They just toggle back and forth, letting me use one or the other but not both.
So, do I have to remove the color image texture, and then somehow do this another way? Or is there a simple way just to add it? I was trying to follow this tutorial but it seemed like a really long way to go about it. Is there a simple, shorter way to do this?

You want to use a mix shader (or sometimes an add shader) to combine multiple shader nodes in the node editor.  The mix shader node will combine two shaders based on a given fraction.  The fac value determines the amount of the second shader in the output.
For instance the following will result in a 20% glossy (and 80% diffuse) material:

You can even use something else, such as a map or input node, to control the mix factor variably across the object.
Here I have plugged a specularity map into the factor, lighter areas on the map will receive more gloss, darker areas will receive more diffuse.

And here I have mixed in another glossy shader using an input > fresnel node as a factor, this will make grazing angles even more glossy (which is more realistic).

Note: to add a node hit Shift+A and select the node you want to use.

So how do I add a mix shader? Can I just add it in the node window?

@AgentZebra See my last edit.

Thank you so much! Fantastic in-depth answer. Super helpful!


text:
How to efficiently model a pile of stones or pebbles

I'm trying to make gravel for my animation, and so far I've tried particles resembling pebble pieces. This method seems too clumsy, so is there an efficient way to make a pile of gravel with collisions on?

What specifically is clumsy?  Ease of use?  Time to render?  Is that your finished product in the question?  Did you take advantage of physics?  Is the gravel the primary focus or secondary background?   Is your mesh shaped like the pile [operative word ] mentioned in your writing?

Render time and ease of use. Generating particles seems like an unnecessary procedure, but I'm not aware of better methods.

Particles can be your strongest ally many times.  Whether or not they are well suited for your particular project is to be determined.  Are you generating a still image or dynamic video? If the image is still you might be able to place a texture on a mesh.

I'm doing a video

You might want to list the specifications of your machine hardware in terms of render time.  Blender system info does that.  What specifically is the ease of use issue, but not render time.   Can you place a  texture of the gravel on a mesh?  Would that be acceptable?  Type game speed optimization.

That was very informative., can I make a pile of pop corn in a box, the popcorns need to be one mesh with box for 3D printing.

1. Add a plane and Fractal Subdivide it
A Fractal value around 0.5 is good for this size of plane.

2. Subdivide it again
Do a second subdivision of a single cut, this time with a higher Fractal value. In this example I used 3.

3. Add a collision plane below
This is to catch the stones after we explode the fractal plane. Scale it up to be somewhat larger than the fractal plane.

4. Specify the collision plane's settings
This is done in the Physics Context with the collision plane selected.
We just want some Particle Friction and Particle Damping. No need to be exact.

5. Select "Quick Explode" from the Object menu
POW! Why sculpt and cut when you can just blow things up? Huge time-saver.

6. Specify Quick Explode settings
Adjust these while playing your animation in a loop to see what you like best.

Once the settings are committed, they're committed.
7. It's exploded but needs thickness and form
Next we will perform some magic to turn this confetti into rocks.

8. Add some more Modifiers with these settings
Note the Solidify Thickness of 0.1, the Decimate Ratio of 0.3, and the SubSurf Subdivisions of 1 each. There is room to experiment here - these values are not set in stone.
What's happening: First the Solidify Modifier turns the flat shards into chunks with volume, but they still look too uniform and not organic enough. Next the Decimate Modifier crushes that geometry down into a shape that looks more like stones by merging neighboring vertices. Finally a Subdivision Surface Modifier takes care of taming the jaggedness.
How many subdivisions? 1 or 2, depending on how smooth you want your stones to be and what kind of poly count you can afford. Usually less is more, and this can be changed later.

9. Apply all modifiers except SubSurf and set shading to Smooth
The Particle System Modifier is the only one that can't be deleted or applied in this stack.

Instead, navigate to the Particle Context. From there you can click the minus icon-button to delete it. We no longer need it once the stones have been created.

The purpose in leaving SubSurf on is for flexibility. You may later choose to remove the SubSurf altogether or increase its subdivision level to 2 for smoother, hi-poly (but also heavier to calculate) geometry. The Modifier settings from one stone can be copied to the rest. More on the SubSurf Modifier later.

10. Select the stones of desirable shape and size
In Edit Mode (Face Select), select a face which is about the ideal size (meaning area) that you want your remaining stones to have. Then press ShiftG to Select Similar and choose "Area".

Immediately after selecting similar faces a Threshold slider will appear in the Operator Panel. Adjust it until it's catching the appropriate amount of stones.

The goal is not to catch every face of every stone with this method, but just to get selected at least one piece of geometry on each stone you want to keep. After this you can shift-select parts of any additional stones you like. Then press CtrlL to Select Linked and this is how you get the whole stones selected.
11. Delete the rest
While still in Edit Mode and with your desired stones selected, press CtrlI to invert the selection so that only the stones you don't want to keep are selected. Then press X to delete them.

12. Separate by loose parts to get individual stone objects
At this point you may want to rename your object from "Plane" to something like "Stone", before breaking it into a bunch of smaller objects that will be named "Stone.123" etc.
Press A to Select All, then P to Separate. Choose "By Loose Parts".

From Object Mode you may now want to Hide (H) the collision plane if it is obscuring some of the stones.
13. Set Origin to Geometry
Having the origin point of these stones off in an arbitrary location is no good, especially if they will be used in a particle system. Let's set it so each stone's origin point is at its center.
In the Tools Tab use the Set Origin drop-down selector to choose "Origin to Geometry", or press ShiftCtrlAltC.

14. Group your stones
Grouping your stones is not only a good way to stay organized and be able to select them easily in the Outliner or Append them to other .blends - it's also necessary if you're going to use them in their own Particle System.
With all of your stone objects selected in Object Mode, press CtrlG to group them. In the Operator Panel name the group something creative like "Stones".

From here you can either use these stones (rocks, gravel, whatever) as particles or as rigid bodies, or with the Molecular Add-On. Self-collision is possible with the latter two methods. If you want to apply the SubSurf Modifier to all the stones you can press AltC and Convert to Mesh.

How do you select similar pebbles and how do you separate by loose parts?

While in Edit mode, hit P. "Separate by loose parts" will be the last choice.

Please see my updated answer. When I first posted I didn't have time to add much text description, just wanted to get you the essential info. I have now filled in the details to make it more comprehensive.

best way I have ever seen to do this!

This is exactly what I was looking for! Thank you very much :D


text:
Render shadows over a transparent background in cycles
I'm trying to make a logo that will be on the header of a website.
What I'd like to achieve, and the reason I'm using Blender, is the projected shadows on the background looking perfectly real (as opposed to doing a drop-shadow in Photoshop).
The only thing is, the background has to be transparent because the website might use different background colors / gradients that make it impossible to match with the exported 3D background.
I made this dummy file (not the real logo... duh!):

If I use the file as is, the grey borders of the image will be impossible to match with the website's background color.
Here what I want:

So obviously, I tried masking the plane, which made the shadows disappear. I tried having a plane set to glass, which didn't work either.
And I looked around for a similar question, but didn't find one.
I am not trying to render an object without a shadow, or a shadow without the emitter object. I've seen this question which has a very difficult solution to this problem, and this one that is very similar but in Blender Internal. This one is similar too but has never been solved.
I'm only a beginner at Compositor, and I'm trying to learn more any chance I get, so any solution in Compositor is welcome if detailed enough. Although if there's a simpler or faster way, it's welcome too!
.blend file:

You could try to use the same compositor setup as is used for camera tracking.

Hello! And thanks! Do you mind explaining a bit more or giving a link?

Well, yeah, this is exactly what I'm looking for! And, at the same time, I'm looking for ways to do this in Cycles and not BI, so not exactly the same thing, and I don't think a duplicate...

For the plane...

UV Unwrap by hitting u >> Unwrap.
Go into the image editor and create a new image, and save.
Go into the node editor and add an Image Texture node.
Make sure you get into the drop down, and select the saved uv image.
On the render panel, goto the Bake section, and select "Shadow" in the Bake Type dropdown.
Click "Bake"
for the planes material mix the material between a diffuse and a transparent shader, using the baked image as the factor with it set to "Non-Color Data".

Here's the screenshot of the effect:

Use a gradient on the shadow such as this to head toward the effect that was in your question. You can control the color transparency on the ramp color selections per color.
Then bring into the compositor and key out the pure black color.
NOTE: Using Cycles Render

Non Shadow Bake Version - See Below

Here is the Non-Bake Version of the same basic thing.
Cycles materials could be tweaked to get a better solution, and great news, the shadow pass does not have to be used either.
Blend File

It would be nicer to have a solution without any baking

I believe that you could render out the shadow pass information separately, and use a very similar technique in the compositor instead. It's a little unproven on my part, but I'm almost certain this will work. If I get a chance I will prove it and include it as an alternate in an edit to the answer.

I followed @RickRiggs's answer and what happened was the result looks 10% transparent and still mostly white/grey. "2. create a new image" : using default settings? Also, I don't always have "use alpha" as an option on the right hand panel of the nodes setup like you do.

I modified your file, and applied my answer to it. The modified blend

The weird thing about rendering these images, is that it adds the black color to the alpha channel. So in Gimp/Photoshop, you can still isolate it, and clear the color pretty easy.

However, to keep you from doing those steps, here is another of the same file with the compositor Alpha applied. Cycles with Compositor

Please check the answer, as I have now also included a Non-Bake version of this answer, via a blend file example.  The steps are pretty much the same, just a slightly different material & compositor node setup.


text:
Why did Blender start baking like this?
Everything was working nicely: I baked the normal map and increased the detail with the normal map node, but now this is happening. Why?

did you try re-calculating normals?

Your render engine is Cycles, but you are viewing through Material Preview which uses eevee. Could this be responsible? Does switching to Rendered Preview help?

Also, it's just cut off at the bottom of your image, so I can't see. but make sure your Normal Map's color space is set to Non-Color.

Yes, it's set to non-color.

Re-calculating normals and viewing in rendered preview didn't help.

could you please share your file (also share the high poly)? https://pasteall.org/blend/

It's only one object. I wanted to bake the displacement and normal textures into a single file with the right coordinates, but it does this now.

Under Bake -> Influence, space was set to object instead of tangent. That was the issue. Thansk for trying to help.


text:
How to apply metallic map and preserve the non metallic parts?
I've baked a metallic map for a sword and it sort of works, but if I reduce roughness to make it look more metallic, the grip part of the mesh, which is supposed to be leather, gets shiny also and looks unrealistic. What's a way around this?

If your sword has to be 1 material, there's nothing to stop you making a roughness map, too.

I can't believe how simple that was. Thanks.


text:
Mesh inner faces getting exposed with animation
My character's shoe sole is behaving like this when I animate the feet:

To be more specific, it happens when I rotate de tip of the feet.
Anyway to stop this from happening?

hello, maybe correct in Weight Paint mode, or if you want to hide a part of your mesh you can use the Mask modifier

Will that work when I export it to Unity?

I don't think the Mask modifier will work, in that case give a correction in Weight Paint mode or simply delete? Actually it's not clear what's happening, what part of the object is overlapping?

The upper side of the sole is overlapping the lower side.

do you really need the upper side of the sole? is it not supposed to be always invisible anyway?

No, I don't. Thanks. lol


text:
Disable motion blur in camera cuts (EEVEE)
I am relatively new to blender and I wanted to know if there is any way to deactivate the motion blur during a camera cut, it is when the camera moves from one place to another in an instant an image is generated between the sub frames or an "Effect ghost ". I need to know if there is any way to disable this or limit the sub frames in certain parts of the video. Thanks for your answers :D

If the motion blur checkmark is animatable (which I don’t remember), you can. Otherwise, use multiple cameras, and use Ctrl+B on the timeline to place a marker for whatever selected camera to become the active camera at that time.


text:
suddenly cant move pasted object (mesh), both move
been ctrl c n v'ing my meshes to be more efficient when working. After pasting, the new identical mesh is in side the copied mesh (obviously). But now when I try and move the new mesh they both move. even when they are individually selected. Also while troubleshooting I also discovered if one of a new pasted object get inside one another they both become tethered and move as 1. as a hotfix I have been Duplicating the objects instead of c+v'ing. Did I hit a hotkey? is this a limitation? new to blender hope I explained well.

https://blender.stackexchange.com/questions/223993/how-do-i-prevent-duplicate-materials-when-copy-pasting

I will try to shed the curse of c+v


text:
Working with the grease pencil and realized drawings and colors are not on same plane. Can this be fixed or do I start over?
I'm following along with a tutorial and this issue does not come up for them. I've done my drawing, started coloring, only to notice that as I moved around, they do not stay in their lines.

Is there a way to get them to snap into their lines or do I have to start over? And how do I avoid this next time? Very new to blender

I'm assuming that the green line is the Y axis, but if that's not the case change the axis accordingly.
Go to edit mode, select all and press S, Y, 0, Enter.
This will force all vertices to scale along Y axis until they share the same exact Y coordinate.

To avoid the problem in future, you have to understand the stroke placement options and the drawing plane options, that once you try a couple of experiments, should be self explanatory.
(https://docs.blender.org/manual/en/latest/grease_pencil/modes/draw/stroke_placement.html, https://docs.blender.org/manual/en/latest/grease_pencil/modes/draw/drawing_planes.html)

Another way is to clean up the drawning with the reproject strokes function:


text:
Strange lightning - what is wrong with my model?
I am a total beginner in modelling but would claim to know the basics.
Here is how my model looks rendered in blender:

As you can see there are many strange ligthning artifacts, and the edge is not lit how one would expect. The beveled faces at the edges of this thing look weird, too.
The normals seem to be correct (I also recalculated them):

So what am I doing wrong here? It is worth mentioning, that this only occurs when i triangulate the model. Before that, everything except of the beveled areas looked okay. The artifacts vary in size and intensity when i subdivide the faces even further.
What am I doing wrong?

Why are you triangulating the mesh? You should try working with quads. Use loop cuts to add holding edges or select edge loops and add bevel weight and use the bevel modifier to get clean edges when using the subdivision modifier.

I used to bevel sharp corners and edges with the bevel tool in edit mode.. what is the benefit of using the modifier?
And okay, you both say i should not triangulate. While i accept this as an advice, i dont really understand how it can actually "break" the model.. The problem is also that some of this lighning glitches appear in unity, too, and unity triangulates automatically...

Beveling using either method is fine - it's a matter of preference - do you prefer destructive editing or non-destructive editing? By using the modifier, it's generally easier to make changes. Un-beveling and un-chamfering isn't exactly straightforward without the help of certain add-ons like MESHmachine. Manual triangulating isn't a good idea (IMO) because it makes creating clean mesh very difficult as the model increases in complexity. Your shading problems are likely coming from all of those corner poles pinching your mesh. Make a clean mesh and allow Blender/Unity to handle tessellation.

I prefer construction editing since I can see what i am doing at any time while editing. Maybe this is because I am not used to non constructive editing and am not familiar with blender modifiers... But of course you are right that changes become easier with non constructive editing...

Try turning on this, and play with the angle setting.
This model is a bit of a mess though, so many triangles, some don't look planar, those things are going to ruin your shading. Try to keep everything as quad as much as you can.

so you say I should not triangulate my mesh? I thought (or heared from more experienced users) this would be better before importing to unity...
actually they are planar since i ran the clean up function for planar faces.
There are only so many triangles because i triangulated and then experimented with subdividing my mesh.

The auto smooth option for normals is turned on and different settings almost do not affect the outcome in any way.

Unity will triangulate the mesh by itself. Avoid doing it while modeling. Stick to quads for better results

Tris can be fine it's just how you use them that matters. If Autosmooth isn't working for you, it may be an issue with custom normals was this model imported into Blender or originally made in Blender?


text:
trying to make a patio with support beams
I was trying to make a patio with support beams, I started with a cube for the house. I extruded the front bottom edge to become the patio surface. Then I wanted to create evenly spaced squares along the front edge to become the beams. Is there a better way to do this? I wanted to create a 4x4 square at the vertex of the patio, then Shift+D, grab, Shift+R repeat it across the patio

Please include images of what you have tried/would like.

How can I subdivide this plane into even squares? may be of help to you.

If you're using the vertices from the edge of the patio. Once duplicated & extruded to desired height. Press "Control + P" then add a solidify modifier to the new object.

I'll try this, I saw a tutorial where they converted vertices to a shape, but I couldn't figure out how they did it.


text:
I have no icon to click on to open blender just the install wizard under downloads
I only have the install wizard after finishing install. There is nothing to click on to open blender. I have installed 64 and 32.

What OS? Does Blender folder with executable presents at path selected in install wizrd?

I am running windows 8.

I get a black screen with a flashing cursor but it disappears quickly.


text:
Cycles isn't appearing in render engine drop down list
I just upgraded to 2.75 and there isn't an option for cycles render in the engine drop down.  How do I access cycles render in the new environment?  It only list, blender render and blender game.

It should be there.. Is it in the list of addons? Try reverting to factory settings

First thing to check is in the Addons tab in the User Preferences:

User Preferences > Addons > Render: Cycles Render Engine.

My best first guess is that the box for this option is unchecked.

Thank you so much!  I just needed to check the cycles render engine check box.


text:
Too dark shadows
This is what I made, multiple boxes (the default box), default camera and lamps.

And when I render, it looks like this:

Correct me if I'm wrong, but shouldn't I see the different boxes? Is it normal that the shadows are so dark that they hide all edges?

Add more lamps...

You only have 2 lamps, the sides of the cubes that are rendering black have nothing to illuminate them.

Also render could be too dark without global illumination (secondary light bounces).

The problem is that you don't have enough lamps at the right positions (as said in the comments by someonewithpc and PGmath). You can fix this in various ways:

Just keep adding/duplicating more point lamps, and spread them around.
Keep only one lamp, and set its mode to Sun.
Have two lamps, one of them a Sun lamp (like in #2), and the other one a Hemi light. Then set the energy of the hemi light to ~0.2, and the energy of the sun light to ~0.8. That way you will illuminate all the faces (so no pure black), and will have shadows. (Note: If you add lights from the 'Create' menu, then you will have no shadows by default. Enable them by scrolling down, and selecting 'Ray Shadow' (only present on the Sun light))


text:
Why does the rig generate below my mesh?
Need help with generating a rig. It generates below the mesh.

adding at least some detail about how are you generating the rig would help, perhaps...

In Object mode, select your mesh and apply (Ctrl A) location, rotation and scale, do the same with the generator rig, then generate.


text:
Model a Curved Edge

I'm trying to make a lamppost with a curved metal (like in the picture) and I don't know how to make the curved bit on top.

Alternatively (to my other answer), you could model the whole lamp shape from a curve.  Just hit Shift+A > Curve > Bezier.  Then give the curve some thickness by setting the bevel to something other than 0 and setting the fill to full under the data properties panel.

In edit mode you can Ctrl + Click to add new control points and use Alt+S to adjust the relative bevel thickness of the control points to create a shape like this.

Once you have the basic curvature down you can convert the curve to a mesh with Alt+C > Mesh From Curve and model the finer details.

I would use the spin tool.  Spin extrudes a portion of geometry along a radial curve (portion of a circle).  Just place the 3D cursor at the center of the curve, be sure you are in side view (NumPad 3) or else the direction of extrusion will be strange, select the top ring of the straight part, and hit Alt+R.  Then hit F6 and you can tweak the settings to get the curve you want.

You can adjust the curve angle with the angle spinner and the resolution of the extrusion with the steps spinner.  You can also adjust the center of the curve (by default this is set to the location of the 3D cursor), and the axis (as a vector) around which to rotate the extrusion (by default this is perpendicular to the view plane).


text:
Can I make an object invisible in Cycles without letting the camera see what is behind it?
I would like my mountain to be invisible after rendering. And I want just Objects in front of it (like trees) to be seen, but not behind the mountain.

You can also adjust your camera's clipping distance, but it will no doubt clip your sky as well. Render Layers may be another option as well.

Possible duplicate of How can I make an object invisible when I render in Cycles?


text:
How can I manually calculate bpy.types.PoseBone.matrix using Blender's Python API?
I have this .blend file which has a simple scene, and a python script. There's a readme section in the script, but to give a general idea:
There are two identical meshes in the scene, one skinned, and the other unskinned. The skinned mesh has a 20 frame animation. If you move to any frame of the animation, and then run the script, the script will modify the position of the unskinned mesh's vertices, to match the vertex positions of the skinned mesh, for the current frame of animation.
The formula I use to calculate the new vertex positions is:
nv = nv + ((boneWeight / TW) * ( bms[boneName] * (ibps[boneName] * v.co) ))

Where:

boneWeight: weight of the current bone that influences this vertex
TW: total weight of all bones that affect this vertex
bms[boneName]: bind pose of the current bone (bpy.data.objects[ARMATURE_NAME].pose.bones[BONE_NAME].matrix)
ibps[boneName]: inverted bind pose of the current bone (bpy.data.objects[ARMATURE_NAME].data.bones[BONE_NAME].matrix_local.inverted())
v.co: the original vertex coordinates

It's worth noting that, in my Python script, I do not traverse the hierarchy of bones to calculate the correct transform matrices; simply accessing the pose matrix and inverted bind pose matrix for the current bone is enough.
So with this figured out, I now want to export the bind pose and inverted bind pose of every bone, for every keyframe in this animation. In order to keep my exported file size to a minimum, I only want to export the keyframes of an animation, and have my game engine generate the bind pose and inverted bind pose of all bones for all non-keyframes in the animation.
I have found the interpolation functions for Matrices in Blender's source code, and I have re-implemented them in Java. For the root bone of an armature, the matrices that my engine generates for the bind pose and inverted bind pose are correct for all frames in my animation.
However, for non-root bones, the bind pose and inverted bind pose are incorrect, i.e. they do not match the pose_bone.matrix and data_bone.matrix_local.inverted() readouts that Blender gives in the python console.
So, it seems to me that, it isn't enough to export the bind pose and inverted bind pose matrices, and interpolate between them for given keyframes.
Instead, I either need to:

Export and interpolate between the matrices/vectors from which the bind pose and inverted bind pose are derived from, and then multiply them all together to give the bind pose and inverted bind pose of the bone on the engine side

OR

I continue to export the bind pose and inverted bind pose from blender, but after I have generated the matrices on the engine side, for non-root bones, I multiply the generated matrix with a matrix/inverted matrix belonging to that bone's parent (but what parent bone matrix should I multiply against?)

Essentially, I need to know how, using the Python API in Blender, I can generate a matrix equivalent to:
bpy.data.objects['Armature'].data.pose.bones['Bone.001'].matrix

Without directly accessing bpy.data.objects['Armature'].data.pose.bones['Bone.001'].matrix, if that makes sense?
So, I need to know, step-by-step, what child/parent bone matrices (available via the Python API) to multiply together, to give a matrix equal to the bind pose (bpy.data.objects['Armature'].data.pose.bones['Bone.001'].matrix) of a given bone.
I've been linked to this diagram before:
(source: blender.org)
But I wasn't able to follow along with it using only the Python API, as I was only able to find the equivalent functions for each step in the C code, not the Python API.

Hello fergal, you are trying to engineer a new 3D skeleton animation export format and import that into a custom Java engine. Pls do yourself a favor and just don't do this. Use some common armature format like .bvh  and implement that into your engine, or better use already available engine - making one yourself is a waste of time.

I thoroughly disagree. Making your own game engine is a lot of fun, and a magnificent learning exercise. Yes, I have created my own JSON-based export format, and I am trying to add support for animation exports. In order to correctly generate the transform matrices, I need to know what matrices available via the Python API I can multiply together to create a matrix equivalent to the pose bone matrix. If you cannot answer my question, that's fine, but please don't tell me this is a waste of time - it's far from it.

sorry it offended you, but nowadays such thing is like inventing your own alphabet to write a book, or like building a computer from transistors to create a game. It's just better to use stuff that is available and that others understand. I am not blaming you, I wrote some game engines myself and was really into it when I had free time on my hands. I'll look into the pose bone matrix problem.

 armature.data.bones["Bone"].matrix_local

Is the bone's world un-posed matrix (the pose_bone.matrix in rest state).
 armature.pose.bones["Bone"].matrix_basis

Is the bone's local pose matrix.
From there we can calculate any bone's world matrix by recursively traversing it's parents. Note: This will not include any constraints or IK (but it will include drivers or actions):
def matrix_world(armature_ob, bone_name):
    local = armature_ob.data.bones[bone_name].matrix_local
    basis = armature_ob.pose.bones[bone_name].matrix_basis

    parent = armature_ob.pose.bones[bone_name].parent
    if parent == None:
        return  local * basis
    else:
        parent_local = armature_ob.data.bones[parent.name].matrix_local
        return matrix_world(armature_ob, parent.name) * (parent_local.inverted() * local) * basis

You can test it on an empty and some armature with some active pose_bone. Also the armature_object's transformation is accounted here:
import bpy

empty_ob = bpy.data.objects["Empty"]
armature_ob = bpy.data.objects["Armature"]

bone_name = bpy.context.active_pose_bone.name
empty_ob.matrix_world = armature_ob.matrix_world * matrix_world(armature_ob, bone_name )

thanks a million mate, works a treat - no offense taken!

Have to point out that, at least in 2.93, all those * must become @. * is componentwise multiplication, and @ is matrix multiplication.

Introducing blender's different bone matrices:
this code gives the bone's 4*4 matrix in object(armature) coordinates:
bpy.context.active_pose_bone.matrix

this code gives you the rest pose matrix in object(Armature) space:
bpy.context.active_pose_bone.bone.matrix_local

Note that this matrix didn't change after rotation(transformation).
and this one gives you the current transformation matrix relative to the rest pose in local coordinates (matrix_local):
bpy.context.active_pose_bone.matrix_basis

Parent and world spaces:
In this picture the red monkey is green monkey's child and you see the world matrix of each one(notice the translation part which is the same as location):

because the parent's matrix is just identity the world matrix of the child in this configuration is equivalent to child matrix in the parent space:

now if the parent transform to somewhere and some rotation, its world matrix times child's local matrix gives the child's world matrix:
\begin{equation}
P:parent \space matrix\\
C:child \space matrix\\
subscripts: coordinate \space system
\\
\end{equation}
\begin{equation}
C_{world} = P_{world} \times C_{parent}\\
\\
\implies P_{world}^{-1} \times C_{world} = P_{world}^{-1} \times P_{world} \times C_{parent}
\\
\implies C_{parent} = P_{world}^{-1} \times C_{world}
\end{equation}

Converting a transformation in some coordinate system into its counterpart in world coordinate:
now when we want to calculate a transformation in another coordinateSystem 'S'(for example parent coords) first we should go to that coordsys, then apply transformation in that coordsys and then comeback to world coordsys as below:
X: Object's transformation matrix
S: A typical coordinate system's matrix (for example parent)
T: Transformation matrix ($T_{s}$ is transformation relative to S coordsys)
subscripts: coordinate system
\begin{equation}
X_{s} = S_{world}^{-1} \times X_{world}\\
\end{equation}
martix of X in S system after applying becomes:
\begin{equation}
T_{s} \times X_{s} = T_{s} \times (S_{world}^{-1} \times X_{world})
\end{equation}
and now we should turn back to world system:
\begin{equation}
S_{world} \times T_{s} \times X_{s} = S_{world} \times T_{s} \times (S_{world}^{-1} \times X_{world})\\
\implies T_{world} \times X_{world} =  S_{world} \times T_{s} \times S_{world}^{-1} \times X_{world}
\end{equation}
thus the form of transformation T in world coordsys becomes
\begin{equation}
T_{world} = S_{world} \times T_{s} \times S_{world}^{-1}
\end{equation}
this is how Jaroslav Jerryno Novotny's above code works. in each step it goes to parent space(by multiplying its .bone.matrix_local.inverse()), calculates the rotation in parent's rest(local) space(by multiplying .matrix_basis) and then comes back to armature's coordsys(by multiplying .bone.matrix_local).
but its simpler to use .matrix for calculating a bone's world matrix. you can simply use below function and apply it on an empty:
import bpy

def worldMatrix(ArmatureObject,Bone):
    _bone = ArmatureObject.pose.bones[Bone]
    _obj = ArmatureObject
    return _obj.matrix_world @ _bone.matrix

empty_ob = bpy.data.objects["Empty"]
armature_ob = bpy.data.objects["Armature"]

bone_name = bpy.context.active_pose_bone.name

empty_ob.matrix_world = worldMatrix(armature_ob, bone_name )

can you add some explanation? Math formulas are only good for some people.

I have added explanations and hope these clarify the title . if you feel this is not sufficient please tell me.

excellent answer! Much better. well done. UVed.

I don't understand how you go from   Sworld×Ts×Xs = Sworld×Ts×(S−1world×Xworld)   to   Tworld×Xworld = Sworld×Ts×S−1world×Xworld.  If  Sworld×Ts = Tworld   then  Xs = Xworld which is not the case.

@DominiqueBijnens No :), It's a very simple linear algebra. Think of it as folows:
First Ts acts on Xs like Ts × Xs;  Then the resulting transform will be converted to the world coords by applying the Sw like Sw × (Ts × Xs) ; This whole process is equivalent to the scenario that the world matrix be changed under the world transformation matrix, which is (Sw × Ts × Sw^-1) × Xw ; It simply means that 1-you go from world coords to special coords, 2-do your treansformation in special coords, 3-then come back to world coords again

@DominiqueBijnens The correct form is Tw = (Sw × Ts × Sw^-1) which is written in the post, but you mistakenly took it like  Sw×Ts = Tw that is definitely wrong

I copied the following script from this answer. The related commented functions are:

BKE_pchan_to_pose_mat
get_offset_bone_mat

# ported from blenkernel/intern/armature.c to python
# --------------------------------------------------------------------
def get_mat_offs(bone):
    mat_offs = bone.matrix.to_4x4()
    mat_offs.translation = bone.head
    mat_offs.translation.y += bone.parent.length

    return mat_offs

def get_mat_rest(pose_bone, mat_pose_parent):
    bone = pose_bone.bone

    if pose_bone.parent:
        mat_offs = get_mat_offs(bone)

        # --------- rotscale
        if (not bone.use_inherit_rotation and
            not bone.use_inherit_scale):
            mat_rotscale = bone.parent.matrix_local * mat_offs

        elif not bone.use_inherit_rotation:
            mat_size = Matrix.Identity(4)
            for i in range(3):
                mat_size[i][i] = mat_pose_parent.col[i].magnitude
            mat_rotscale = mat_size * bone.parent.matrix_local * mat_offs

        elif not bone.use_inherit_scale:
            mat_rotscale = mat_pose_parent.normalized() * mat_offs

        else:
            mat_rotscale = mat_pose_parent * mat_offs

        # --------- location
        if not bone.use_local_location:
            mat_a = Matrix.Translation(
                mat_pose_parent * mat_offs.translation)

            mat_b = mat_pose_parent.copy()
            mat_b.translation = Vector()

            mat_loc = mat_a * mat_b

        elif (not bone.use_inherit_rotation or
              not bone.use_inherit_scale):
            mat_loc = mat_pose_parent * mat_offs

        else:
            mat_loc = mat_rotscale.copy()

    else:
        mat_rotscale = bone.matrix_local
        if not bone.use_local_location:
            mat_loc = Matrix.Translation(bone.matrix_local.translation)
        else:
            mat_loc = mat_rotscale.copy()

    return mat_rotscale, mat_loc

def get_mat_pose(pose_bone, mat_pose_parent=None, mat_basis=None):
    if pose_bone.parent and not mat_pose_parent:
        mat_pose_parent = pose_bone.parent.matrix
    if not mat_basis:
        mat_basis = pose_bone.matrix_basis

    mat_rotscale, mat_loc = get_mat_rest(pose_bone, mat_pose_parent)
    mat_pose = mat_rotscale * mat_basis
    mat_pose.translation = mat_loc * mat_basis.translation

    return mat_pose
# --------------------------------------------------------------------


text:
How to apply a material to a selection in Text using Python
The Blender documentation explains how to apply multiple materials to various selections in Text:

(source: blender.org)

For example, to create Fig. Red Green Blue. you would need to create three separate materials and three separate material indices. Each word would be assigned a Material index by selecting the characters for each word and clicking the Assign button. Fig. Red Green Blue. is still one single Text object.

When accessing the text using a Python script, we can see its contents as a string through the following command:
object.data.body

However, it is not clear to me how we could mark substrings and assign materials to them. Do we need to macro the operations (select a range, assign material, repeat) as if we were doing this through the UI? Is there a more streamlined API?
Is this achievable through a script at all?

The following script will cycle through all text objects and for each word (separated by space) assign a material slot index to the word incrementing the material slot through all available slots resetting to index 0 if there are more words than material slots.
Written & tested on blender 2.79
import bpy

texts = [obj for obj in bpy.data.objects if obj.type == 'FONT']

bpy.ops.mode_select
for txt in texts:
    me = txt.data.body
    mats = txt.material_slots
    ind = 0
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.font.move(type='LINE_BEGIN')
    for word in me.split():
        bpy.ops.font.move_select(type='NEXT_WORD')
        bpy.context.object.active_material_index = ind
        bpy.ops.object.material_slot_assign()
        if ind < len(mats):
            ind += 1
        else:
            ind = 0
        bpy.ops.font.move(type='NEXT_CHARACTER')
    bpy.ops.object.mode_set(mode='OBJECT')

This code gives me this error on UPBGE 0.3:
RuntimeError: Operator bpy.ops.font.move.poll() failed, context is incorrect


text:
How to rotate normal using geometry nodes
I'm trying to extrude the selected edges using geometry nodes where the Normal node is setting the offset. How can I extrude the edges parallel to the faces that the edges are connected to?

$\hspace{15pt}$With the cross product operation between the normal and the normalized vector made by the edge's vertices you can get a unit vector orthogonal to both the face normal and the edge. Sometimes it will point towards the face, and in these cases they need to be negated, we can do that by checking if it points towards the face position from the edge position using the dot product operation and negating if it does.


text:
Proportional editing on mesh doesn't work
I saw this video on YouTube > https://www.youtube.com/watch?v=dz2ws7CAkgU and was quite interested. From 0:09 till 0:10 you can see that the uploader is moving the verts with proportional editing. I tried this myself but it doesn't work. It doesn't show the proportional editing ring either.

Can someone help me a little?

Did you try scroll on your mouse?

Proportional editing works with transform operations like move, rotate and scale. Try clicking G to grab and use mouse wheel to set the influence higher and see if that works.


text:
Select using intersection or union?
Could somebody provide a link to the Blender documentation or another source, where (non trivial) select operations are explained? I mean performing intersection or union using all available select tools like Border or Similar.

Note: The question is not about using Border to add or remove rectangles. This is about Intersection or Union.

For example: I have selected the faces based on their material, but now I would like to keep only what is inside the green rectangle. I don't know how to do it, and I cannot find that in the documentation (currently learning Blender).

Usually graphic applications have select helpers like Intersection or Union to combine successive basic select operations. In my case I assume it's possible in Blender to intersect my current selection with a rectangle using Border.
Please don't provide shortcuts only. Using Blender 2.7.
Thanks.

AFAIK this isn't possible directly (unfortunately), but instead you could: Deselect everything (A), select everything in the green region with box select (B), hide unselected (Shift H), deselect all (A), then do whatever it is you did to get the selection shown in your screenshot (Select by material or similar?). The operation should only select visible geometry, so when you unhide (Alt H) you should end up with the result you want.

Thanks for the suggestion. I used the deselect as a bypass. Used Border + Drag LMB + Shift while releasing LMB. Did that twice to remove the non desired areas.

As far as I am aware the linked question answers your question of wanting to "keep only what is inside the green rectangle". This is done by subtracting from that selection using box select. If I have misunderstood your question, then please add more details to your question, describing how it is different.

Ah ok, you didn't mention multiple materials in your question, I would suggest adding it in as an example as at the minute you seem to be mainly mentioning removing from a selection.

Unfortunately, selection tools don't support this directly. However, there are ways to accomplish the same result. For example:

Deselect everything (A)
Select the vertices you want to "intersect" with the previous selection. In your case, the vertices in the green rectangle.
Hide the other geometry (⇧ ShiftH)
Do whatever it is you did to get the initial selection that you want to intersect (e.g. select by material)
Create and assign a vertex group to store the selection
Unhide everything (⎇ AltH) and deselect (A)
Select the vertex group by clicking Select in the vertex groups  panel.

However in most cases like yours the desired selection can easily be obtained with one or two box deselections. To deselect with box select (B), use  MMB or hold ⇧ Shift when defining the box.


text:
Combine two textures in OBJ into single texture
I have an OBJ file that has two meshes mapped to two different texture files.  After cropping the meshes in Blender, I realized that most of the original image portions in the texture jpegs are not being used.
Hence I want to combine two textures into a single texture and export the meshes into a OBJ file.  How can I do this in Blender?

Sorry about the late reply. I had a deadline and used multiple textures for it. Thanks @raym for pointing out a related Q.  I tried TARDIS's answer to that question, but am getting a "Circular reference in Texture Stack" error and the complete model turns black.
Surely I'm missing something.  Do those techniques work for OBJ models that I've imported into blender?

Posted solutions on the other Q did not work for me, though this worked perfectly:
https://www.youtube.com/watch?v=Tj-S5QAac3U

authors: معاذ الجزائري


text:
How to limit light to a collection? Formerly (2.79) it was 'Limit to this layer'
How to limit light to a collection? Formerly (2.79) it was 'Limit to this layer'. I have a lot of blend-files where I have object and lights in layers and the lights are limited to that layer. With version 2.8 Blender Internal is gone and now I have Eevee, and the formerly "layers" are now "collections" BUT I did not find a way to limit the light behaviour to a collection.


text:
Origins to the down of the object by default
Is there a way to make the origin of any new object appear by default at the lowest point of that object?
The center of the lowest face for a cube, for example. It's very uncomfortable to transform objects and lose their position on the ground (or anywhere else). Every slight transformation makes me to snap this object again. I know I can move pivot manually or just move the upper face (if any) in edit mode, but it's still more moves than I want. Also there is a "cage transformation", but it often uses wrong rulers for transformation for some reason.

Run a script using msgbus when new primitive added

Run the following script in the text editor.
Add any mesh primitive, the origin is adjusted to the bottom of its bounding box as long as the following conditions are met.

Object mode.
Object is a mesh.
The active operator is a mesh primitive add.

Code put together from
Set origin to bottom center of multiple objects
Adjusted such that the object is not moved globally so the mesh origin is at scene cursor location, and is the centre of the bottom face of bounding box. (For Suzanne is outside the mesh)  Alternatively running this one after adding objects does the trick, but not "automatically".
How to get an event when an object is selected?
Very lacking in docs re bpy.msgbus, not sure for what version was introduced, possibly should assert(bpy.msgbus) to throw an error if not available for your version.
import bpy
from mathutils import Vector, Matrix

handle = object()

# Triggers when an object is made active
subscribe_to = bpy.types.LayerObjects, "active" #

def origin_to_bottom(ob):
    me = ob.data

    local_verts = [Vector(v[:]) for v in ob.bound_box]
    o = sum(local_verts, Vector()) / 8
    o.z = min(v.z for v in local_verts)

    me.transform(Matrix.Translation(-o))

def notify_test(context):
    if (context.object.type == 'MESH'
            and getattr(context.active_operator, "bl_idname", "").startswith("MESH_OT_primitive_")
            and context.mode == 'OBJECT'):
        print("Setting origin to bottom")
        origin_to_bottom(context.object)

bpy.msgbus.subscribe_rna(
    key=subscribe_to,
    owner=handle,
    args=(bpy.context,),
    notify=notify_test,
)

bpy.msgbus.publish_rna(key=subscribe_to)

Note: put this together as a proof of concept. Have not tested greatly.
Could modify to only work for Cube, Cylinder, Cone not Monkey Sphere.
Having the origin at centre of lowest face would be Ok for cube not UV cylinder, Cone with ngon fill, not fan etc.
Alternatively could rewrite, or override (ie register another with same name), any / all the add mesh operators in python.

That worked like a charm :) Thank you batFINGER!

Wow, you really made a great work, I even wasn't hoping =) Thanks!

Unfortunately, there is no way to change the default location of the origin.
Perhaps I can help quicken the process of moving the origin for you though.
Open the sidebar usingN, switch to the "Tool" tab, and under Affect only select Origins. Then, with the target object selected, press G to grab/move the origin, Z to lock movement to the Z-axis, and hold Ctrl to snap the origin to the bottom of the object. If you need to change snapping mode, press Ctrl+Shift+Tab and select face snapping mode in the popup menu.
When moving objects you want to keep on the ground plane, you can press Shift+Z to move the object in the XY-plane only.
In regards to the scale cage, refer to the documentation for it here.

Thanks! I already know this way and use it.
Actually, I am using Bforartists (it's slightly transformed Blender with more usability), and these options are clearly visible there.
I hoped there is some option to change in files to make the pivot appear at the lowest point.


text:
Shortcuts are saved immediately to all keymap presets
I created a new keymap preset, if I try to change something in it, the changes affect ALL other presets.
For example: I reset all the settings to the factory settings, created a new keymap preset and named it "Test", then changed the "Pick Shortest Path" shortcut to another. When I try to switch to other keymap presets (for example, "Blender" or "Industry Compatible"), this change affects them too, how can I fix this? is this a bug?
I uploaded a video where the problem is visible, please watch this:
youtu.be/3LgBPfjSPGU

Apparently this is by design, which I find very weird: https://developer.blender.org/T69991

Clearly, thanks. Do I understand correctly that this will not be fixed? Where can I report a bug?

The ticket I've linked is from the official bug tracker and Brecht is one of the core developers. This behavior of the custom keymaps is something that has to be discussed with the other developers, since it is a design decision. The bug tracker isn't the right place for these discussions, therefore I've already contacted the other developers on Blender's developer channel.

Thank you very much, I hope this will be fixed in the near future, good luck.


text:
How can I see if an object is inside the volume rendering of the camera?
i have a project with the stereo camera.
I want delete all the objects outside the volume of rendering of the camera.
I have all the parameters of the camera and i have calculated the near plane, the far plane and the convergence plane (i know all the vertices).
But i don't understand How can I see if an object is inside the volume rendering of the camera.
I know how put the objects in the camera's coordinate system
camera.matrix_world.inverted() * obj.location

Some ideas?
p.s.
i have see this question:
What are the formulas to define the camera's view cone?
it's good but it does not work very well

This answer at so may be what you want. you need to choose what you test, an objects centre or bound_box?

Also this: http://blender.stackexchange.com/questions/6891/does-camera-view-frame-return-the-correct-size-of-near-clip-plane. Note that there will be a new feature in upcoming Blender 2.76: https://developer.blender.org/rB92a3799 ("automatic object culling based on whether
object is visible in the frame or not").

thanks for the reply.
the link posted by @CoDEmanX is perfect!
I solved my problem, thanks
Now i have this problem: how do I access the data of the single camera (left and right) that make up the central camera?

You mean in a 3D stereo camera setup? Do you want to calculate each camera individually, a single virtual central camera, or max of left and right?


text:
Stereoscopic camera: how to see objects visible only from the right and left camera
Previously, I've asked this question: How can I see if an object is inside the volume rendering of the camera? and I had found the solution thanks to this post: Does Camera.view_frame() return the correct size of near clip plane?
The line code x, y, z = world_to_camera_view(sce, cam, mat * v.co) is perfect for found the objects are visible from the central camera but it excludes items that are only visible from a single camera (camera L or R). I want to find the objects visible only from the right camera and objects visible only from the left camera.
A possible solution would be:

Delete stereoscopy
Move the camera to the right of intercular distance / 2
Incline the camera to the z-axis of angle of convergence (easy calculation)
Check the visible item with world_to_camera_view
Repeat for simulate the left camera (move to right and rotate z -angle)
Set True the stereoscopy

But how to eliminate the stereoscopy and have a camera equal to that of the left and right?

I solved my issue by following the steps I listed. Now I have this problem:
If I place the camera on the right of a value (even higher) and then use world_to_camera_view the result I get is the same. That tells me that the camera always sees the same objects.
Code
import bpy
from bpy_extras.object_utils import world_to_camera_view

context = bpy.context
scene = bpy.context.scene
scene.update

def checkIfIsInCameraView(cam, obj):
    for v in obj.data.vertices:
        x, y, z = world_to_camera_view(context.scene, cam, obj.matrix_world * v.co)
        if (0.0 <= x <= 1.0 and 0.0 <= y <= 1.0):
            return True

    return False

#set off stereo
scene.render.use_multiview = False

#creo nuova camera per simulare camera laterale
cameraNormal = scene.camera

#change camera position
cameraNormal.location.x = cameraNormal.location.x - 50.0

for obj in scene.objects:
    if obj.type == 'MESH':
        #print if in camera view
        if checkIfIsInCameraView(cameraNormal, obj):
            print(obj)

#change camera position
cameraNormal.location.x = cameraNormal.location.x + 100.0

for obj in scene.objects:
    if obj.type == 'MESH':
        #print if in camera view
        if checkIfIsInCameraView(cameraNormal, obj):
            print(obj)

#set on stereo
scene.render.use_multiview = True
scene.update

Some tips?

Do you really expect the difference to be big enough that an object will only be seen in one camera?

It depends on the settings of the camera and the proximity of the object.
It is a typical case of "window violation" in stereoscopy

It will depend on how accurate you want to go, using off-axis convergence gives a leaning pyramid for visible volume that increases the error if your using a plain camera as the values get larger. For best results it would mean calculating the visible volume that matches every camera setting.

Sometimes, you need to use scene.update() once you've modified some properties (location, rotation) of the objects. When the scene is updated, you can use the new values.

@JonathanChemla. OMG! my bad! really ... I had forgotten the ()
thanks for the help!

the first time I used scene.update () It is working properly
now if i run again the script don't goes...

Ok, adding this as an answer

Sometimes, you need to use scene.update() once you've modified some properties (location, rotation) of the objects. When the scene is updated, you can use the new values.
You forgot the parentheses after the function call :)


text:
Is there a way to transfer a rigged mesh from a new version of blender to an old one?
This is a bit of a long shot, but I'm wondering if there's any way to get my model with the rig over from version 2.9 to version 2.7. From the googling I've done there doesn't seem to be a way to open a file created in 2.9 in 2.7, but I'm wondering if there's some other way to export it similar to exporting the mesh as an obj (although one that preserves all that hard work I did painting weights.) I'm pretty new to blender and I haven't done much rigging in the past either, so I'm out of my depth here. Thanks!

Try using the FBX export instead. Make sure to select both your mesh and rig, and select only selected in the export menu.

I am not sure but I think you can copy and paste it between different files no matter the version number.


text:
Blender 2.92.0 Sphere is invisible when created
Im just new to blender, I just downloaded blender, but when i add a sphere its invisible ive tried  googling help but none worked so here I am.

Re image are you confusing the sphere with the circle?. Add > Mesh > UVSphere

Also, you can choose whether to have the circle filled with faces when you create it :). There's a small dropdown bottom left.

Well . . . . . . .  That's embarrassing XD

you added a circle - not a sphere. A circle is a 2D object, a sphere a 3D object.
To add a sphere press Shift-A -> Mesh -> UV Sphere


text:
I can't select the strip in Video Sequencer
Whenever I press it just splits the strip where my cursor is. It worked just fine but suddenly started doing it without me knowing how i activated it. Help

somehow you started the "blade" functionality.
Either press "W" to deactivate or tap this upper button here:

You can get the toolbar by tapping "T"


text:
How to set color tags to collection with Python?
I’m trying to set a color tag to a collection with Python by using the collection name. How can I do that ?
Have a nice coding day !

Collection.color_tag
Set one of the pre-designated colors using the color_tag ENUM
>>> C.collection.color_tag
'NONE'

Consult the docs, or crunch in an incorrect value to get the list of valid values
>>> C.collection.color_tag = 'FOO'
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct: item.attr = val: enum "FOO" not found in ('NONE', 'COLOR_01', 'COLOR_02', 'COLOR_03', 'COLOR_04', 'COLOR_05', 'COLOR_06', 'COLOR_07', 'COLOR_08')

Set it to red,
>>> C.collection.color_tag = 'COLOR_01'
>>>

Handy ! Link to the docs : https://docs.blender.org/api/current/bpy.types.Collection.html?highlight=color_tag#bpy.types.Collection.color_tag


text:
Grey Squares Appearing in Compositor in Blender 2.9
When using the compositor in Blender 2.9x, there are grey boxes in the background whenever Backdrop is enabled. They appear in every version of 2.9 that I've used on my machine but don't appear in any versions of 2.8.

(Boxes)

(No Boxes)
It's not a huge issue, but it's a little annoying since they tend to shift around whenever I zoom or pan the background image. Has anyone else experienced this? Is there any way to get rid of them?

Hello and welcome. Is your graphics card up to date?

It appears to be. I've got an Intel(R) UHD if anyone's interested. Honestly, my computer's not great in the graphics department, and I suspected that might be the problem, but as the issue doesn't appear in 2.8 I'm hoping there's something I can do within 2.9 to address it.


text:
Rig rest position in Vertex Paint?
Is there any way to display the rig in it's resting position only in Vertex Paint? The rig is pre-posed to a position I want however since the hands are curling inwards, I can't see the entirety of the hand to paint on. Is there any way to just keep it in pose mode for vertex paint then switch it back?

Yes. Go to the armature properties in the properties editor, and near the top there will be a Radio button between “pose position“ and “rest position.“ switch it to rest position to temporarily hide the pose as it were.


text:
Can't dissolve edge without dissolving one next to it
Sorry if this problem has a pretty obvious solution, but I only recently started using Blender, and I can't figure out why this is happening. I have an edge, which I separated into 2 edges (they also have a vertex separating them). However, whenever I try to dissolve only one of those 2 edges, the other one goes with it as well.
Before I dissolve an edge:

After I dissolve the bottom left vertical edge:

Thanks!

Problem with dissolve is that it needs to be applied with care as "crucial edges" can give effects like that when dissolved.


text:
Rendering Ambient Occlusion onto alpha instead of white
I am attempting to render a surface and it's AO shadow in a way where the darkest parts of the Ambient Occlusion remain, but the light portions are faded to alpha. What is the best way to do this?
For reference, I need the light gray in the image below to be replaced with alpha. Don't worry about the object casting the shadow, it is being protected by a mask.

Just figured out my own question. It seems like the best way to do this is to Bake AO, then use a color ramp node to get rid of the white and adjust the transition.


text:
My materials look all scratchy and not cool,
i've given them a texture but when i render it it looks lame, and kind of scratchy any help?

Thing to try:

Increase the lighting on the scene.
Increase Samples. Check Properties->Render Tab->Sampling->Samples.


text:
Black reflections at extreme angles with glossy shader on smooth surfaces
How do I remove them?

They don't appear when using flat shading.

Nothing in the scene can cause this.

Cycles is your render?

The problem occurs in smooth shading because it changes the way the shading is calculated across the surfaces, giving the illusion of a smooth surface even if the angle between the faces is sharp.
To correct that, add edge split modifier while all faces are set to smooth shading.

Would be useful to add why this is the solution.

Consider using a mix shader in Cycles. Mix a combo of diffuse dominantly and and gloss to a lesser degree.
Replace your first shader with the mix shader then add the gloss and diffuse

While this does help, it doesn't remove the problem completely.


text:
How to Created Stylized Grainy Cel Shading
How can I accomplish this look here in this video, including changing the color of cast shadows and adding a gradient noise texture?
https://www.youtube.com/watch?v=8SHNsKjnAgs

Please include a screen shot or excerpt of the video in question. That will avoid having to watch a 20mn video and help you get an answer more quickly. thx

@Bruno Sorry about that here's a pic of what I'm wanting to go for. thanks

Shader to RGB node
Start by creating a bump map from a 3D noise like the following:

Feed a shader with strong specularity with the bump map. Then use the shader to rgb node to extract the color info of the surface. Use a color ramp node to tint the shadow, the midtones and the highlites.


text:
What is Local space in constraints?
According to Blender's manual:

Local Space is the parent of the object (or bone) is the frame of
  reference. Location is relative to the parent object origin. Rotation
  and Scale are oriented to the parent object axes. Only transformations
  to the object itself are taken into account. Transformations to the
  object’s parent are not taken into account.

I do not understand what that all means? What if an object does not have a parent at all? Then what is its local space?
Furthermore, if I use Local space for both the owner and the target of the copy rotation constraint then nothing happens. But if I use the Local spaces for both of them in the copy location constraint then as the target moves along its local axis then the target moves along its own local axis.
Why do we not get the same for the rotation?

Add an empty make it default cubes parent. Move rotate scale empty anywhere the cube keeps its local transform. The value of location rotation scale of cube in properties is in local space.  If an object does not have a parent can consider it in global space.

https://en.wikipedia.org/wiki/Local_coordinates


text:
Archipack: when adding a window to a wall with wood cladding, the window is at the wrong depth
when adding a window to a wall system using wood cladding, the window is by default at a depth of 0.09. The cladding hides most of the window (see image below). Changing the depth to 0.10 resolves the issue and the window is now visible.
However, when adding a new window, the old window (and others) default back to 0.09. Very frustrating.
I am using Blender 2.81a. Archipack 2.2.4
Anyone else had this issue?

Looks like a bug in the hole geometry generation on such walls with small thickness.
Window depth is the same as wall width parameter and always must keep in synch with wall.
Either increase wall width or set window "Offset" to 0.06 (or play with this value) should be able to fix your issue.

Can't believe I did not try increasing wall width. That worked perfectly Stephen, thanks so much. FYI I had the width at 0.09m. Increasing to 0.1m worked.


text:
How can I change the hover color of tools in the UI?
How can I change the color or light intensity of tabs that are hovered over in blenders user interface?
For example if I hover over the translate option in the tools tab while in the 3d view, it changes color. How can I customize that color?

I don't think that colour can be changed. The options for those colours are in User Preferences> Themes> User Interface> Tool.
The 'Inner' colour is the colour of the button and the 'Inner Selected' is the colour when pressed, but there is no colour for 'Inner Hover'. The hover colour seems to just calculated based on the 'Inner Colour'. If it is red then the hover colour is lighter red, if it is green the hover is lighter greet etc.

You are right, I guess to change what i want i would have to do some python programming. Nonetheless playing around in with the colors and gradients provided a temporary resolution, Thank you all!

In the user settings there is a "themes" tab. Use it to change any colors you see fit!
You can also look around - there are many color schemes to be had!

trust me i look long and hard, found nothing


text:
Is there a way to show distribution of UVs as a heat map?
I was wondering if there's an option in blender like that of UV unfold, to be able to see a "heatmap" for UV distribution like red for stretching and blue for too close UVs. I am quite clear of the workflow in UV editor but this is something I have not come across, I know I can apply the checker, but this is more computer displaying the stretching which I think is a handy tool.

Yes there is an option to display UV distortion.
In the UV/Image Editor while in edit mode hit N button to display properties panel and in Display section enable Stretch.
Select Angle to display angular distortion, or Area to display area difference between the UVs and the 3D faces.

Thanks Danis for a quick response, this is awesome! great help! will most definitely use it on my next model.

In Blender 2.8 the stretch heatmap feature isn't in these properties anymore.
In the UV Editor panel on the top right you'll find a dropdown named "Display". Click on it and go to "Advanced > Stretch" and click the checkbox.

You might want to hit "CTRL+Space" with the mouse hovering on the UV Editor window to go into full screen because this dropdown can be hidden behind another panel depending on your workspace setup, just like it was for me. Happy blending !

Since in latest builds "Display" button is gone to show UV stretch you need to go to sidebar (shortcut key "n") than switch to "View" tab and then under "Display" you have expandable option "Overlays" and under that option you have "Stretching" option which is also expandable and has options to choose between "Angle" and "Area".

Thanks. This is like a moving needle in a haystack. Where will it disappear to next?

@MasterJames "moving needle in a haystack" - lol, that's a cool one, have to remember this ! ;)

They moved it again. Blender 2.92.0, possibly earlier versions too. It's in the dropdown near "Show overlays now".


text:
Why is the subsurf modifier not creating smooth geometry?
I'm totally new to Blender. Excuse me, if my problem is dumb.
I'm trying to model something rather simple from a mesh. A handle. When I try to merge vertices of those two highlighted faces, I'm getting pretty awful result with subsurf modifier. The same thing happens, when I snap one face to another and then remove doubles. I guess the root of the problem is something simple, but can't figure it out.

And the result:

Scale along the Y axis to 0 (S > Y > 0), delete the faces (X > Faces), and remove doubles (W > Remove Doubles). The issue you are having is there are internal faces, if you just remove the doubles, then there is still a face inside of the mesh, which leads to this weird artifact.

Now I get it. I forgot about those faces. Thanks a lot!


text:
How do I get a user defined filepath in Blender with python?
I have to allow users of my addon to select a path via the directory browser window of blender.
Instead of using this

I used Operator in panel to get the folder path from user as follows

I tried lot of ways and I referred this and still trying....
Here is my code, for operator to browser the folder and set it.
class OBJECT_OT_find(bpy.types.Operator):
bl_idname = "object.find"
bl_label = "Select Path "

directory = StringProperty(maxlen=1024, subtype='FILE_PATH', options={'HIDDEN', 'SKIP_SAVE'})
filter_image = BoolProperty(default=True, options={'HIDDEN', 'SKIP_SAVE'})
filter_folder = BoolProperty(default=True, options={'HIDDEN', 'SKIP_SAVE'})
filter_glob = StringProperty(default="", options={'HIDDEN', 'SKIP_SAVE'})

def execute(self, context):
    # what to write
    return {'FINISHED'}

def draw(self, context):
    self.layout.operator('file.select_all_toggle')

def invoke(self, context, event):
    wm = context.window_manager
    wm.fileselect_add(self)
    return {'RUNNING_MODAL'}

def register():
 bpy.utils.register_class(OBJECT_OT_find)
 bpy.utils.register_module(__name__)
 bpy.types.Scene.FPath = StringProperty(name="Set Source to Find",
  attr="custompath",
  description="searching Images",
  maxlen= 1024,
  subtype='DIR_PATH',
  default= "")
def unregister():
 bpy.utils.register_class(OBJECT_OT_find)
 bpy.utils.unregister_module(__name__)
 del bpy.types.Scene.FPath

How can I get that path? I want to store and read it.

AFAIK there's no operator to directly do that. Why not your first solution, a DIR_PATH-typed StringProperty?

But the operator works fine. It shows window and I could select folders to set but how to get that path?     DIR_PATH is to select only folders from all files

As far as I know, it's bad practice to create the custom property for the scene in the register function. You can do this in the execute function. Also you shouldn't create it on bpy.types.Scene but on the current scene itself.
For the execute function you can use this code:
def execute(self, context):
    d = self.properties.directory
    bpy.context.scene['image_filepath'] = d   #store the path for later use
    [...]
    return {'FINISHED'}

You only need the bpy.context.scene['image_filepath'] = d if you want to store the path for later use.
You can simplify your register and unregister functions:
def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

You can now run your operator and choose a folder to do something with. If you later want to access the path to the folder you can use bpy.context.scene['image_filepath'].

d = self.properties.directory using d itself I got the path value then why this line bpy.context.scene['image_filepath'] = d...

I thought you, wanted to store the path for later use. If you only need it in the operator, you can skip this. I've edited my answer to make this clear.

How to refresh or set null path when Blender opens save file or new file. is there any way to assign NULL. if I use this, the path wont be null after reopen the blender any idea?

The file path is only saved for the active scene in the current file. If you open another file, the property won't be there. But if you reopen the saved file, it is. To me this seems like the proper behavior. Can you describe what it is you want to achieve exactly and how it should work in your opinion?

Im searching files in the path that what the variable 'fm' have. using fm = bpy.context.scene['image_filepath'] = d. So if I chosen a path in a blender file that would remains in Newly opened Blender file or open saved blender file. I need when I open new or saved file the path want to be null. How?

I still don't understand your problem. If you open a new file, the path is not stored anymore (unless you use bpy.types.Scene..., which you shouldn't). If you don't want the path to be stored, just use it in your operator and forget about it.


text:
What is causing my computer to lockup/freeze during the Blender rendering process?
I'm currently using Blender version 2.93.1 and the file I'm working on uses experimental mode for adaptive subdivision using cycles. I've been running into computer freezes and lockups that force me to hard shut down my computer. They happen whenever I'm rendering and always during the BVH calculations before rendering the samples. While looking at task manager during these renders, it says that Blender uses up 99% of the available memory during rendering. I have 16GB of RAM. Before the computer locks up, Blender drops from around 7500mb to 500mb and then the whole system locks up.
Do you have an idea of what could be the cause?

Adaptive subdivision is a pretty heavy feature. It adds a lot of geometry when you are too close to the object. I would recommend you to stay far away from the object in the view and decrease the dicing rate if you don't have very high quality hardware.

Are you using a low poly mesh ? Maybe you set bump to displacement only and there's not enough geometry to see it