text:
Why Render looks smudgy in cycle engine
I'm having a rendering problem here in blender. The render looks smudgy and this never happened before. Usually, I use a very standard amount of samples around 128-256. I use the blender 3.0 version and cycles engine.
I've already tried everything such as increasing the number of samples, enabling and disabling the denoise settings, using the denoise node, and even I try to increase the number of bounces.
Do you guys have any idea to fix this? it's just annoying

Isn't this just denoising artifacts?

What resolution are you rendering at? The settings we can see look okay to me. Unless you're using both of those denoisers together?

What happenes when volumetric is off? ... probably better to share simplyfied blend just with an element still producing the issue https://blend-exchange.com/


text:
Artifacts on mirror modifier with Subdivision. Normals are correct
So I have these strange Artifacts on this Object.

I tried changing the order of Mirror and Subdiv. modifier but that doesnt help. Normals are correct and no duplicate of vertices.
If I change the Subdivision lebels to 2 it looks stranger.

And when I apply scale in object mode it looks even stranger.

Can you upload your .blend file to https://blend-exchange.com/ ?

Just found the solution

Okay, I found the answer.

I deleted the face of the Object on the Mirror Plane

I Accidently copied the Object and had the same Object overlap itself without noticing.

source: Stack Exchange

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

sort: votes


text:
Enable Mesh Symmetry not working
I am modeling a frame and I want the both extrudes to mirror eachother (Move them to the outside) I have the mesh symmetry enabled and the Origin is in the middle of the object but its not working

can u provide blend file? normally this should work, if the origin of the object is in the middle of the faces.

Are your vertices perfectly symmetrical? The X, Y or Z mirror editing only works when there is a perfect symmetrical correspondance for the vertex you are editing. If there is the slightest difference, it won't work. You can read more about it here https://docs.blender.org/manual/en/2.80/modeling/meshes/editing/mesh_options.html#x-mirror

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


text:
Mirror Modifier, cant move my object closer/over axis. Clipping is not woorking
I mirrored my object (rings on the bottom of the object) on a empty object that i placed right in the middle (Only way to creae what I want I think). So now I want to merge the Area that is on top but I cant move it closer to eachother with clipping on. If I turn clipping off I can mmove it further but then it doesnt merge.

Moving the mirror modifier to the top was the solution


text:
Texture paint changes size and doubles in Layout mode
I Texture a house and want to put some "Wet spots" on it. I am using 2 Shaders with a Image Textures as mask. So I have the 2 Shaders go into a mix Shader with a Image texture that goes into the FAC of the mix shader. As Image Texture I create a Textures Paint in which I use leakage textures to paint the spots.
I first did the window frames wich worked nice.
Then I did th wall but when I exist texture paint it suddenly looks way different.
Inside Texture Paint:

Inside Layout Mode:

I already tried a bit of stuff because I just thaught my settings are wrong or I mixed up a textures but I cant find the error that is causing this.
I used a Concrete texture for the wall which i copied and mixed with a brick textures. The same texture I copied on my windows. My textures look like this:
Window:

Wall:

Unless you use a Texture Coordinate node to specify the Vector input of the Image Texture node then it goes with the default, usually Generated, “automatically-generated texture coordinates from the vertex positions . . . over the bounding box of the undeformed mesh”.  That can change like you've shown for several reasons, one of them being applying object transforms.
For the method you're using to work consistently your mesh should have good UV mapping, and your Image Texture node's Vector input should be using the UV output of a Texture Coordinate node:

In the example above I've painted a tear-track on an image texture which I'm using as the Factor mask of an RGB Mix node -- because Suzanne is UV mapped, and I've used the UV output of the Texture Coordinate node in the Vector input of the Image Texture node, the tear-track is correctly positioned under Suzanne's eye.

In all honesty, I dont really understand the different Texture Coordinate different Settings but I wanted to try what you suggested. Yesterday evening I deleted all my nodes. This morning I set up everyting again and it just worked. I think I didnt UV Map my wall. I would still be happy if you could explain thedifferent use cases of different Texture Coordinates or provide a site where I can read about it. Thank you!

I'm glad it's working now, but from your question it seems that earlier this "just worked" until it didn't, that may happen again.  And don't worry about understanding all the Texture Coordinate outputs, most people only use a couple of 'em.  But in general it's a good idea to start with the Blender Manual:  https://docs.blender.org/manual/en/latest/render/shader_nodes/input/texture_coordinate.html


text:
My Geo Nodes are gone? Object is there but anything else gone
Probably super dumb but I cant find my geometry nodes. If I go into the geo nodes viewer and select the second Node Tree entry I get to the some small objects I distributed around my main object but if I click on the first entry it is completly empty ( I clicked home button to make sure it not just out of sight or something).

The first image has GN listed but it is not assigned to selected object. Is it possible GN is used for some another object? What do you see in Modifier panel? Does the GN listed there?

YES! It was listed in the modifier panel and when I  clicked on "Output Attributes" the Nodes appeared! Thank you


text:
Boolean difference not making any diiference (Python scripting)
I'm using Blender 2.76 on a Win 7 x64 machine.
I should warn you I'm new to Blender & its Python API although I have used Python extensively before I'm no expert.
I run the following script after start up (ie the default cube is already in the 3D work space).
import bpy

cube1 = bpy.context.active_object
bpy.ops.transform.resize(value=(2.0, 2.0, 0.9))
bpy.ops.object.modifier_add(type = 'BOOLEAN')
bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0))
cube2 = bpy.context.active_object
cube1.modifiers[0].object = cube2
cube1.modifiers[0].operation = 'DIFFERENCE'
bpy.ops.object.modifier_apply(apply_as='DATA',modifier=cube1.modifiers[0].name)

My aim is to create a square hole through cube1 but so far I end up with no change to anything.

I tried swapping cube1 for cube2 & this cut cube2 with cube1.
import bpy

cube1 = bpy.context.active_object
bpy.ops.transform.resize(value=(2.0, 2.0, 0.9))
bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0))
cube2 = bpy.context.active_object
bpy.ops.object.modifier_add(type = 'BOOLEAN')
cube2.modifiers[0].object = cube1
cube2.modifiers[0].operation = 'DIFFERENCE'
bpy.ops.object.modifier_apply(apply_as='DATA',modifier=cube2.modifiers[0].name)

So what am I missing here?
EDIT:
I tried to flip the normals of cube2 (see code below) as per the comment below but this appears to have had no effect.
import bpy, bmesh

cube1 = bpy.context.active_object
bpy.ops.transform.resize(value=(2.0, 2.0, 0.9))
bpy.ops.object.modifier_add(type = 'BOOLEAN')
bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0))
cube2 = bpy.context.active_object

b_cube2 = bmesh.new()
b_cube2.from_mesh(cube2.data)

bpy.ops.object.mode_set(mode='EDIT')
for v in b_cube2.verts:
    v.select = True
bpy.ops.mesh.flip_normals()
bpy.ops.object.mode_set(mode='OBJECT')

b_cube2.to_mesh(cube2.data)
cube1.modifiers[0].object = cube2
cube1.modifiers[0].operation = 'DIFFERENCE'
bpy.ops.object.modifier_apply(apply_as='DATA',modifier=cube1.modifiers[0].name)

The darker, smaller cube in your scene probably has reversed normals. Fix it by selecting all verts in edit mode and pressing Ctrl + N. This confuses the boolean modifier and might result with a different operation than expected.

I just attempted to flip the normals (see EDIT in OP) but this seems to have had no effect.

Setting the context object to cube1 with context.scene.objects.active = cube1 or context.view_layer.objects.active in 2.8, before running the apply modifier fixes it.  Object operators run on the context.active_object, which was cube2.
import bpy
context = bpy.context
scene = context.scene
cube1 = context.active_object
bpy.ops.transform.resize(value=(2.0, 2.0, 0.9))
bpy.ops.object.modifier_add(type = 'BOOLEAN')
bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0))
cube2 = context.active_object
mod = cube1.modifiers[-1] # last one added
mod.object = cube2
mod.operation = 'DIFFERENCE'

#scene.objects.active = cube1 2.79
context.view_layer.objects.active = cube1 # 2.8

bpy.ops.object.modifier_apply(modifier=mod.name)

A less operator-centric approach
import bpy
context = bpy.context
scene = context.scene

cube1 = context.active_object
cube2 = cube1.copy()
# create a copy of mesh data, for bool mod
cube2.data = cube1.data.copy()
cube1.scale = (2.0, 2.0, 0.9)
mod = cube1.modifiers.new("SomeName", type='BOOLEAN')
mod.operation = 'DIFFERENCE'
# uncomment below to have cube2 in scene
#scene.collection.objects.link(cube2) 2.8
#scene.objects.link(cube2)
mod.object = cube2
bpy.ops.object.modifier_apply(modifier=mod.name)

The modifier apply operator can also be replaced with, in < 2.7x
scene.update()
cube1.data = cube1.to_mesh(scene, True, 'PREVIEW')
cube1.modifiers.remove(mod)

or for 2.8
How do I get a mesh data-block with modifiers and shape keys applied in Blender 2.8?

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


text:
Changing colors via button clicks
Well I want to change colors of the blender models by button clicks in the web app I am making. Kind of like the html color picker. Any idea how to do it?

When you click a colour property you get a colour picker pop-up

sorry about that.. my question was incomplete.. I want the colors to change via button clicks in a browser window..

This can be done using a combo of Blend4Web's Switch Select and Set Shader Node Param logic nodes.
Feel free to ask for an example blend file on the B4W forums.

Watch this tutorial, I hope it serves you.

authors: Владислав Калиниченко

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


text:
How can I test if a mechanism works well before printing?
I'm not new in Blender but I'm really new in 3d print. I want to do a mechanism with, lets say, two gears and one handle, and I want to test, rotating the handle, if the mechanism works well before printing.
The only solution that I found is use the rigid body simulator and drop a mesh to one of the gears and see rotate.
But what I need if there any way to rotate a handle and see if the gears works well each other before print the model.
I want to rotate the handler to test the model, is that posible?
Thanks in advance!
UPDATE:
After search a bit more I found a solution :D I use the Rigid body physic to simulate the mechanism.
I add a constrain to the red gear to act like a motor, so the gear rotate by itself. I saw the use of the constrain in this video https://www.youtube.com/watch?v=XcO8ovnr_Z0 (wich I recommend to see)
Thanks for the answers!
This gif probe that I made it (?)

You could try simulating it with rigid body physics. However, note that blender's simulator is more intended for effects; there's no grantee it will work the same in the real world. That said, I've heard of it being successfully used to e.g. to check if a statue will balance.

After search a bit more I found a solution :D I use the Rigid body physic to simulate the mechanism.
I add a constrain to the red gear to act like a motor, so the gear rotate by itself. I saw the use of the constrain in this video https://www.youtube.com/watch?v=XcO8ovnr_Z0 (wich I recommend to see)
Thanks for the answers!
This gif probe that I made it (?)

What you may want to try is you can import it into a website called Onshape, it is a free cad software, it requires an account but after that you should be good. You can import meshes into it, there are many tutorials online if you need help.

Altough this is not the solution that I need, I have to thank you because I don't know about this website. Definitely I will use this tool in the future :-)

I recently designed elliptical gears for a school project. I wanted to find out whether the gears would rotate or whether the teeth would get stuck. It turned out that blenders simulating capabillities weren't enough, so I had to manually animate the gears and check for every frame if there were overlapping teeth. This process was tedious, especially because it had to be done multiple times, but in the end it proved to be a reliable method. Note that this method only shows that the mechanism is capable of moving without getting stuck, and that some common sense is still required when determining whether or not it will actually work.
One of the animations:

As for the example in your question, you're in luck. Regular gears only require you to animate the movement until the next teeth takes the position of the first, after which you can check whether anything overlaps, and if everything looks about right it will most likely work.

There is a generator for gears on woodgears.
Maybe try it for your gears.
http://woodgears.ca/gear_cutting/template.html


text:
Rigging a differential aileron command
A bit of context first. I'm trying to model an RC plane, using blender as a kind of CAD software:

In the process, I try to model the actuators, i.e. rudder, elevator and ailerons. I did manage to rig the tail unit using some IK chains, but I am stuck with the ailerons control.
The rig
The idea is to have the servo arm command the ailerons movement.
The mechanical system has three components:

a servo arm (blue)
a crank (brown)
two symetrical aileron command rods (silver)

First, the servo arm rotates (1), pushes the crank through a rigid link (2), forcing it to rotate too (3).
This part is easily rigged with a couple of bones.
Second, each aileron command rod slides into its crank slot (4), thus being forced to rotate along its only free axis (5).

Key constraints

a typical servo has a +-45° course, while the ailerons might have another (+20°/-15° in my case, if I want to mimic the real plane). Since aerodynamic constraints do no scale well, I would rather make provisions for other values.
aileron movement is asymetrical, i.e. the deflection is greater upwards than downwards. Having a limited downward course helps preventing adverse yaw.
aileron hinge direction is dictated by wing geometry, and is not aligned with any global axis. The difference is about 6° on Y and 4° on Z.
the aim of the rig is to provide me with the key locations needed to design the crank: main axis, aileron rod slots and servo linkage hole.

In real builds, most of the time, you can approximate this movement by a simple rotation (assuming the contact point between the crank and the rod is stationary, which would require it to travel on a plane/cone intersection, i.e. an arc of hyperbola approximated by a circle). Small mechanical adjustments will take place to compensate (the structure or rods will move or warp slightly, at the cost of more strain on the servo and a small loss of precision).
I could live happily with that, but I find it interesting to see how blender would allow to produce a more accurate solution.
Design parameters
The crank/aileron rod movement is rather complex, being a composition of rotation and translation that depends on the relative positions of the crank and the rod (which, again, are not aligned in any way).
I figure the key is the contact zone between the crank and the rod. If I could get an empty to follow it as the crank rotates, the rest would be easy.
As far as geometry is concerned, this zone can be approximated (neglecting thicknesses) as the point of intersection between the crank slot (whose shape can be chosen arbitrarily within certain limits, though assuming it's a fixed point is bound to produce some degree of approximation) and the cone swept by the rod end as it rotates around its axis.
Servo position is likely to change, mainly on the Y axis, to balance the plane's CG
Aileron command rods geometry is highly constrained. The only parameters you can play with is the hinge length (as long as it fits within the fuselage) and the angle/length of the upwards end.
The crank is the main variable part.

It can be placed at any height and should be as large as possible (larger means more precision), so I bet the sweet spot is near the height where the fuselage is broadest.
The link with the servo must be symetrical, so that both ailerons have a proper opposed motion. Playing on the distance from the axis allows to change the rotation course of the crank.
The slots guiding the aileron rods can have an arbitrary shape, though a straight line is preffered (the part is quite small considering the plane scale and is supposed to be cut out of thin plywood by hand, so a complicated shape would be difficult to reproduce precisely).
Their lateral offset from the crank's axis will define the proportion of upward/downward motion. This can be calculated approximately with a couple of arccosine, but I'll be happy to tune it manually by trial and error.

Any idea how to tackle this problem?
EDIT:
some contributor posted an interesting answer in another thread I posted trying to come up with a more general problem, though it did not fully answer this question (here I need a cone-line intersection, but having a practical means of intersecting two lines would get me closer to the solution). The answer is still useful as an elegant approximation.
The trick is, the contact "point" between rod and crank (neglecting thicknesses) is neither stationary relative to the rod nor the crank, so any solution using a fixed empty parented to the rod or the crank is bound to be inexact. It will either position the rod outside the slot or deform/displace it at some point of the trajectory.
EDIT 2:
the suggestion of letting the rod slide along its axis and somehow compensate for it might be worth a try. Still, the problem is, the rod main axis (i.e. the aileron hinge) has no alignment with the crank axis : it is rotated about Y by wing dihedral and about global Z by the  slanted wing shape, so any trigonometry would have to consider some vector cross product, not just an angle along some global axis. Same goes for the rod end, which can have an arbitrary orientation relative to the hinge.

You could allow your horizontal rod @ '5' to slide horizontally, and calculate the horizontal movement by the cosine(rotation angle of '3') - the distance gained from the slide along the sloped part of the rod.

I'm not sure why these two questions are split? Link to Other Question & Answer

well the other question is more general, and actually does not solve my particular problem, It would allow to design a better approximation of the actual cone-line intersection though. I think a practical answer to it (i.e. not requiring to mess with PyDrivers) might be useful to people not interested in differential aileron rigging :). I would rather see your answer move to this thread. As for an analytic solution to the problem, I had given up on it, but your suggestion of letting the rod slide and compensate for it is interesting.

Looking back at it closer after your comments, The math is correct to follow the empty. How often blender updates the information is causing a delayed update issue. The only thing that technically needs to change is the hole/slot shape to allow for the elliptical changes along the rotation. Fun problem thanks for putting it out there.

Well thanks to you for your help. Still, as I added in the question, the aileron hinge is not aligned to any global axis, while the crank has to be at least aligned with X and Z (since it will eventually drive both ailerons symetrically), and rotating it about Y would not really make the problem simpler as far as I see it.

I had one thought that may simplify some of the design. I was thinking about maybe just using a rubber grommet where the rod meets the crank. that way you could use a shape key or something for the inside cylinder face to follow the rod, and the perimeter of the grommet would still hold its position to the crank. I figured it would help when the rod rotates in the hole and becomes elongated. That way if you were to have to go with a hole vs. slot approach, at least you could mimic reality a little better on the attempts. Anyway hope it helps.

Well I actually came up with a pretty exact solution, though explaining how I did it is quite a bit of work. I'll see if I can post an answer about that.

I would set this up using constraints. Starting with the servo arm I have added a Limit Rotation constraint so that it can only rotate from -15 to 15 on the z axis. This just makes it a little easier to use as you can start rotating from anywhere and it will only rotate on the set axis and within the limits.

The conrod between the servo and the rear arm is only for appearance but I have setup a Transformation Constraint for visual consistency and completeness. The transformation constraint can get confusing, in this config I have the z-rotation of the servo arm translated to x-location of the conrod. When the source and destination axis varies you need to set what axes are linked in the Source to Destination Mappping in the centre of the panel.
In this example, when the servo arm rotates from -15 to 15 the conrod moves -0.6 to 0.6 on the x axis.

For the rear arm I also have a transformation constraint. While a Copy Rotation Constraint can be used for direct rotation mapping, I chose to also use a tranformation constraint so that adjustments can be made. For example you could set the source rotation to be from -15 to 15 while the destination is from -30 to 30 - when using that configuration the rear arm would rotate twice as much as the servo arm.
For the conrod from the rear arm to the aileron I also setup a transformation constraint, in this one I have set -20 to 20 in the source z-rotation maps to -20 to 20 x-rotation on the conrod.

This provides the following animation. (could use a little more fine tuning)

You can have a closer look here

I agree the first link can be simulated with a transform constraint, though I find it easier to use an IK chain, so that moving the anchor points recomputes the rotation automatically. This can be done with trigonometry, but if the anchor point is not aligned with the transversal axis it becomes complicated. For the crank-rod link, the resulting movement is highly non-linear, so a proportional driver will not do the trick. As long as the aileron hinge is not too misaligned with the crank, it will be hardly noticeable, but at the extremities you can see the rod moving out of the slot.

That's were I mean it needs some fine tuning, I set using 20 and 20 as a quick demonstration but it may need to be 20 on the source to 22 on the destination, the pieces will need to be positioned at the right distances to get the right transformation settings.

Given the positions of items in my example changing the destination rotation of the aileron conrod to -16.9 and 17.6 gives a good tracking over the keyed motion. As shown here

Anyway a F curve would allow to compensate for non-linearities. The only problem I see here is that you start with a geometry and tweak the parameters to make it work, while I would rather fid a sound rig relatively easy to modify, so that I can try different shapes and positions for the rods and crank and have the rig follow.

The constraints can also be applied to bones. I tend to think of constraints as pre-made drivers with a gui control.

Yes indeed, but I find the IK trick more convenient when the aim is to design a part out of geometrical constraints. Here I want to have a crank as big as I can cram into the fuselage, in order to increase accuracy. I also would like to design 2 or 3 different cranks to allow various degrees of differential excursion, etc. So my ideal solution would be a rig that can show me the crank axis and slot positions to achieve a certain setting, and allow me to check if everyting moves smoothly, without bumping into other control rods or various parts of the structure.

Here is what I came up with. For one thing, it works. On the other hand, it's not especially simple.

The blender file is rather a mess, but it might help following the explanations.

Problem analysis
My goal was to manage to get an empty to follow the point of contact between a rod and its slot.
To manage that, I figured I had to find a set of constraints simple enough to be handled by blender without resorting to python code.
After much trial and error, I came up with a way of constraining an object to follow the intersection of a segment and a plane.
This was the eureka moment, since the course of this contact point can indeed be described as a plane/segment intersection.
If you look at the aileron command rod, its end sweeps a cone as it rotates around the aileron hinge. However, if we orient this end at a right angle with the hinge, the cone degenerates into a disc:

The disc itself is located on a plane that can be described with a normal vector and a reference point. Here the vector is the hinge direction and the reference point is where the hinge and the end meet. Note that even though the rod rotates, this point remains stationary.
Now we can define (arbitrarily) the slot geometry as a segment running parallel with the crank axis, and define an empty that will follow the intersection of the slot and the rod trajectory.
Slot geometry choice is guided by simplicity, but efficiency too: this orientation will exert maximal force on the rods when close to neutral position, and become somewhat less efficient at the end of the course.
Rigging the rod/crank contact point
First thing is to reorient the command rods with a local vector (X in this case) aligned with the hinge, and put their origin on the hinge/end junction. That defines the reference planes I need.
The other two local vectors do not really matter, though having one aligned with the end can be convenient to reposition the rod tip.

Now for the slots. They are simple X-aligned two-point paths parented to the crank.
Lastly, an empty representing the famous contact point is created for each aileron.
This shot shows the left aileron command rod, slot and contact point (the crank itself is hidden) :

Here is the constraint stack on the contact point:

Getting the "Floor" constraint to work as intended (i.e. make the empty stick to the plane) was tricky.

I had to move the empty rest position (i.e. when constraints are disabled) far back along the slot to make the constraint work during the whole course of the crank. I suppose whatever intermediate position blender computes for the "clamp to" operation has to be located on the positive X side of the plane, and if the rest position is too close from it, it eventually crosses the plane and makes the "Floor" constraint fail.
The rig seems to work better when the empty is parented to the slot. This makes its local vector X point directly along the slot direction, possibly increasing the "clamp to" constraint efficiency.

Now that I have my contact point, the rest is easy.
Rigging the servo/crank link
The servo arm is the commanding element (actually I rigged it to an empty allowing to rotate ailerons, rudder and elevator, but it's the start of the ailerons command chain anyway).

An empty is positionned over one of the linkage holes and can be easily moved to change linkage amplitude.
An IK chain uses this empty as a target to produce the crank axis rotation.

All 3 bones are unstretching. The "rod" rotates freely, the "crank" is immobile and the "axis" can only rotate along, well, the crank's axis.
Finally, the crank itself has a "Transformation" constraint on the "axis" bone to copy its rotation directly (the "Transformation" constraint is only needed to switch from Y to Z axis).

This makes repositioning the servo or changing the linkage points rather easy. All you have to do is edit the IK chain and move a couple of bone heads/tails around.
Of course the crank rotation could be computed with some trigonometry and programmed with a "Transformation" constraint based on the servo arm, but I would rather fiddle with a few bones than with arctangents and proportional coefficients.
This IK chain allows to work on the actual geometry without takig measurements. For instance the maximal crank width is constrained by the space available inside the fuselage, and I find it more convenient to reposition the control points and check the effect visually.
Rigging the crank/rod link
Here again I set up an IK chain for each aileron.
The target is naturally this famous contact point, and the chain goes back to the aileron hinge to determine its rotation.

Only two bones are used. The "hinge" is unstretching and can only rotate, well, around the hinge. The "arm" is not allowed to rotate, but stretches toward the contact point. This represents the rod as a rigid body only allowed to rotate around the hinge.
Same as before, the whole aileron (including the rod itself) has a "Transformation" constraint to copy the rotation around the hinge.
How come this thing works?
To sum it up:

someone rotates the servo arm
the first IK chain rotates the crank (including the rod slots and contact point)
the constraints on the contact point do their magic and move it where it should be
the second IK chain follows this contact point and finally rotates the aileron (including the command rod)

There is actually a kind of circular reference here: the contact point depends on the rod rotation and vice versa.
I suppose what makes the thing work is that the plane defined by the rod is invariant through rotation (the rotation does not change the reference point and vector needed by the "Floor" constraint that positions the contact point).
As a matter of fact, you can see the rig having difficulties to follow the chain. Fiddling with the servo arm angle (adding/substracting one degree or so) seems enough to get the rig to position properly.
Tuning the rig
The crank height and width is chosen to fit it in the broadest section of the fuselage, with a few mm of leeway. This maximizes its size, and hopefully minimizes the errors due to imperfect manufacturing of the part.
Once the crank is roughly positioned, the neutral position is setup. This is easily achieved by moving the slots along the Y axis until the ailerons become flush with the wings.
Now the Y position of the crank is chosen to achieve a desired ratio of upward/downward deflection. The further the slots are away from the crank axis, the greates the difference between up and down course. This can be approximated by a couple of arccosine, but I confess I simply did fiddle with the rig until I reached the proper ratio.
Moving the crank without spoiling the neutral position is a bit tedious, but manageable.

unparent the slots from the crank
move the crank as you see fit
edit the servo/rank IK chain and move the two last bones the same distance as the crank
re-parent the slots

The little red thingies you can see in the animation were quite convenient to visualize aileron deflection. The transparent "wings" are two faces defining the max up and down deflection angles, and the "rod", parented to the aileron, acts as a visual deflection indicator.
Once the proper ratio is achieved, you only have to fine tune the actual excursion. There are two ways of doing it. You can simply adjust the servo/crank link (increasing the crank linkage distance will diminish the exursion and vice-versa), or you can play on the hinge length.
I prefer this solution, as it keeps the crank as big as possible.
To modify the rod length, you only have to move the hinge end along its axis. Of course, moving this point in any other direction will spoil the hinge orientation and ruin the whole rig, so proceed with care. The tip of the rod can then be adjusted to follow a perpendicular direction. Note that the tip of the rod is not necessary for the rig to work; adjusting it only provides visual consistency.
Modeling the crank
Once the rig is tuned, finding the end points of the slots is as easy as moving the servo arm to its extreme positions (+-45°) and see where the contact point moves.
With all the reference points available, the actual crank object can be modelled any shape you like, as long as it is big enough to include the hinge, the servo linkage point and the slots (and does not collide with other parts of the model).
It could even be possible to design a crank that would support various settings: if you keep track of the positions of each components and tune the rig to achieve a couple of different up/down ratios, it's easy to design a shape with a couple of slots and holes, just like a servo arm has 2 or 3 different holes to adjust linkage amplitude.
Validating the concept
One advantage of this rig is that you can visually see the precision of the simulation by looking at the distance between the computed contact point and the tail of the aileron IK chain:

If you zoom on the contact point, you can see some slight misalignment, no doubt due to the iteration errors of the IK chains and/or constraints.

This kind of precision can only be achieved if various model parts (especially the wing and ailerons) are properly aligned. I actually had to redo a bit of the right aileron to come up with a nice symetrical rig.
Studying the response curve (i.e. actual aileron deflection vs. servo arm rotation) confirms the non-linearity of the system : a given servo rotation increment will have more effect on the upward tilt.
Clearly, this response curve could replace the whole rig, but the advantage of the rig is that it can be tuned much more easily for different configurations than what could be achieved by "guessing" the proper response by fiddling with some F-curve!
Some further work
I'm rather new to blender, so I have no doubt there are many ways of doing the same thing more easily/elegantly.
I would be glad to hear about possible improvements.
Anyway, getting this thing to work was fun :).


text:
Why does this mesh deform while weightpainting?
When trying to weightpaint my mesh some mesh gets deformed.

I searched for an answer and found this question, but the solution does not work. The problem only affect some bones - all bones which have a IK. If I subtract the weight paint the deformation goes back to normal.
The .blend file can be found here

When I subtract the weight paint the deformation goes back to normal.

Can you upload your .blend?

The post now links to the .blend file

Hi, please use http://blend-exchange.giantcowfilms.com/ in future for file-hosting. See: http://meta.blender.stackexchange.com/questions/630/announcing-blend-exchange-a-new-solution-to-blend-hosting

Okay, will use that in the future. I'm new to this forum and didn't know that was a thing. Thx for the advise.

Solution found!
The bones with a IK property applied to them where rotated slightly. This made so that the mesh rotated around to match the rotation of the bone.
How to fix
Check the rotaions of the bones in the vicinity of the deformation, in this case resetting the rotation on all the bones (suggested here) didn't help. I had to manually rotate the bones so that they didn't longer deform the mesh when the weight paint was applied.

Notice that the Z-rotaion is not 0.

if you switch your armature to rest pose in the armature tab, properties editor, you can be sure that all bones are in their default orientation and location, even with constraints on them. thats easier and faster than manually trying to find them and resetting values.


text:
How to smooth or blur a procedural texture?
I am looking for a way to smooth/blur the edges of a crunched procedural texture using nodes. (for example a noise texture)
The way I want to do this is by placing 'the solution node setup' between nodes for full control.
Also, is it possible to have the scaling of the blur always match the input size?
(so that the image won't get blurred more or less when aplied to a different model.)

I want to achieve a result like the image shown below:

PS: feel free to edit the question if my english confuses you :)

May be helpful for you: http://blender.stackexchange.com/questions/9394/how-to-blur-a-texture-node-in-cycles-material

To blur such a procedural texture, you can't simply add a 'blur' node or similar at the point you indicate. Instead, you need to manipulate the input Vector to distort the texture and then rely on the Render Samples to produce the blurring.
One easy way of achieving this is to add the nodes shown.

Use the relevant output of the Texture Coordinate node (Generated, Object, UV, etc) depending on how you want the texture (and blurring) to be applied. The 'Subtract' node is set to its default (mid-gray) with factor set to 1.000 - this is to adjust the Noise texture to ensure the blurring is even. The Noise texture is set to a very high scale and the Factor of the Add node can be adjusted to change the strength of the blur (0 = no blur, 1.0 is maximum blur).
As mentioned, you should set your Render Samples (on the Render properties) to a higher value so as to allow the rendering enough samples to produce a clean 'blur'.

Examples showing no blurring and blurring :

Sorry for the extremely late response. You have a nice solution to blurring the noise except it's not exactly what I'm searching for. I need the blurred output image for a displacement input. Any thoughts?

Hi @Delagone in that case, for displacement, you'll be best saving the texture at a resolution suitable for the resolution of the mesh that you are displacing and then blurring it in an external package (eg, Gimp - Filter, Gaussian Blur, and adjust it for the level of blurring you require). That way you'll get an efficient and consistent blur rather than dynamically generated. Due to the Vector nature of how procedural textures are produced I don't think yhere's any other way as multi-sampling won't work for displacement.

@RichSedman Ok, Sure would be nice if we could have something in blender to do such things internally from an artistic point of view. I'm thinking procedural rock generation and stuff... . Just to give it that extra oomph.


text:
Cycles nodes for viewing angle/making parts of mesh invisible
I'm trying to create a material that causes parts of a mesh to become invisible when the camera view is past a certain angle.
[EDIT: New example including a node setup]
For example, when viewing a plane with this material, I want to make the parts outside of a central cone disappear. The following Suzanne is being viewed by the camera. The "cone" is 1/2 the viewport and she is completely inside it:

When I zoom in, parts of Suzanne that are outside the "cone" disappear. Here is the material view:

Here is the render view:

This is my current node setup:

This setup uses the camera view vector and computes the distance from the center to the shading point (sqrt(x**2+y**2)).
Is this a good way to go?

Does the facing output form the layer weight node (found under input) provide what you are looking for?

I don't think either the layer weight node or fresnel technique are what I'm looking for. The effect I want does not depend on the mesh normals. It only depends on whether a part of the mesh is inside or outside a virtual cone whose apex is at the camera position.


text:
Arrays along two paths -- possible?
I am trying to figure out how to create something like a bracelet where an object is arrayed around two different curves.
Example: Imagine a small gem that I want to be duplicated on the surface of a torus. I can create a gem, a small circle curve (the minor radius), and a larger circle (the major radius). I can create a curve modifier for the small circle and then an array modifier to get the gems to form a ring. But is there a way to array this assembly around a larger, perpendicular circle?

I can apply the first array and curve constraints before adding more curve and array modifiers, but this is destructive -- I want to still be able to edit the gem, etc.
Thanks!

What is wrong with adding a second array+curve modifier on top of the existing ones without applying? Apart from a potentially slow update and laggy interaction it should mostly work without issues

You can redo the array and curves modifier combos: Here is a blend file with the setup (you just need to change one monkey, everything will change automatically since its non-destructive):

Instructive example! One detail surprised me -- the large circle was scaled up 5x. If I apply the scale to the circle (making it 1x), suzanne gets very distorted.

There are many things that you have to pay attention with the curves modifier: origin, scale, and axis. If you apply scale, location and rotation, the axis of the origin will shift to the current world axis, and ou might to update your working axis on the modifier. You migt also need to pay attention to other details! I totally recommend you to search for advanced tutorials on uses of the curve modifier! Good luck!

Select the curve, press Shift-S and select Cursor to Selected select the chain, press Shift-S and select Selection to Cursor
Then apply your curve modifier and the objects will follow the curve correctly.
The deformation is fixed scaling the object


text:
Rigging a square face to stay coplanar
I have an armature for deforming a mesh, using a solution in this question, but when it is posing, the faces get distorted. I don't understand exactly why or how to fix it.
Here is the rest pose:

I assigned vertex groups for the bones to control the popup (the green mesh). As the book closes, the popup folds and the faces get distorted like this:

The popup has two faces, one bone crossing each face. Notice the circled part -- one of the popup faces is being divided and half is bending. I really want the vertices to stay co-planar. Do I need additional bones, constraints, or what?

Update:
I found another way to achieve this effect by using drivers instead of bones.
Start by separting the book and popup meshes into left/right objects. Set the object origins so that rotation works along the book binding and popup bottoms (where they attach to a book page). Then parent the left popup to the left page, and likewise for the right hand side.
The idea is that the left page opens/closes by rotating on the Y axis. And the popups rotate up/down according to the book open/close angle.
The popup rotation depends on only two factors: 1) the book rotation, and 2) the offset angle of the popup, i.e. how "canted" it is (20 degrees in this example). The offset angle is a constant, and the book rotation depends on the animation.
Implement the popup rotation via a driver and a python script. The formula is messy (at least I found it to be so). I'm happy to share details, if there is any interest.

"I'm happy to share details, if there is any interest."  Suggest that if you have an alternate answer to your question, add as  an answer, not as an [edit] to question.

You want to control the bone roll (Y axis rotation) of the pop-up bones.  This is done most easily with a locked track constraint.  Unfortunately, constraints don't play nicely with IK.  But it's entirely possible to make it work, using an additional bone.
Start by entering edit mode on Armature Popup.  Start by selecting the head of Popup_Center and snapping the cursor to selection (shift s menu for me.)  Now, select Popup_L and duplicate it.  We'll rename that bone to defPopup_L.  Now, with defPopup_L selected, recalculate roll to cursor (ctrl n menu for me.)  Finally, parent defPopup_L to Popup_L.
Change to pose mode.  Delete the (duplicated) IK constraint on defPopup_L.  Give it a locked track constraint, targeting the head of Popup_Center, set to Lock Y axis and Track Z axis (recalculating the roll set the Z axis to point at the cursor.)
Finally, set your mesh object (chiclepopup) to use this new bone instead, by renaming the Popup_L vertex group to defPopup_L.
Repeat this process for Popup_R if you'd like: duplicate it, parent the duplicate to the original, set the roll with a recalculate operation, give it a locked track constraint instead of IK, with appropriate settings, and make sure your mesh is using your new bone for deformation.

Thanks for your thorough answer! I will take a little time to implement it and report back.

This is brilliant, and it taught me new things!


text:
DopeSheet/GraphEditor : How to detect/change, with API, displayed frame range
Is there a way to detect (and change) displayed frame range in dopesheet and grapheditor using python API ?
I am not talking about frame start/ frame end or restricted frame range, but what is the lowest and highest frame visible on screen (that can be changed with scrolling for example)
I can't find data for now on API documentation.
Thanks !

Yes, I want to access this data by python API

You need to access the View2D of the region you want (so dope sheet for example). Then you need to change the context to this region and run these operators: https://www.blender.org/api/blender_python_api_2_77_0/bpy.ops.view2d.html. You can also change the view2d direcly

Ok, I will check that. That answers "how to change" data, but it's only based on x/y delta, or zoom factor, but not on frame displayed

Yes, you cannot change that based on frames that fit into the window. You would have to calculate that from zoom factor, size of the region, and the xy delta.

Have a look at http://blender.stackexchange.com/questions/38939/focusing-the-graph-editor-area-to-a-custom-frame-keyframe-value-range  I found that having envelope modifiers on the fcurve didn't give me the focus I wanted on graph editor (using bpy.ops.graph.view*) to display soundbar BGL vis below and resorted to making a dummy 3 point action with the desired frame, value range and callingbpy.ops.graph.view_all(c) had the desired result.  You may find some of the other bpy.ops.graph.view* operators give you the focus you want.

The frame, value from the region coords can be obtained from view2d.region_to_view
import bpy
from mathutils import Vector
context = bpy.context
c = context.copy()
for i, area in enumerate(context.screen.areas):
    if area.type != 'GRAPH_EDITOR':
        continue
    region = area.regions[-1]
    print("SCREEN:", context.screen.name , "[", i, "]")
    c["space_data"] = area.spaces.active
    c["area"] = area
    c["region"] = region

    # region size
    h = region.height # screen
    w = region.width  #
    bl = region.view2d.region_to_view(0, 0)
    tr = region.view2d.region_to_view(w, h)
    print("region bottom left (frame, value)", bl)
    print("region top right (frame, value)", tr)

    range = Vector(tr) - Vector(bl)

Note from Getting area (region.view2d) pixel coordinates of 2D views (VSE, NLA) how to get the scrollbar width.
As for setting the region to a desired frame value range, I have found using bpy.ops.view2d.anything an absolute nightmare, of finding rhyme or reason, and instead have used the methods outlined here Focusing the graph editor area to a custom [frame, keyframe_value] range using bpy.ops.graph.view* operators in the graph editor, and I expect would work similarly in dope sheet for bpy.ops.action.view*.


text:
Operator to call export menu
I have to create an operator to perform some tasks (manage selection / hide / unhide), and then call export menu.
I coded the following:
bpy.ops.wm.call_menu(name="INFO_MT_file_export")

But I have "No filename given" when I choose the exporter, after menu displayed.
I know that if I want to call only 1 exporter, I have to give 'INVOKE_DEFAULT' to be able to choose file:
bpy.ops.wm.collada_export('INVOKE_DEFAULT')

But I don't know how to manage when I want to call the menu, not a specific exporter.
Any ideas ?
Edit : Here is example code : http://www.pasteall.org/75201


text:
How to add noise to background image?
I made a  video in blender. It is basically a short clip with an animated character and a still background image. I am rendering with Cycles and I have set the render seed to be generated for each frame separately. However, I feel like my video seems faker, just because, contrary to the character, there is no noise in the background image. Is there a way to add noise to the background image and to make it change every frame?


text:
Simple way to create text overlay w/ color and other options [Blender Video Editing Mode]
Instead of going to the 3D Modeling Mode, creating a text, rendering it, and importing it into the sequence, is there a quick way to create a transparent background text overlay?
EDIT : I have seen the subtitle solution in Add>Effect Strip>Text but it does not give me the option for things like color, outline, and other options of that sort.


text:
Copying blender log to a script
I'm new to blender. I've just got 2 days of experience with it now. I've got a lot of programming experience, but I have not programmed in python before.
I want to render animations for bunch of audio files I have.
I thought I could copy the python-code blender logs, into a script. This seemed to work, I've got some bars which respond to the audio by using the GUI and copying the python coe it logs. I changed the code so I can dynamically set the number of bars, etc.
All went well until I tried to apply a material.
I've worked the problem down to minimal example, just 4 lines:
On an empty stage I create a plane and assign a (new) material to it.
First draw the plane:
bpy.ops.mesh.primitive_plane_add(radius=8, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
This also works from the console, a plane is created.
bpy.context.space_data.context = 'MATERIAL'

This fails on the console:

AttributeError: 'SpaceConsole' object has no attribute 'context'

But it seems to be the command to switch the GUI panel, which (to me) would not make much sense when running from a script. So I believe I can safely ignore this.
bpy.ops.material.new()

Seems to work, but not sure what it did. On the console it just returns "{'FINISHED'}".
Now comes the part where it goes really wrong:
bpy.context.object.active_material.diffuse_color = (0, 0, 0)

AttributeError: 'NoneType' object has no attribute 'diffuse_color'

The exact command Blender logs when using the GUI, doesn't work from the console.
I'm trying to get a grasp on what the commands are doing, and more specifically doing to what.
I tried
mat = bpy.ops.material.new()
bpy.context.object.active_material = mat

But that returned

TypeError: bpy_struct: item.attr = val: Object.active_material expected a Material type, not set
  So, the return value of material.new() probably is not the material just created, but some status message instead. I wonder where the material went.

After creating the plane, it is selected in the GUI, does that make it the context I'm working in? So material.new() is a new material for the plane?
And is the context after material.new() still the plane, or is the context now the material?
EDIT:
I was very close to fixing the code with
mat = bpy.ops.material.new()
bpy.context.object.active_material = mat

It should have been
mat = bpy.data.materials.new("foo")
bpy.context.object.data.materials.append(mat)

This (only) gets my code issue fixed.
I wonder if there is a similar way to get a reference to the plane, other than using the somewhat magical bpy.context.object?
It probably requires crating the plane via bpy.data instead of bpy.ops. But that's not trivial. And adding it to the scene.
And it does not answer the question whether copying the blender log to a script is something we should do. It seems the python code blender logs, needs considerable rework before it can be used in a script.

Suggest reading https://www.blender.org/api/blender_python_api_2_77_release/info_quickstart.html  , https://wiki.blender.org/index.php/Dev:Py/Scripts/Cookbook/Code_snippets/Three_ways_to_create_objects  The info log shows operator calls based on the context that you are setting in the UI, eg the context object you selected, a button pressed in the Properties Area.  Many simple operations can be replaced with low level API calls.  Most bpy.data collections (eg bpy.data.objects) have a new() method, and are pretty consistent in usage.  Autocomplete in the console is a good way to play around.


text:
How to get rid of animated value or "purple value"
I animated an object location with #frames, now I want to delete it, how?

purple is not for keyframes, it's for drivers, right click on the value and Delete Drivers

Purple is not for keyframes, it's for drivers, right click on the value and Delete Drivers. As for the keyframe, press Alti.

uhm...äh...but without drivers you don't get packages, no taxis...no uber....you shouldn't "delete" drivers...that's kind of unkind....

Who needs a driver with a Tesla?

in europe everybody because fully self driving is not allowed here :( will change in 2047...that's why "good old" Europe loses more and more market shares in every market because they kill themselfes with rules....♂

don't tell me that your jesusmobile doesn't have autopilot  :/

actually i am the jesusmobile because "christoph"  -> wikipedia: His most famous legend tells that he carried a child, who was unknown to him, across a river before the child revealed himself as Christ.  https://en.wikipedia.org/wiki/Saint_Christopher


text:
God Rays / Light Beams not showing up in Cycles. Tried in different Scene and it worked. Whats the cause?
So I have a scene as below and I was trying all day yesterday to get a nice lighting effect and it didnt work. From disabling the hdri, playing with the sun strength, angle, spot lights etc.
Today I jsut set up a room with a hole in a wall, 2 bars in front, a volume and a sun light and it worked. Why does it not work in my scene? I think I am just missing something or some settings are wrong.
Scene and light settings:

Sun Settings with the scene and plane to create light beams:

Volume settings:

Result witht he above ssettings and no hdri:

hello could you please share the cube + walls + light?

How can I provide you the blend file?

you can upload and copy paste the URL it will generate: https://pasteall.org/blend/

https://pasteall.org/blend/561c3eb766354a98a473ad35431f880d

it works fine for me so I'm not sure what's happening for you: https://zupimages.net/up/22/13/025m.jpg


text:
Light Beams not visible when using volumetrics in cycles
So I am trying to get some nice lightning effects with volumetrics in my scene using a plane and a sun light in addition to my hdri. My volume is definetly visible and if I set the volume higher then 0.5 my sene is getting really dark. The Sun Light is really close and at around 20 strength which lightens up the scene a bit, so I feel like the light and the volume are correct but when I render I dont get the nice light beams people have in their scenes.
I am only rendering around 60 samples right now. Maybe some light settings are wrong?
I am basically doing what he is doing in this yt video https://www.youtube.com/watch?v=llRkz1gVz6U

Is it possible that the lighting from the HDRI is "washing out" the volumetric lighting? Try lowering the strength of the Background Node connected to your HDRI texture and see if that helps.

I just tried and set my hdri to 0 and set the sun light higher but still nothing.
Is the sun distance or angle importend?


text:
Render animation in video editor does not work (Sequnecer in Post Processing is checked)
This was asked multiple times but the solution doesnt work. I animated a 4 second Loop and now want to make it a 20 seconds video with music. When I click render animation the output is blank and no Progress bar or anything else is to be found. The usual answer is to check Sequencer in Post Processign in the Output Properties but I did that and it didnt help.

EDIT: I found out. Maybe this is interesting for others.
In the bottum window I clicked on View and then Sequence Render ANimation and I got an error saying Window Size is now dividable by 2, so I changed my output resultion and now it renders fine


text:
Baking textures usefull to shorten render times?
So I always thought that bakingtextures is just for assets that you want to export for games but now I have read somewhere that it also helps a lot with render times. My Laptop explodes everytime I render something and I only use max 50 samples because otherwise it never finishes. Should I bake my textures?

Yes that's actually what is recommended by the documentation.


text:
Cloth Simulation intersects with collision object

Subdivides plane with about 40 cuts
applied scale
Turned self collision on and reduced distance on self and normal collision
Added subidivsion modifier below and above cloth sim (seperatly) but none helped
Turned up quality steps to 10 and collision quality to 10

Did this help, I've written an answer here for a similar question: https://blender.stackexchange.com/questions/265234/cloth-acting-strange-on-thin-object-collision/265240#265240

if you add your blend file, we can check it out instead of guessing... ;)

Decrease the distance between the cloth and poles before simulating. Then, under collision on the cloth object, increase the quality to something like 10 or 15. Also, don't forget to enable self collisions.enter image description here
The problem in mid simulation might be because it's the first part to touch the poles/there might be a problem in the vertex group you used as a pin group. On the collision settings on your poles decrease the thickness outer value to something like 0.001 to improve the quality of the simulation. On the cloth object, try increasing the quality steps on the top to something like 10. You can also try reducing the vertex mass if you want.
On each of the collision objects (the rectangular ones connecting the poles) disable single sided. Add a subsurface modifier above the cloth modifier with a level of 2 or 3. If you want to, you can also add a solidify modifier above the cloth modifier. Increase cloth quality steps to 20 or 25 (subsurface level 3 would be best) and collision quality to something like 40 or 50. Go even higher on all these settings if it still intersects slightly. The higher the quality steps/collision quality/subdivisions in the subsurface modifier, the more accurate your simulation will be.

Subdivision to 3. Cloth quality to 10. Collision Quality to 15. Distance to 0.001. Self Collision on but still the same

@patrick823 Subdivision to 4, cloth quality to 15-20, Collision Quality to 25-30, try the solidify modifier on and off, and disable "single-sided" on the collision objects.


text:
Can't texture small wall without it looking weird or artifacts on the edges
I created a small wall, next to a road and put some pbr wall texture on it. I am trying forever to get rid of these artifacts and thought it is because of uv mapping. First I did cube projection because it is basically just a long cube, but it looked weird. Now I manually uv mapped it again and it still looks weird. I don't know if it is because I did something wrong or if there is just a better way of doing what I am trying to do. Would appreciate any help.
Thats the wall. The front face is not visible in the render

Thats my mesh. I beveled first and then subdivided, thats why I ended up with more edges on the corner edge. I then used Subdivision surface with a pbr and adaptive sampling and set the material settings of displacement to discplacement and bump.

This is how it looks in rendered view.


text:
Bike Rim spokes with array modifier are not centered
So I am trying to model a simple bike and I am struggling with the spokes. I put a Cylinder in and put the §D cursor and the Origin on the axle (Which is already alligned with my tire and outside part of my rim). Then I added an empty object which I use for my array modifier. Then i applied the array modifier with the empty object as object Offset and rotate the empty object. First I thought i got it but looking from the side you can see the spokes are not centered.

Setting Relative Offset to 0 was the solution


text:
How can I apply rigid body to multi-part object using array modifier?
I made apple. It has two parts, stem and body.
I used array modifier to make copies of the apple (because rigid body doesn't works with array modifier).
Then, converted it to mesh and tried to "Seperate By Loose Parts" in edit mode.
It seperated apples well but apple's body and stem has seperated too!
Because Apple has two parts, stem and body.
How can I make copies of object that has multiple parts using array modifier?

The simple way is to use linked data.

Select the apple.
Press Alt + D  and move the apple in the new position as it was in array modifier. (instead of Shift + D, Alt + D  creates linked copies of apple, so that when you change one, the second changes also)
Use Shift  + R to repeat this action quickly.

Alternatively, if you have a lot of objects already

Select all bodies without stem.
Press right mouse button, and in connect menu, select Set Origin → to Geometry.
Press Ctrl + L  This will link all body models. Now you can add stem to one of them and all of them will get it.

Alternatively, you can connect steam to body using one edge. Select one vertex on the stem and one on the body and press F. This hack tells Blender that these two parts are connected, so that they will not be separated by loose parts.


text:
Rigify problem with floating bones
just wanted to ask, I'm learning Rigify and why are those green circles just standing in the air like that? I see that in this tutorial they are also standing like this. Is this normal? Should something be done to fix them? Example:

In Rigify Rigs every limb has two animation systems: IK and FK. When you select a bone of a limb, in the N properties panel you will see an IK/FK slider that lets you choose which control bones chain to use.
In your example you're using IK, if you switch the slider to FK the limbs will go to the floating bones.
We generally turn off the visibility of the unused bone chains using bone layers (3.6 and older versions) or bone collections (4.0 and above).


text:
Poor render quality with volume
I tried to make a cloud sphere based on this video tutorial, however, I keep running into the problem that the render has ring-like artifacts.
I want my render to be smooth, but increasing render samples or voxel amount doesn't help.
I tried stepping up my denoising game by using compositing nodes, but that also didn't help.

First picture is the final render (samples = 360), the next ones are my settings.

What you are seeing is actually a step pattern caused by a volume step rate that is too low. If you use cycles to fix that go to render properties-> volumes and decrease your volume step rate render. If you use EEVEE go to render properties-> volumetrics and decrease your volumetric tile size.


text:
Smooth brush problem causes distortion in mesh
Noobie here. Third day without a solution.
There is a problem occurring when using the smooth brush in sculpt mode which creates horizontal bumps instead of smoothing. The brush doesn't follow the shape of the mesh so it carves into it instead.
Tips?
Here's the file. https://we.tl/t-TWK7Ot5tUc

I think it's a normal problem. May be the normals of your faces are pointing at a weird angle, this would explain the orientation of the brush. Can you share the file?

pasteall.org/blend

All I can say is that, there's something with your mesh's topology that makes the brush behave like that. I thought it was normals but it seems that it is something else. One thing I can say for sure is that it's a topology problem because when I remeshed the object, the problem doesn't occur on the remeshed version.


text:
blenderproc gives "Exec format error" - Linux
I'm trying to run blenderproc on a Linux system (Red Hat Enterprise Linux 8.6) and am running into the following error:
OSError: [Errno 8] Exec format error '/home/blender/blender-3.3.0-linux-x64/blender'

I've tried installing blenderproc using the pip command:
pip install blenderproc

and also by cloning it from git as suggested on the website

Since that's an external application and not part of Blender it's probably best to ask about it on the main web site here.

Hi, thanks for your feedback. I just tried running blender and it gives me the same error message. It seems like the issue is with blender

Assuming that Blender itself is running ok on your Linux version I'd report the error on the app/addon's website.

I've never been able to run blender on the system. I'm running it on a cluster that does not have a graphic user interface, so I can only run it using blenderproc. However, running blenderproc gives me the above error message. Trying to run blender directly gives me the same error message. So seemingly, the issue lies with blender and not blenderproc


text:
How do set an angular velocity to zero with python bge?
I'm new to blender scripting, but not to blender or python. I am trying to set up a rotary inverted pendulum. The initial state of the pendulum is upright with an angular velocity of 0. I would like to run a simulation a few hundred times with different parameters and need to be able to "reset" the pendulum to its initial state after each episode.
I am aware of the bug/feature of setAngularVelocity in which you have to set to a vector of very small numbers and not 0 to stop a rotation, however it still does not work for me.
Here is the code that I use in a module. The function is called every other frame with an "Always" actuator. So the pole should fall freely for max_steps steps and then be stopped and brought upright. When I run the game engine it only acts like this the first time.
# Take action
base.setAngularVelocity([0,0,data.action], True)

# Get angle and speed
xyz = pole.localOrientation.to_euler()
roty = math.degrees(xyz[1])
spd = pole.getAngularVelocity(True) # True for local
spdy = spd[1]
print(spdy)

[...stuff...]

data.step   += 1

if data.step > data.max_steps or R == -50:
    data.action = 0
    data.step = 0
    pole.worldOrientation = ([1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0])
    base.setAngularVelocity([0.00001,0.00001,0.00001], True)
    pole.setAngularVelocity([0.00001,0.00001,0.00001], True)

Edit: I forgot to mention that setting the angular velocity for the base on line 2 works fine, but not in the if statement

It is not a bug. It is a feature ;).
Sometimes it is an annoying feature.
I tried various methods to get zero velocity.
A) parent/unparent ... restores the previous velocity.
B) disable/enable physics ... restores the previous velocity.
C) I found one (not so nice) way by experimenting:
def stop(owner):
    owner.setLinearVelocity([0,0,1])
    force = [0,0,-50.174276 * owner.mass]
    owner.applyForce(force)

It shows zero velocity with even 24 digits. I can't tell if that is really the case, but it looks like that.
Be aware, this velocity appears within the next frame as apply frame will not effect the object immediately (0,0,1) at frame t and (0,0,0) at frame t+1. Be aware this force counters gravity (9,8) for this one frame too.

[edit]
With taking gravity into account I get this:
def stop(owner):
    owner.setLinearVelocity([0,0,1])
    gravity = owner.scene.gravity
    force = -gravity.copy()
    force.z = (-59.974275 - (gravity.z)) * owner.mass
    owner.applyForce(force)

The frame rate has some influence too (I would expect -60 not -59.974275). But I can't find a formula on that.
Maybe it helps


text:
localOrientation on rotary inverted pendulum
I am setting up a rotary inverted pendulum in bge. If you look at the picture below, the body rotates around the z-axis and the pole is linked to the base with a hinge. I am having trouble getting the angle of the pole as it falls down. Using pole.localOrientation.to_euler() I get a vector of angles x, y, and z. I thought the angle I was looking for would always be on the y-axis, but it seems to alternatively switch between x and y, and I cannot figure out why. Below is an excerpt of the output of pole.localOrientation.to_euler() where it switches between x and y. (I thought maybe it could be when z goes negative or positive but I have found occurrences where it is not the case)

What do you mean with "the body rotates along the z-axis"? You are talking about rotation.You can say it is rotating around an axis (or vector) or rotating on a plane (e.g. XY).

Yes, sorry for the confusion. I meant around the z-axis

Thanks for the details. The object rotates as you expect (around Z) or does it rotate around other axis?

The body rotates only around the z-axis as expected. And the pole falls down as expected.

I think this is the result of the conversion to Euler coordinates.
Your values are too close to the pole of the "coordinate sphere". Little precision errors have large influence on the calculation of the rotation between angles around X and Y. It behaves like a compass near one of the magnetic poles. The direction can't be determined exactly due to the near pole.
You might need a different way to determine the axis around Z. I'm not that familiar with Euler. I suggest to use a different order.


text:
Bogus face in 2.8 mesh
My mesh shows what looks like a bogus face normal. The mesh and screen cap show the problem. Some holes still show a face normal but no face can be selected!
I got to this point by creating a building mesh and merging vertices. I created a separate mesh (plane) for cutting holes in the building. I used knife project to put cut lines into the building. Then I selected and removed faces where holes should be. Some holes still show a face normal even though there is a hole (no face can be selected). Merging vertices does nothing.
This appears to be a problem, but I don't know if it causes anything bad.

[("https://i.sstatic.net/A9hFq.jpg)

I understand that the normal will show based on the median position of the face. This means you may have the normal 'coming out from a hole'. If you merged verticies (make sure you have the object selected) then also try Mesh > Clean up > Delete Loose

Barkest has the answer, I believe. The "bogus" faces have surrounding real faces whose medium centers just happen to be over a hole, giving the false impression that there is a face where a hole exists.


text:
Transformation Constraint - Can't map location to rotation
I am unable to use an object Transformation constraint to map a location to a rotation. The manual says I should be able to do it, but it is not working.
Here is a simple example. The Cube has a constraint to transform the Empty object's location to a rotation:

The constraint on Cube:

Note that the first image shows the Empty y location is between 3 and 4, so the rotation of Cube should be something other than 0. Moving the Empty doesn't do anything to Cube.
What am I missing, please?
Update: I'm using version 2.92.0

As the cube's Z rotation is supposed to be influenced by the  empty's Y location, you need to set the Z Source Axis to Y:

Makes total sense! Thanks!


text:
Animating materials for blinking effect
I would like to animate objects in my scene so they appear to blink, each at a different time. I created a cycles material that mixes two shaders (one in non-blink mode, the other in blink mode), and I can set keyframes for the mix shader factor parameter. A couple of problems...
It seems like each blinking element needs its own copy of the blinking material, so I can change the keyframes so they have different on/off times. If I have 8 blinking elements, I need 8 materials, and I need to modify each one so they turn on/off at different times. Is there a more efficient way to animate multiple objects this way with fewer materials?
I want the blinking action to be repetitive, so I don't have to define many on/off keyframes in a long animation. AFAIK, I cannot use the graph editor and f-curves since node parameters don't appear in the editor. Is there a way to "loop" the blinking for a material? Edit: I discovered that I can add the mix shader/factor property to the "Keying Set", so it then appears in the dope sheet editor and graph editor. I can then add a f-curve modifier to it to make it repeat.
In this image, you can see one "comma" blinking on, and the others off. And you can see the material I'm using for it.

You can use the object color in the material. It is single user for every object.

Please explain "object color". I should have mentioned I'm using Cycles

I added the tag, although the screenshot makes it clear. And yes, ObjectColor is only available for blender Internal, sorry.

I added a .blend file with my current solution. It uses 1 material and obj indices for animating the blinking effect. It has some problems, but seems to satisfy my goals.

It's hacky, and annoying if you want to use it for its intended purpose, but you can animate (or drive) the Pass Index of an object, and access it through an Object Info Input node.
Using a setup like this..

In this example, the Pass Index of each object is animated cyclically, with step-wise interpolation, from 0 to 4. This can yield an sequence like the one below..

..with all the objects sharing the same material, and their cyclic Pass Index animations offset in the dope sheet.

Following stav's suggestion of a rearrangement, here's a version in which the Pass Index is not animated, but used to set the phase: the number of frames a color cycle is offset for the object bearing it. (See comments)

The 'Frame No.' and 'Cycle Period' nodes are both Input > Value nodes, with the value in  'Frame No.' keyframed with a linear interpolation to match the frame number of the animation. The Color Ramp will be swept in the number of frames in the 'Period' node. In this case, the Pass indices of the groups of objects are 0,4 and 8, to get a trailing 1-on, 2-off effect.

Can you plz share the file so that i can see all the nodes in the file. Thanks

@atek    No more nodes than an emission shader .. See edit.. 2.79 file attached.. (Apologies.. cycling trough 5 values is probably unnecessarily complicated..the OP probably only needs 2.)

Very inventive! I like the idea of using the pass index for customizing the animation of individual objects. Your suggestion requires animating the pass index for each object. But I'm wondering if there is a way to statically assign a pass index to an object and use that to compute the animation.
For example, define a basic on/off cycle animation, but use the pass index to create a phase shift. That way, I could have one material, x objects with that material, and assign each object a pass index that would cause each one to blink at a different interval, similar to your example.

@stav_nan That's exactly what I had thought would be a better way of doing it myself, but would have made the answer rather longer.. Using that method, the shader would have to know what frame it was? Which can be done by driving an Input Value node from the frame number? 'll have a go, if you don't get there first.

@stav_nan ..but I still can't crack driving the value node, it just won't respond to anything in 279, at least.

Robin Betts: I'm playing with multiple value nodes. I can animate the values. When added to the active keying set, they appear in the dope sheet and graph editor. AND, I found another post that shows how to derive the frame number from a value (animate a value node, value 1 at frame 1, value x at the end, use linear interp).

@stav_nan    Of course. Key it. I was letting the perfect be the enemy of the good.

Now I'm using multiple values to define the on/off pattern and period, and using a a pass index to define the phase, I should be able to do all of it. At least I hope so.

We'll set up a chat if you get stuck.

Let us continue this discussion in chat.

This provides the best direction for my problem: Only 1 material for multiple objects, animating features of the material to make the blinking effect, and being able to use the graph editor. Thanks! BTW, my variation of the soln is posted in the blend file with my problem statement.

I'll check it out..

Have you considered using a short (two frames or more) video file as an Emission texture and have it loop?

You wouldn't have to do anything, just define start frame and assign it as a material. The three video files I made were mp4 files, 20 x 20 pixels each, 6 frames each (2 frames of each color) - each file is around 15Kb , so pretty light.

Video file number one has a Green - Pink - Yellow sequence and is set to "Cyclic", second is Yellow - Dark Orange - Blue, etc.
For some sad reason Blender doesn't pack Movie textures but here's the blend file anyways.

Pretty interesting solution actually!

+1.. thump! nothing wrong with this, especially for a one-off. Sometimes you don't need a tool, you need an answer.

For this kind of thing, it is quite possible you create Cycles Material that does this "random blinking thing".
You could actually use Emission and some kind of noise that will either gives 1 or 0 depending on the noise.
You can also do use Python drivers or maybe use some kind of shuffle of animations of random pattern 1 and 0.
However, for most control, I would suggest using Animation Nodes or Sverchok add-on to control Cycles Material.
In my example BLEND here, I have a setup using Animation Nodes to simply give Color Per Vertex for each object. So that you can have a single material, but for each object, you pipe in different vertex color. This might be overkill some people say, but then it works.

If you just want ON or OFF randomly, you might actually get away by switching 2 different objects with 2 Materials representing on and off.

These are good possibilities, but I think Robin Bett's answer is closest to my needs. You've given me some good stuff to explore, though (Sverchok )!

....I must learn some more AN, Sverchok.. they can both reach behind bits of the standard UI which can be a bit frustrating.. .. waiting for 2.8  to settle before commiting myself.

You can try now, I have tested Animation Nodes 2.1 for few days on Blender 2.8 Beta and seems pretty stable. There are few gotchas, can submit feedbacks to AN developers.
Eventually SV and AN can be under one big node dependency. It's very powerful!
Don't wait until then, start now when things are actually simpler :) This way you can get used to the new Blender 2.8 UI while figuring out about node workflow.


text:
Cycles displacement material wrong uv mapping
I managed to get uv mapping to get pseudo-randomly change on each object having the material.
I've based the randomness on the Object Info random output, and get the uv to be rotated, shifted and flipped: this make it possible to have group of identical object to look different, like bricks and alike.
The problem is that my nodes affect the diffuse and the normal map, but seems to fail with the displacement map of the material, as depicted in the images.
As you can see in the node setup, the same final uv mapping (purple) is connected to the diffuse (yellow), normals (green) and displacement (red) maps, but only the least seems to ignore the uv mapping alteration.
What is causing this behaviour?
EDIT 1
Ok, i found out that the problem is not caused by my uv-randomizing nodes: displacement material seems to take in count uv modification only for distinct object, not for instances like dupliverts or particles.
I think this is due blender internal architecture, and it's not a big problem for me, since particles can be made distinct objects with the "Make duplicates real" command.
It shure would be great if particles and dupliverts could be affected by the uv alteration for displacement.
I also made a test file but i can't find how to attach it to the question.
node setup

Seems to be working on my end. Could you post a better image of your node setup, it is too small and its hard to tell what is really happening there. Or of possible upload a as simplified file as possible reproducing the problem. Don't forget to pack all relevant textures and external data

Might be because of a bad UV unwrap


text:
How to get a flexible tube to follow a curved path?
Problem: I'm trying to make a flexible tube follow a path I've made with the Path tool (Add > Curve > Path) but even though I've followed a variety of tutorials I can't figure out why my curve just won't allow a tube to follow it.
What I need it to do: I need to control the movement of the tube down the path, stopping at various points for single renders and animating the full movement at the end. The path must pass exactly down the middle of the tube. Please note that this path is located in the middle of a larger object that isn't shown, hence why it is located high above the grid.
The following image shows the path:

The following image shows the tube in mesh mode:

My current approach: I created the tube by adding a cylinder and adding a series of loop cuts to make it flex when required. I initially tried adding an Array modifier followed by a Curve modifier, and then tried just the curve modifier on its own. But no matter which axis I choose the tube becomes grossly distorted. The closest I can get it is the X-Axis, but even this is not correct, I assume because the path isn't located exactly on any of the axes.
I tried the Follow Path tool, but this also failed. I also tried a Bezier Curve instead of a Path, but no luck. The tube just becomes grossly distorted on all axes.
Your help would be greatly appreciated. I am a newbie, so please be gentle.

Please improve your images to just showing what you need us to see.  There is a lot of empty space in your images.  Try to minimize some of the empty space.  You can show your mesh in edit mode to demonstrate a dense mesh.

I set the 3D cursor at the starting vertex of the path and set the origin of the curve and cylinder to the 3D cursor. I then applied the Curve Modifier but the same happens on all axes with it all going haywire.

Thanks cegaton, but that approach creates a fixed cylinder with bends. I need the cylinder to move down the path and conform to the bends for an eventual animation. I am able to create a single path in a new Blender file and attach the cylinder so that it works correctly, but when I apply the same steps to my path above it fails. I'm so confused.

Problem Solved:
Thank you for your help everybody. I solved it the following way:

Select your viewport to one of the general views (eg. Top, Front, Back).
Add a Path and keep it flat to the view. Stretch it out, but don't transform to 3D just yet, or to lengthen (extrude). Keep it basic.
Go to edit mode and ensure starting vertex of the path is selected.
Shift S > Cursor to selection.
Switch the curve back to Object mode and then Ctrl Alt Shift C > Origin to 3D Cursor. The curve origin and 3D cursor should now be on the starting point of the curve.
Create your cylinder and add a number of edge loops (ctrl R). These loops will allow the deform of the cylinder when going along the curve.
With cylinder selected (Object mode) go Ctrl Alt Shift C > Origin to 3D Cursor then Ctrl Alt Shift C > Geometry to Origin. This aligns the cylinder to the Origin, which should be the exact location of the curve origin.
In Object mode add Curve Modifier to Cylinder.
Curve Modifier: Select Object as your Path. This will cause your cylinder to change location on your viewport.
Change Deformation axis to whichever works for you to align your cylinder to your path. Mine worked with "Y".

Finally: Now that you have attached your cylinder to your path you can manipulate your path in any dimension and extrude (in edit mode) and the cylinder will stay connected.
Where I went wrong:
I went wrong by creating my path in 3 dimensions first. You need to create it flat, attach the cylinder with the curve modifier, and then move the path in any direction or length you want.
Below is the outcome exactly how I wanted it. I can now slide the cylinder along the path and adjust the paths position and length in all dimensions.

Use the Curve Modifier.
Paths or Bezier, both function correctly.
Know where your centers are for both curve and dense mesh.
Align your centers for testing.

Keep Track of your centers in Edit mode for Curve and Mesh
Make your center point align to the starting point of curve
Make your center point align to the start of mesh
Experiment with different center points later
Cursor to Current Selection for Curve Selected.
Selection to Cursor for the Mesh Selected.

Try a simple case first.


text:
Donut doesn't looks like Blender Guru's one
For an odd and unknown to me reason, my donut seems to look VERY different from Blender Guru's one, as seen in the attached images. I've done exactly everything just like in the tutorial even color matching all the colors and all but it still looks off. Only difference is that the tutorial I was following is on Blender 2.83 as I recall and I am using 3.0. Although one friend went through it with 3.0 as well and doesn't have that problem. Any suggestions? I've tried making it more pink but it also doesn't seem to be it..

Did you enable a Subsurface Scattering Value? Maybe it's too low? Also try going to the bottom of the Render Properties tab and under Color Management, change View Transform from "filmic" to "standard".

Which tutorial are you following? Andrew Price (Blender Guru) has recently completely re-recorded the tutorial for Blender 3.0. His tutorial using 3.0 is here whereas the 2.83 one is here.

@JohnEason I am following the 2.83. I know that there is one for 3.0 but I decided to do the one for 2.83 'cause I liked the final result more .

In that case you may find that some of the settings are in different places.

Try a different contrast level.
Properties -> Render Properties -> Color Management -> Look


text:
Soft body object stuck in original position of 'collision' object. Basic physics simulation problem
so I have this book object and papers inside of it. I've turned on collision on the book cover, soft body on the papers inside of it and I have a force field to push the pages to the side while the book covers open apart. For some odd reason, the pages hit the original place of the book covers, as if they were not animated and stay there. Almost like an invisible wall is keeping them there. Here is the blender project: https://mab.to/AHfwEoFHC
Pic:
I am new to blender and I just wanted to make this simple physics test work, so I can understand it better. Any overall tips will be greatly appreciated too! :)


text:
Is there a way to push down and name all NLA strips/tracks the same thing?
GLTF requires all animations per object to be pushed down and for all NLA tracks to have the same name in order for them to work. Obviously, this is not ideal to do by hand...
"Animation
glTF allows multiple animations per file, with animations targeted to particular objects at time of export. To ensure that an animation is included, either (a) make it the active Action on the object, (b) create a single-strip NLA track, or (c) stash the action.
Supported
Only certain types of animation are supported:
Keyframe (translation, rotation, scale)
Shape keys
Armatures / skinning
Animation of other properties, like lights or materials, will be ignored."

If you only want one animation containing all the active actions, export with "Group by NLA Track" off.

I made a script to handle animations for glb export. If you press join animation for all objects it will create a new nla track with the same name. You can also simply rename your track or even have multiple animations on the same object.

https://github.com/LorenzWieseke/GovieTools/releases


text:
I don't see the inverse kinematics in Blender 3.0?
Could someone tell me how I add an inverse kinematics object constraint in Blender 3.0? I selected a bone in Pose Mode, then in Properties > Object Constraint Properties > Add Object Constraint, but I don't have the IK option in the menu

The Inverse Kinematic constraint is under the Bone Constraint panel and not the Object Constraint panel.

Thank you! @Benus

Thank you @Benus!
I've been missing this for days. And it is sooo simple but I overlooked it all the time. Everything makes sense now. Great!


text:
How to convert a normal map into a curvature map (per pixel curvature)
I am trying to generate a sharp curvature / cavity map in the compositor from a normal map but I don't know the node setup.
Here is my reference: http://polycount.com/discussion/comment/2273084/#Comment_2273084

Instead of editing original post with solution please write an answer with node setup and steps you took to achieve that, thanks!

Generate a curvature map from a normal map
Here are two node setups you can use to generate a curvature or cavity map from a normal map, they use the same amount of nodes and give the same result. You can download all the node setups here: https://drive.google.com/file/d/1bixkxs6cSes-J9GVwDeIP7pW2OnGNhYd/view?usp=sharing
Link of the image used: https://drive.google.com/file/d/0B1wP1Y8dmh8aVmN6VUpYMU02Q28/view?usp=sharing (it is from the Unity Store "Rock and Boulders 2" free pack: https://assetstore.unity.com/packages/3d/props/exterior/rock-and-boulders-2-6947).
First node setup (easier to understand):

Second node setup:

You can also use this Emboss node setup to generate the curvature map: https://blender.stackexchange.com/a/102727/23134
You must set your normal map as Linear in the "n" menu to make the value nodes works properly. To export your curvature to another software like Photoshop add a gamma node at 2.2, don't use it to work on it in Blender.
I have written in the frame +R X- meaning that the red channel must use a -0.5 translate in X and it's the opposite with a positive direction the image must be inverted.
The Pixel width determine the thickness of the lines, it is then divided by 2 and inverted one time for each channel so it moves in X +0.5 and -0.5 for the red channel and Y +0.5 and -0.5 for the green channel.
How does it works?
The color channels of the normal maps create a lighting effect, for example the red channel gives the impression that the textures is lighten from the right and the green from the top. By moving the texture in the direction of the shadows, so for the red channel with the lighting coming from the right we move the texture to the left and by inverting the image to invert the lighting direction we move it to the right, then the images are both combined to create a black contour from the expanded shadows. Three Linear Light node at 0.5 are added, one to combine the red channels, one for the blue channels then one for both color channels.
Then the gamma node converts the image from sRGB to Linear.
Blender works with sRGB images, when you set an image to Linear in the "n" menu this tells Blender that the image imported is in Linear mode and must be converted in sRGB to work with it.
Things you can do with the curvature:

you can overlay it with a smooth curvature map, see how to generate it here: https://blender.stackexchange.com/a/100637/23134
you can multiply it with an ambient occlusion map for a diffuse grayscale (in PBR do not multiply it).
you can fake an hand painted effect by adding a color ramp node: https://blender.stackexchange.com/a/90153/23134
See how to create a Dota asset with this texture: https://blender.stackexchange.com/a/101830/23134
you can bake the normal map in 32 bit Float exported in OpenEXR Float Full to improve the curvature map, you can then export your curvature map in 8 bits TGA.
you can bake the normal map in an high resolution then generate the curvature map and scale the image down to get an anti-aliasing effect.
if the normal map is baked in DirectX instead of OpenGL you will need to use a Converter > Separated RGBA and invert the green channel then plug everything to a Converter > Combine RGBA.

Is it possible to do this in real-time in Cycles?

No, the only software able to do that is Knald: https://docs.knaldtech.com/doku.php?id=curvature_maps_knald_1.1

Sure this is possible in real time in cycles by building 3x3 edge detection convolution kernel.

Could this be used to generate curvature from the Normal output of a Cycles render layer? Obviously it will need some adjustment.

No because there is no translate node to reproduce this node setup.

@DanylBekhoucha I do not mean in the material, I mean in the compositor. This current setup is expecting the sorts of colors from a normal map, which is different from the cycles renderlayer normal pass.

Note: I have updated the node setup, it's easier to create there is no order for the inputs and it is closer to Substance Designer. I am currently working on the Curvature Smooth effect.

@DanylBekhoucha you can translate using Mapping node in Cycles, the group is reproducible.

You can't translate the normals of your mesh and you can only use object space normal which won't work correctly.

Can you recreate the result in the shader editor?

This is how you do it based on the mesh and not a normal map.


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

Here is the node setup to invert the colors properly:

Using this, I do not get the same depth map back. Why is that?

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

Thank you for you answer. I had already tried the linear and raw mode, the background grey doesn't change when i invert the image, but the source image appears brighter and the result is brighter than Photoshop.

Blender will also convert back to non-linear when saving, this seems to be the other issue. When I set color management to "none" AND the input space to "linear", the result is the same as Photoshop. Not sure if there's another way to disable gamma correction of the final output apart from disabling CM or saving as OpenEXR. I thought "save as render" did this, but it doesn't seem to work here.

It works but it becomes hard to manage the other images and colors. For example an image attached to a multiply node with a completely white color becomes darker.

Yeah, globally disabling CM is a very poor solution, it should be bypassed specifically for saving the cavity map. Just not sure how to do that.

Bartek Skorupa show the solution in his tutorial i have edited my initial post with his node setup.

That also won't quite nail it. The problem is that an inversion is on display referred encoded values, and as a result, a 2.2 power curve won't invert entirely 1:1 with Photoshop, and it certainly won't work at all on scene referred data coming from Cycles. "Inversion" of a colour has no real-world equivalent, and is rather a hack to achieve something else. For alpha, which is always a bounded 0..1 linear ratio, 1.0- value will work correctly.

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

Before inversion:

After inversion:

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

After inversion:


text:
How can i add stylized cracks on my sculpture?
How can i add cracks on my stylized game asset sculpture ? And how to get a good result without having to increase the polycount? Also how can i get a non-destructive workflow where i can continue to sculpt without the cracks and then edit the cracks?

Most artists are dragging an alpha of a stylized crack on their sculpture, you can find a set of popular alpha on the Gumroad page of Michael Vicente aka Orb here: https://gumroad.com/l/nOkHw
You will also need an high polycount to apply the alpha's details.
But the best way to apply cracks is by creating a mesh that you will use to cut your mesh with boolean, you will get more realistic cuts and non-destructive (with Modifiers and BoolTool brushes). You can use the BoolTool to work faster, you will have to select your crack mesh (completely closed) first then the mesh to cut and use the Difference operation.

If you use the Brush Boolean menu in the booltool you will be able to edit the cracks. Add an edge split modifier with a 30 degree angle to display your cracks correctly, sometimes the smoothing appears badly arround booleans.

I think you should post screenshot from Blender window, not from ZBrush. As you don't mention that, this might cause some misunderstanding.

"sometimes the smoothing appears badly arround booleans" - 30° edge split won't save you, there will be always a bad smoothing after boolean on low or mid poly curved areas on mesh. That takes a lot of work to clean up. Booleans on high-poly in Blender are very slow and not feasible. That's the reason to prefer those alphas or to do booleans in ZBrush or other apps. I also don't see why those slash marks are called "incorrect cracs" - there is nothing incorrect about them.

Booleans are fast because we don't need to get millions of polygons to project the cracks details, you can even project a clean crack on a face with no subdivision. But Blender is slow in high poly and the drag stencil is very laggy and work well only on flat surfaces, using boolean is the only option for Blender users. Also with Boolean cracks applied as modifiers or BoolTool Brushes it is possible to edit them and have a non-destructive workflow.

On low-poly booleans are fast, but they also destroy shading. You are misleading by only showing perfect examples on flat surfaces - booleans have to be cleaned if you want quality. If you add non-destructive into the equation and you want fast quality low-poly booleans you have only one option and that is to use Houdini.


text:
How to bake a Bent Map (Object Space Normal) correctly with Cycles?
I am trying to bake a bent normal map with Blender Cycles but i get weird results by default. I mean it works but it's not the same colors as other map bakers like XNormal or Substance Painter, the texture looks like this:

You have to fix the axis of the baking option in the swizzle line because Blender uses different axis in the 3D viewport than other software. So you must use +X +Z -Y.
Also don't forget to reset the orientation by doing an "Apply" with the shortcut Ctrl + a then Apply Rotation.