text:
Picking two points on the 3d model surface to measure distances
I'm a blender n00b and this may be a wrong tool for the job, but I've found some great features in Blender (like the caliper add on), so I'm pretty sure there's a way to easily (or at least bit easier) select two surface points of a loaded 3D .ply model somehow instead of moving the caliper/ruler points and its x y z axis individually one at a time?
Is there such a tool in Blender (or anything standalone) for selecting points from a surface of a loaded 3D model and measuring the distance of those selected points please?
Any explanation for how to do it any faster in Blender, instead of moving x y z axis of caliper (or ruler/protractor tool) one at a time attempting to align them to a surface of a loaded 3D model, or in any other tool that's able to measure that would be greatly helpful and appreciated. TIA

My favorite tool for measuring things is the measureit addon.
Once the addon is installed and enabled, simply enable Show in 3D view > Tool Shelf (T) > Measureit tab. Then select the vertices you want to measure and click Segment. You can edit and delete individual measurements in the Properties Region (N):

@cegaton I just went to get the link, only to be distracted by a notification for this comment :P

Thank you four answers both, the only trouble I have is that my mash has a really large number of vertices (about 230k, 440k faces, etc.) so in edit mode it's really slow to select two vertices among so many...is there such a thing in Blender that can reduce vertices but estimate the loss in precision of remaining points, or do it somehow without loss, that'd be great. TIA


text:
How to add 2 organic meshes in Blender?
I'm modeling a character for an project I'm working on and decided to make separate meshes for the body and legs. I decided to join them together after doing the basic modeling for each and can't seem to get them to look, well, normal.This is what I have so far.
The problem

"Normal" is the key word here. flip the normals for the leg object.

Related: http://blender.stackexchange.com/q/32325/599 and http://blender.stackexchange.com/q/14774/599

source: Stack Exchange

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

sort: votes


text:
Issue with a night sky rendering
I have been trying to render a starry night animation with blender. While the stars look fine when rendered in a single frame, but when they are in a sequence, some of the stars appear to flicker in and out of existence randomly. I have tried two different ways of rendering stars, the first using an emission texture and the second with a particle system of emitting objects. https://giphy.com/gifs/7epE5LW1ChYqc is the video file of what they appear like, and some stars seem to wink in and out of existence between each frame. I don't know what is causing this, or if there is a way for me to remedy this.

How many samples are you using?

For the cycles I used 1000 and still found the same thing occured. This gif is from blender render.

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


text:
Blender Game Asset Creator Tutorial: 5.5 - Unwrapping The Cone
In the final unwrap of the section, after sharpening edges, the tutorial asks to unwrap and "follow active quads". I receive a "no active face" error. I feel like I'm missing a fundamental principle here. any help would be appreciated.

Are you in face mode?

I am in edit mode. face mode selected.

I have it set to "face-select", as opposed to vertices or edge select. I'm a noob. Is this what you mean by "face mode"?

Yes it is. Not sure what your issue is :/

You receive this error because you don't have an active face (quad) selected.

Select one face from your mesh to make it an active face. It must be a quad (four vertices).
Select all faces by hitting A. You will notice the active face looks a bit different than other selected faces (it's lighter).
You can now unwrap with Follow Active Quads option.

This is how an active face looks like:

It worked! I was selecting everything at once. So I wasn't getting an active face. Now I can continue with the tutorial. Thanks for the help!

Happy I could help - good luck with the tutorial! :)


text:
Where is mesh debug to be found?
I am working in blender 2.69 and have been following the Blender Tutorials DVD12 on Youtube --> https://www.youtube.com/watch?v=OaKYhO-XMFo
The video above refers to the "Mesh Debug" options in the properties pane. I know its only visible in edit mode but for some reason I can't see it on my version. i have also downloaded the latest version of Blender 2.76b and the mesh debug option is not visible there either. Any ideas how I can make this option show on my version?

It's in the (by default included but disabled) 3d print toolbox addon, but it changed the name, now is called "mesh analysis" in the 3d view properties panel (open with N)

Uh-oh. Mesh Analysis has disappeared from the Properties Panel. How do I get it back? Meanwhile I'll continue looking through the Q and A's.

Doh. Never mind. I was in a hurry to leave for the day. Sorry for the newbie mistake.


text:
BGE - remember position after action
In the BGE I need - remember location after action. I have button - when I press - character do a step forward. I want make when the another press character begin step from a new position, after old step.

http://joxi.ru/KAxeW4jcW7qgr8
just remember this new position after step.

Your question is a bit confusing, but maybe you should rebuild your animation so that the step is taken in place, and you should move the armature instead.
If you dont't want to do this, then you need to add a python script to move your object to the exact position where you animated step ends... You must get the object's world position and increment it by whatever distance it travels in your animation. The script is only activated at the end of your animation... you can use the frame property on the action actuator to control this.
hope this helps
Nuno Estanqueiro

thank you very much, I try to rebuild and add movement for cube parent but it's not work for me, I miss something. can you see this logical and tell more detailed what wrong https://drive.google.com/file/d/0B8AB9z2m-RC1ak1TdVNoc2RBREk/view?usp=sharing
it's without cube version

Separate movement from animation. To let the game work, you need motion only. The animation is "just" to make it look like nice. Basically: the animation is not the cause of the motion.

Thank you, Monster! you here too))
but separating animation and parenting for cube give not smothly effect. legs move always.
I solve this http://blenderartists.org/forum/showthread.php?387126-NEED-HELP-BGE-and-buttons-for-animation-remaining-location&p=2975543&viewfull=1#post2975543
but not smooth animation effect a little dissapointing


text:
Draw grease pencil over render without live rendering
I am drawing a grease pencil layer over my subject based on a specific camera angle. The camera is locked, and the grease pencil strokes are being drawn while looking through it.
In order to draw the grease pencil layer properly, I need to be rendering the subject. However, if I viewport render, it impacts performance too much to comfortably draw. So I need some way to run a render and paint the grease pencil over it. I could render the subject and then paint over it with grease pencil in post, but I'm trying to keep the whole thing dynamic as there are other grease pencil elements that are not camera specific.
Is there a way to project a render back within the camera bounds so that it exactly lines up with the subject? Is there some other way to handle this issue?

The Background Images features for Cameras lets you do this easily. It lets you choose an image that will show in the Camera, with a variety of options for placement. If you choose Render Result and leave the rest default, then your render will exactly overlay the model. You can then hide the model and paint your grease pencil as needed.

Can you expand upon this? Its god to know that is it possible, but would be much better with a bit of explanation.

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


text:
Convert bump node back into its input texture?
Let's say I have a Bump node with a greyscale texture going into its Height input. The node outputs a Normal socket, which you then usually plug into your shader node.
Is there any conversion I can do to the vector coming out of the Bump Nodes normal socket that would give me the input texture again?

could you explain your case? in what case would it be useful?

I don't have a specific case, I'm just curious. I suppose it could come up in cases where the bump has been baked to a texture.

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


text:
Material that only renders direct or bounce light?
Is it possible to make a material that totally ignores indirect light, or direct light? In other words, could you render a material that looks only like the Direct Pass or the Indirect pass?

afaik, no. You can change the way it affects another materials (say, using light path / ray depth output), but not the way it is affected by other objects (received light). *(afaik means that I played with it up to 2.76. so newer ones may have the feature)

You can do it in the compositor, assigning to your mesh an object index different than 0.

Thanks. I am aware of this method. Was hoping to find a way to do it in materials.

Very useful. Thumbed up.


text:
Troubleshoot performance?
Are there any tools or options to help troubleshoot performance? When using blender, every few seconds I get a split-second of lag. This interrupts any smooth movements, like transforms, or scrubbing sliders and gets very irritating. I assume the problem is related to a script or addon, but I have a ton of those. I also get a bunch of dependency cycle and constraint errors popping up in my console, so it could also be one of those areas (but the rig isn't actually in use, and I've had the same rig for ages and this problem is new.)
I can of course start trying to figure it out through trial and error (turning things off and seeing when it goes away, then turning them back on until it comes back), but i'd also like to know if there's any tools to help with that. I need to figure out which script is causing it, or what part of my rig(s) is doing something when it shouldn't. Is there anything I can do?

My suggestion is to focus on the covid dependencies. They are most likely what causes the lag, and they can really screw up any animation

Can't edit on tablet. Cyclic, not covid ofc.

@FrederikSteinmetz None of them should actually be real dependency cycles. I'm using Cloth Sim and collision objects. Some items have both. It seems to be listing garments that have both as being dependency cycles with each other, even though this is normal use of cloth sim. There's a lot of places where it mis-identifies dependency cycles, like it can get confused between objects and data.

Since you found the dep. cycles, I assume you have opened the console? Does the lag include the mouse cursor? Does it only happen in that project? Does it happen when you play your animation, but leave the mouse alone? Context is important here.

I'd have to badly mistaken if you can mix a "regular" collision with a cloth sim on the same object. How is this supposed to be calculated, which cloth object gets first deformed and then collides and which one collides first and then deforms.

@FrederikSteinmetz Cloth sim does not use the regular Collision on itself within the same object. It uses its own self collision for that. But it does use it for colliding with other objects. As for the specifics of the troubleshooting, I wanted the question to be in general, not get into the specifics of my file and addon setup.

Dependency cycles are general. I'm pretty sure that's the issue here. If I understand you correctly, you used the object collision (the one right above cloth sim in the physics tab) in combination with the cloth sim. IDK why they give you the option to do so, but it cannot work.

@FrederikSteinmetz That's the only way to make cloth collide with another object. I've used this method on tons of projects and never had any issues from it. Its the standard way taught in all cloth sim tutorials.


text:
Grease Pencil minimum thickness
I am trying to turn down the size of some GP strokes to taper them. Ideally, i'd like to reduce the size of the last point in the stroke to 0 and have a sharp tip, much like you get on a curve when scaling the radius to 0. However, it seems that I can't go below this line thickness:

I've tried adjusting the thickness with alt+S, in sculpt mode, with a modifier, and with Stroke Thickness in Adjustments. None can make it thinner than this. Is there any other way to reduce it, or to get a sharp tip on a stroke? Why is there this arbitrary minimum? I'm working at usual scale of 1BU = 1 meter. This is my character's neck, and this isn't thin enough for close-up shots.
I've also tried scaling the GP object, but this same minimum size still exists. I suppose I could scale the character up by x10, but then that creates problems with some physics and dynamics that expect 1 unit to = 1 meter.


text:
Snapping vertex to face during proportional edit
I have a human body object. I'm creating a new object that conforms to the surface of the body. I'm using "snap to face" to keep new vertices on the faces of the body object. I want to use proportional editing on the new object. Is there a way to keep all vertices attached to the faces? A plugin, perhaps?

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

Besides all the good suggestions that came so far, what comes closest to your question in my opinion is the project individual option of Blender. You need to set snapping to snap to face first to see the button. Then you can toggle this option on in the 3D Viewport (red square):

Now, all translation tools, move, rotate, scale, even with proportional editing, will snap the whole selection to other faces from the view you're looking at (hold down Ctrl to enable snapping of course):

Quick animation / comparison here:

Retopoflow for the win. It's technically a retopology tool, but its surface snapping tools allow it to do a lot more. This is where I got it.  https://cgcookiemarkets.com/all-products/retopoflow/

I wasn't trying to advertise or anything. Just telling you something that worked for me as the person who asked the question.


text:
Baking multiple materials into one texture
If there are multiple objects with different materials that have been combined into one object, UV unwrapped together and texture baked, the result is glitchy at best. Here is my process:

I start out with everything as a single material with a single UV map and multiple materials. There are three separate pieces in the combined mesh:

I create a new material, a new 4096x4096 image, and a new UV map (through smart projection) that doesn't overlap. I select the image, the new material, the new UV map. Every piece of magic I can think of since I don't know exactly how the bake knows what to bake where:

I click bake, with the sample size set to 256. Nothing is baked to the image I created and selected:

Some stuff baked, but not all of it, and what little was baked was baked to two new images it created:

I don't know what's going on here.

To make this work properly, you need to have an active Image Texture with your new image file in each material you have in this model.
Basically, what you have to do now, is to Ctrl +  C on Image Texture in Everything material, visit each other material and Ctrl +  V.
Then baking will give you appropriate result.

Thank you. Worked like a charm and lifted a bit of the mystery about how texture info flows through blender.

If I want to re-bake, is there a quick way to select all the same texture nodes in every material? Right now I have to cycle through all my objects and manually click on every texture node before hitting bake

This isn't working for me. I have two materials in wto slots in the same mesh, and I have the node with the image I'm baking onto in the two materials. It's also highlighted in both. But when I bake, only the first slot actually is baked on the image.

There is an addon called Principled Baker. It creates a new Image Texture for every material and selects them then bakes all the materials in to textures according to PBR material workflows. It is a free addon and works for both 2.79 and 2.80.


text:
Distribute an cylinder to a hexagonal grid with python
I have create mesh cylinder with distribution hexagone, i use method from modifier array, I created a cylinder dimension x * y * z or z is the depth of this mesh
Are you a script to draw this distribution
exemple

This will do the trick (EDITED to also generate ellipses):
import bpy

rowLen = 10 # Number of cylinders per row (along X)
colLen = 10 # Number of cylinders per column (along Y)
xDist  = 4  # Distance between cylinders in X
yDist  = 2  # Distance between cylinders in Y

ellipseRatio = 1.5 # X/Y ratio (cylinder xScale)

for i in range( rowLen ):
    y = i * yDist
    for j in range( colLen ):
        x = j * xDist if i % 2 == 0 else (j + 0.5) * xDist

        bpy.ops.mesh.primitive_cylinder_add(
            vertices      = 24,
            radius        = 1,
            depth         = 5,
            end_fill_type = 'NGON',
            location      = (x, y, 0)
        )

        o = bpy.context.object # Newly created cylinder is the active (context) object
        o.scale.x = ellipseRatio

Change the xDist and yDist to control the distance between cylinders in X and Y.
Change the rowLen and colLen to change the number of cylinders in each row or column.
The number of vertices, radius, depth and end fill type are specified within the bpy.ops.mesh.primitive_cylinder_add operator as parameters.

good work Tlousky, but cylinder base is an ellipse that is not a circle, how to change the x and y dimension of the cylinder?

@saded - updated the answer, creates ellipses as well now


text:
Cube with cutout corner
Can you cut the cube with cutout corner
example:

Use Intersect tool via Mesh > Faces > Intersect.

search on google for BoolTool Addon ... pretty easy to use to create the mesh you are looking for. It's interactive too.

You can use the Boolean Modifier

Add a new cube with Shift+A and doublicate the cube with Shift+D
position the second cube where you want to cut out the main cube

Select the cube you want to cut out
Go to the Modifier tab in the Properties window and choose the Boolean Modifier

Set the Operation to Difference
Choose the 2nd cube in the Object list box
Click Apply (Object Mode)

Delete the 2nd cube.

Note: After applying the Boolean Modifier the mesh could be not suitable for a good topology.

Yes you can.
This can be done by using the Boolean modifier. Simply create two cubes ,we will call them A and B, A being the object you want to cut and B being the region you want to cut. To better match the question we shall subdivide Cube A.
Then add the Boolean modifier to Cube A. This can be found in the modifiers tab.
Next, in the Boolean modifier settings, set Operation to Difference and Object to the object which defines the region you wish to cut out .In our case this is Cube B.
Then all you have to do is hit Apply delete Cube B and you are done!


text:
Create Gradient Porosity
I would like about the method of creating Gradient Porosity Modeling in a cube, where these holes are gradually distributed from one side and vice versa. What is the procedure with Geometry nodes for achieving this effect?

Hello Saled, do the holes can overlapping?

No overlapping.

You can have a look here: Generate non-overlapping spheres having different diameters in a mesh

Notice the distribution of voids in this image, there is a gradient in the distribution.

Do you want just a 2D distribution in a square or a full 3D distribution in a cube ?

Distribution 3D in cube.

the simpler way, I can think of, to achieve what you want is to use a gradient of Merge by Distance but since this node doesn’t accept gradient, a simple Repeat Zone can be helpful. As your blue print shows you need a Spherical gradient of sizes. So the main idea is use spheres centered on the Cube. With each Iteration the radius of sphere shrink by one unit (depend on the iteration number). With 20 Iterations you will have 19 concentric spheres of course (the last one having a radius of zero, it’s a point). Each sphere will determine the Distance of a Merge by Distance node. The bigger the sphere is the smaller the Distance is. Then you can tweak the Distance with a Map Range to ensure there is no bubbles overlapping. Note that the Distance is depending on the number of iterations, so you will have to tweak the Range Map every time you change the Iteration number.

So let’s begin by a Mesh to Volume on the cube and a Distribute Points in Volume to generate random points.

Now let’s calculate the bubbles radius, for this we need to know the maximum distance from the center of the cube. A point at the center, a Geometry Proximity and a Attribute Statistic will do just that. Then by subtracting this value by the Distance of the Geometry Proximity we invert those values. Then if we divide those values by the maximum, it is normalized. So we can multiple by the maximum radius we want.

we get inside the Repeat Zone node: First we establish a counter that will serve to decrement the radius of the spheres, just by adding one to it self every iterations. Then we divide it by the iteration number. In order to have a good radius of the decremented sphere we have to multiple this value by the maximum value of the Attribute Statistic. Then plug it on the threshold of a Greater Than with the value on the Subtract of the bubbles radius. Then use it as Selection on the Merge by Proximity node. Now we have to determine the Distance of the Merge by Proximity node: We Multiply our Counter by the Maximum Radius, plug it in the Map Range in order to tweak this distance.

The rest is classical Instances on Points, Realize Instances and a Mesh Boolean…

And the all node three:

And the .blend:

Edit for cylinder:

Thank you very much for the idea, but in my case as shown in the figure, the parallel holes (cylindrical holes) in a 3D cube

Do you want me to edit the blend?

If possible please.

Thank you very much, In the case of linear gradient, how would you adjust the Geometry nodes to accommodate holes on an cube?

I am not sure of witch linear gradient you are talking... The radius of th tubes are based on the distance: it's a linear gradient. As well the steep gradient of the Merge by distance follow a linear incrémentation so it's also "linear" in a way...

Do you mean something like that???
https://blend-exchange.com/b/kXWwXzJn/

Like this:

You just replace th central point by a side line (with many points): https://blend-exchange.com/b/JOyoxxBm/

Very well, thank you very much. Last question, in the case where these cylinders are replaced with spheres, for instance, the large spheres are located at the center of the cube and the small ones at the edges of this cube, how do I modify this node? I tried replacing the 'cylinder' node with 'sphere', but it doesn't work.

Let us continue this discussion in chat.


text:
How we design of 3D Tissue weave with the geometry nodes technique
The geometry of tissue cell differs from cell to cell as they are similar to each other in sequence and structure.
I have found in softwares that the design of the geometry depends on the shape of the node and the profile which represented as a curve of the sine (sinus), where a curve is drawn, as well as the section of the node, which is most often in the form of a circle or an oval. ..., then, we deploy the node on the curve to obtain a special section, then we generate several curves for the first node of the same direction. Then we repeat the procedure for the nodes or curves, and this time these curves are perpendicular to the first curve.
Until we get what we call Tissue weave 3D.
The process can be repeated horizontally to obtain a grid, as shown in the attached images.
Is it possible to help for the design of a 3D Tissue weave with the geometry nodes technique.

These weaves could certainly could be constructed, using Geometry Nodes, but before deciding that's the way to go, you could have a look at the shipped add-on Tissue Tools , a large part of which is specifically built for this purpose.

The last knitting version use something you can use https://blender.stackexchange.com/a/282530/2214

Do you mean Tissue addon, for these case of a flat tissue as shown in the figures I do not know how to adjus it well.

Thank you vklidu, I have already seen this page, but here it is the case of a fabric on a tube, in addition the adjustment of the section of the tissue is a difficult one.

This Addon is included in the code 3DMax: http://www.scriptspot.com/3ds-max/scripts/weave-mesh

Based on Bezier Segment ... with the first Transform > Scale > Z you can change waviness ...

Simple Array ...

When connected to Group Input node for simpler manipulation ...

Good vklidu?, How to make the nodes in contact?

What do you mean by nodes in contact?

Amazing, thank you vklidu, thé contact IS between tube profil. For the 3rd figure or the figure named "d", can we generate it with this technique, (See figure 1 for this paper:
https://link.springer.com/article/10.1007/s10853-019-04096-1 ).

Sorry if you mean 3rd figure named "d" in your Q I don't think it would be a big question for someone who knows :) I'm stacked how to offset green strips per instance and keep start https://imgur.com/EUf61nV BTW your link needs some institution permission so I can't reach fig.1 in the link in your comment. Probably edit your Q at something simpler that covers my answer and create another one. Thanks

... or if @RobinBetts is interested to answer :) or any geo-guru here.

The addon Nodes geometry is a powerful tool for generating structures. In the following video (https://www.youtube.com/watch?v=VBDf54D_iqI), it shows a tool that uses a special technique to generate these weaves, and especially to generate oval sections and layers between them, in this node, how to create this section?


text:
Request an explanation of the nodes for generating random pellets
The Geometry Node method is considered one of the best methods to generate complex geometries in a short time, because I have already requested a job that consists of generating spheres with a random distribution without overlap inside a cube, so one of the members created his own Geometry Nodes, which can be found at this link:
Random spheres inside a cube
I hope the owner of this design (Hulifier) or someone else will explain the main points of this node and the algorithm I used in Poisson-disc Algorithm to us because I need it for scientific research.
Geometry node of generation:

The idea is to use the node Distribute Points on Faces to generate points in a cube volume, the reason for using this node is that it has an option for minimum distance when in Poisson-disk mode (I believe it does that by generating the points and then deleting the invalid ones), which we can use to keep spheres from intersecting.
Since the node Distribute Points on Faces only distributes on faces, we can simulate a volume with many layers of planes inside the volume. With a bigger layer count, more possible positions are available to points, and thus points tend to be more closer to each other, but always obeying the minimum distance.
to eliminate the need to check and delete spheres intersecting with the bounding cube, the layers can be created with edges far from the cube bounds by the desired radius, that way spheres will at most touch the bounding cube.

Detailed Steps
First a vertical line is created centered to the bounding cube, it's length is $w - 2r$, where $w$ is the bounding cube's size, and $r$ is the desired radius for the spheres.

Then, planes with dimensions equal to $w - r$ are instanced equally spaced along the line. Spheres generated on them will be more closer to each other as the number of planes increase.

On the generated planes, points are distributed with a minimum distance of $2r$. (points of all planes are considered when generating them, so the minimum distance also applies between points of different layers).
After that just instance spheres with radius $r$ on the distributed points;
I also check if a sphere of the desired radius can fit in the bounding cube before outputting the geometry, since a single sphere is still created by this method when the radius value meet that condition.

Stupid question: Why don't you add this additional information to the original post? This question here is actually superfluous, if an explanation of your solution actually belongs to another answer.

@quellenform done, it's also there now.

Perfect! Thanks for helping to keep this platform tidy!

Thanks Hulifier for the interesting explanation, Regarding the bar of Radius, Quality and Density Max, is there a mathematical relationship between them? I want to plot also the Radial Distribution Function for Hard Spheres curve g(r).


text:
Bend a flat gradient without distortion
I am trying to make some shapes out of object coordinate vectors. I want to take a linear gradient (the X, Y, or Z) and bend it an arbitrary amount around an arbitrary point without distorting it. Currently, I am attempting this with Vector Rotate, as it lets me control the Angle and point to bend around. Here are the results with a 90 deg rotation:

And the nodes:

The Rotation is being masked based on the vertical axis. I've put it through Steps to make it easier to see the width.
The problem is that this is getting distorted. The thickness of the gradient is being lost when it is bent. I would like to prevent this from happening accidentally, but would also like to be able to make it happen intentionally.
My current setup seems convoluted, and it feels like there must be a better way to do all this?

'Mix' is bad for this kind of thing - since it's a linear blend between two points (ie, a straight line) and so it will always distort for curved paths. In your case you need to rotate around the centre point and this can be achieved as follows :

Here the Arctan2 determines the angle to the mid-point and the Cosine/Sine uses this to effectively blend between the X and Y offset as a rotation based on that angle (so when the angle is close to one axis it's one offset and when close to theother it's the other offset). The Maximum and Minimum limit the rotation (otherwise it would produce a complete circle). The 'Snap' at the end is it to give the banding.
Animating the Maximum and Minimum produce the following :

Crikes! x sin(t) + y cos(t) = r ! Why isn't that one on the 'obvious' shelf?  Maybe it is, for you... :)

TBH, I'm not really sure how I pieced together this solution - I think it was more "instinctive" than anything! :-D

For stuff to be 'instinctive' to me, I have to be able to visualise it. I can do this one algebraically.. but I still can't see it. :( It may click eventually..


text:
Change node links based on which Render Layer is rendering
I am trying to make a setup where a different node is connected to a node group's output depending on what Render Layer is being rendered. For example, if layer 1 is rendering, then RGB is connected. If Layer 2 is rendering, then RGB.001 is connected.
I already have a setup that let's me use a Driver that outputs a different value based on which layer is rendering, so I think this ought to be possible.
Here is that script:
def layer_number(depsgraph: bpy.types.Depsgraph):
name = depsgraph.view_layer.name

try:
    layer_no = int(name.split(':')[0])
except:
    layer_no = 0

return layer_no

This is based on this feature that was added in 2.9(scroll to bottom) that allows things from the dependency graph to be accessed in Drivers.
To use it, you create a Driver on a value with the expression layer_number(depsgraph). The value will then be a number you put at the start of the Render Layer name. This can then drive a mix node, or whatever else. It will update when switching layers in the viewport, or when F12 rendering. (The script needs to be registered or run of course.)
For various complex reasons that are too long and specific for this post, I can't use just this method of mixing between two different nodes. I need to plug in one or the other. I have a script that removes or creates links as needed, but I need to be able to trigger it and feed it the proper value based on which Render Layer is currently rendering.
So, the script needs to do something like this:

Run each time a new Render Layer comes up, either in the viewport or during a full F12 render.
Get a Value from the Dependency graph based on the Render Layer that's about to be rendered.
Run the script/function that changes the node links.
Proceed with the Render.

Is this possible? I am aware that there are ways to trigger things at the start or end of a render job, but generally that means before and after rendering all layers, and won't let you change things per layer. But since the above Driver feature was added, I am now thinking that you can change things per layer, even during a larger render job?
(I am aware that you can write command line batch render scripts that do a render job of an individual layer, then change something, then do a render job of the next layer. I am looking for solutions beyond that, as I want this to work when switching layers in the viewport, or rendering only individual layers in the compositor, etc.)

do you mean like this? https://youtu.be/IDSbo5QpVu4. if yes, i first would like to verify whether it works with rendering. How can i render different layer views to different png?

i made it now successfully for rendering, but the viewport update doesn't work always. I have no idea why.

@chris cool. Viewport updates can be unreliable in the Driver mix version too.

there might be more elegant solutions, but looks like mine works now ;)
the driver (i just put in on x-location for testing) looks like this:

The driver is responsible for the viewport render changes.
and this:
bpy.app.handlers.frame_change_post.append(my_handler)

is responsible for the render frame changes (F12).
Here is my python script:
import bpy
from datetime import datetime
import time
from bpy.app.handlers import persistent
from bpy.app import driver_namespace

def layer_number(depsgraph: bpy.types.Depsgraph):

    name = depsgraph.view_layer.name

    print("name:", name)

    try:
        layer_no = int(name.split('.')[1])
    except:
        layer_no = 0

    print(layer_no)

    mat = bpy.data.materials.get('mat')
    nodes = mat.node_tree.nodes

    output = nodes.get("Material Output")

    links = mat.node_tree.links

    if layer_no == 1:
        a = nodes.get("a")
        link = links.new(a.outputs[0], output.inputs[0])
        print("a")
    else:
        b = nodes.get("b")
        link = links.new(b.outputs[0], output.inputs[0])
        print("b")

    return layer_no

def my_handler(scene, depsgraph):
    print("Frame Change -------------->", scene.frame_current)
    layer_number(depsgraph)

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

print (bpy.context.view_layer.name)

@persistent
def load_handler(dummy):
    print("Load Handler")
    #dns = bpy.app.driver_namespace
    # register your drivers
    bpy.app.driver_namespace['layer_number'] = layer_number

def register():
    print("Register")
    load_handler(None)
    bpy.app.handlers.load_pre.append(load_handler)
    bpy.app.handlers.load_post.append(load_handler)

register()

blend file to check it out:

To test:

run the script

change to viewport shading rendered

change the view layer from "View Layer.002" to "View Layer.001" and back

render it out

if you have questions, just ask. Then i will improve my answer.
Result:

i did composite it that way so you see that the material really changed.

Can you tell me what exactly the @persistent is being used for? I've made an altered version of this script, and it seems to work just fine without that.


text:
Generate random curved circular shaped voids in a square
Can you help me to generate randomly distributed void curved circular shaped voids in a square. the figure below shows an example.

https://blender.stackexchange.com/questions/296387/how-to-create-random-blobs-of-curves-in-geo-nodes/

Thanks for the idea, I redid this model but I got shifts on the edges. https://i.sstatic.net/DFyx2.jpg

I would call this solution experimental, but it may help you:

The principle behind it is relatively simple, and there are a lot of possibilities to influence the result individually.

First I create a grid and move the single points. The node Map Range helps me to clamp values. With the node Merge by Distance I bring further disorder into the structure. Finally, I split the faces so that they can be edited separately:

In the next step I move the vertices a bit into the center of each face. To do this, I convert the faces into curves, divide them once, and then select every other point to move it with a slight random value:

Finally, I resample the curve to get a higher resolution and apply the node Blur Attribute, which smooths the positions of each curve point for me:

Finally, I combine the result with a qudratic shape (Quadrilateral), which in this case acts as an outer frame, and Fill Curve creates the desired mesh:

(Blender 3.5+)

Thank you for this solution, if I want to convert this mesh to DXF, I add the Realize Instances node. What are the parameters to set to export this mesh in DXF.

@saded To do this, you would just have to apply the Geometry Nodes modifier, and use the DXF format when exporting.

What I know about setting these parameters: https://i.sstatic.net/D9NC9.jpg

@saded Wouldn't it also be a possibility for you to use the FBX format? Also, it would be better if you create a new question for it, I think.

I made changes in the mesh exported to DXF, so the results are fine. Thank you very much Quellenform and Duarte Farrajota Ramos. https://i.sstatic.net/HzR2c.png


text:
How to generate images from texture volumic
I want to generate consecutive images from a 3D texture
Here images were obtained with cross section.
In different cases these volumes can created with:
- A cube Contains of procedural textures volumetric
- A cube contains holes (porous).
- A cube contains different mesh same or different colors.
These are videos that explain this:
https://www.youtube.com/watch?v=1Yv2XYsCAYU
https://www.youtube.com/watch?v=XJI-yzpbKfg
https://www.youtube.com/watch?v=pPyG_fEee_o
https://www.youtube.com/watch?v=K3oInsZ7MJM
Can you help me to get the images in all three cases.

i use cross section with plan such as in video  https://www.youtube.com/watch?v=fOQt_qnk7DM, but i have not look texture, in your firt tutorial does not work as, compared to others I did not understand the explanations.


text:
Help with an alpha brush - camera setup
So I was trying to make my own alpha brushes.
but I have a problem with the opacity at the edges of the brush...
Not being so familiar with blender nodes i'm really not sure how to adjust the settings to achieve a smooth transition outwards.
I think likely its either my camera settings or the adjustments to the image...
I'm still trying to adjust the settings and keep tweaking it... but hopefully someone has some ideas what might be causing the problem.
rendered image also has a slight gradient visible below ... ill try playing with the distance... maybe that will help.?

you tube vid of problem

your sample bias setting is screwing you over here. I tried your first file, and just loading as a texture, and using it without any editing, on Area plane, anchored mode, and custom falloff set to all max, it worked fine. I would however suggest you didn't use the fade on the edges, seeing how this alpha is a full object with hard edges, and not truly just a texture, but a belt buckle...?
in any case, blender accepts black-backed alphas by default, because they're easier to produce and provide much more detail in the most often used direction. Generally, grey-backed alphas (the background grey at 50% brightness) is used in alphas with both positive and negative deformation.

Thanks so much!, yes I will keep practicing to make better renders for my brushes, but that helps a ton :)
I marked it as the answer, but if you do have a little extra time may ask...what would you recommend as sample bias and how does that work?

Actually I found it sorry I was confused initially if sample bias was in the camera - but then I found it on the brush - so no explanation needed ;P Thanks a million now it all works and I know why and how to adjust what I need!  win win

at 0, black=flat -use for ridges, bumps, and surface objects, like lug nuts, scales, and ribbing-----
at -.5, 50%grey=flat -use for surface details, like bolts, scars, terrain and warped plating---------
at -1, white=flat -use for indents- gashes, gaps, handholds and bullet holes


text:
Uvs on mesh change in image viewer, different from UV editor? meaning I cant paint as mesh don't align
My uvs from combined meshes are different from what the image viewer is displaying,
And although my normal baking worked, I cant paint on my meshes because they dont align to the object.
First image is from my combined objects, you can see all the uvs present.
Second image is the uv on the bag changing when I enter texture mode, uvs dissapear and uv map changed..
3rd image is the combined objects normals baked but the uv worked here?...
If I enter texture painting mode it swaps the uv? and I cant paint on the other objects since their uvs don't exsist?? But the normal's bake fine... very confusing!

have you selected the good UV map in the Properties panel > Object Data > UV Maps? Could you please pack your images and share your file?

Thanks moonboots, I managed to get it to work by joining the three objects together, and was then able to see that somehow the UV editor had some other info that hadn't come though - possible some glitch as I had tried using a multi-object baking plugin.
well in anycase I repacked the uvs the separated the models again, and now they seem to work fine - so was some sort of glitch. Thanks for taking the time to help though :)


text:
Render Scenes from Sintel movie realistically
I am very new to Blender, but I downloaded the official Sintel production files. Has anyone got experience with them?
I can render frames from some scenes, but they look very different from the real movie and it seems some textures and effects are missing.
Let me know if you need any more information, I can also share some files.

With work and expertise. There is no single way to do it. You may find you need to replace files, change settings, do extra color grading etc in post, and a whole slew of other film production magic.

Get a version of blender around 2.6


text:
How to nicely render mathematical object made from slices
I want to render a certain geometrical object for a scientific paper. It should look nice, but the main point is that I want to make the shape as evident as possible. I would like to get a result similar to what one would get with Jmol (though I would hope for a much nicer look).
You can take a look at the shape here. For those who know about this stuff, it is sort of like a smoothed cuboctahedron. It has two kinds of "faces", triangular ones and square ones. I would like that to be clearly visible in the render.
Maybe it helps to know how the mesh was created. I generated each slice of the solid along the z-axis and wrote a script to generate the whole mesh. Maybe the reason why I can't seem to get a nice looking render is related to the way I generated the mesh? Or maybe I am just very incompetent in dealing with Blender (most likely this is the case).
Any help would be welcome!

Please place images in your question if you like.

Hello! I want the faces to be clearly visible, whether it is shiny, colorful, I don't care. No textures though, and not transparent. No wireframe either. I think I am going for more contrast between the faces of the body.

In edit mode, with all geometry selected hit Ctrl+N to recalculate the face normals, they are doing crazy things. This unifies their direction.
A render of the cuboc you provided, with light spheres (Cycles Emission material) placed at incident angles with respect to the faces they are intended to highlight.

You have more Z slices, than XY steps around the object, this produces elongated polygons, and is one reason why you won't get smooth surfaces. You will get neater results if you can generate more points per z-slice, resulting in the polygons being closer to square shapes. Either that or fewer Z slices, but then you loose detail.

Hi! Thanks for your answer! I cannot make the body myself though. It is given by a polynomial, and it should be exactly what it is. :)

@Fernando I've updated my answer

@Fernando if the shape is parameterized as a polynomial, can you not sample it as little or as much as you like?

Hello all. I think this answer was quite good. Yes, the region is parameterized by a polynomial. But it is a very complicated one, nothing you can just type in Blender or so. I think my current approach to generate the region is however not the best. :) I will try to do it in another way. But it is useful to know that the shape of the regions matter, etc. And the normals trick is also quite helpful (I have the hardest time finding anything inside blender, having just used it very little). Anyway, thanks for the answer!

@Fernando blender has a very decent Python API with many mesh operations, including a Convex Hull generator which is quite adept at skinning (attaching faces to) such objects

As @zeffii noted, the main problem was that the faces were not really nice in my model (that, and the shape is just not very helpful in fact). I was using a rather stupid method to generate the faces, however, by generating each slice and so on (because I had that already implemented for other reasons). Later I found out Blender had a plug-in that can plot functions you type in some textbox, but that was not good enough for me because my function was too complicated for it.
Turns out there is a very simple way to make a decent plot however. In the end I used Sage to plot my function (using implicit_plot3d), which generates a Sage Graphics object. This object contains a list of vertices and faces of the resulting mesh. You can save this and write a very short Blender/Python script to read the file and generate your mesh. This is a much better method! And Sage can handle any sort of complicated function you can come up with. The whole thing ends up being quite quick and painless.
Hope this helps!

yeah, it doesn't get much simpler than: http://blender.stackexchange.com/a/2408/47 (from_pydata)

But it can get more complicated: http://web.purplefrog.com/~thoth/blender/python-cookbook/staircase.html


text:
Need Texture To Fade Around the Edges
So I have a stain texture I want to use.

But as you can see it's not a splat, like this one.

I really want to use the first one, but its a rectangle. So I want to know how to make it grow transparent around the edges of the texture (which I want to put on a plane and put in front of my wall in the scene) in Cycles so it fades out and fits in better with my scene.

I once had to do something similar, and I've used two different solutions.
1) Simply add an alpha channel to the image, or create a separate grayscale alpha map to use alongside it.
2) Inset the mesh, with the resulting face being close to the edges (or further, as desired).  Then go to Vertex Paint mode, and set the vertices along the edge to black, and the other vertices to white.  The Vertex Colors are exposed to cycles via the Input->Attribute node, where you type in the name of the Vertex Color dataset (Col by default).
To get the transparency, you plug the alpha (either a map, channel, or vertex color attribute) into the factor input of a Mix Shader node, with one input being Diffuse BSDF (or whatever you're using) and the other being a Transparent BSDF node.  You can use the Color->Contrast node on the alpha input to make it less gradual, or use a Converter->Color Ramp instead.
The image below demonstrates the second technique, using vertex colors:

Regarding the alpha map, I was able to do this with gradients and mapping.

If you load the image into Blender using the bundled Import Images As Planes Addon and then enter Texture Paint mode, you can isolate parts of the image you want to use.
I used the Color Burn paint mode to darken the center areas and Color Dodge to lighten the edges of the image to hide the "Squareness"
Now the image can be saved with a different name as a second image to be used as a mask.

Now if you setup the Cycles nodes as shown in the previous image and adjust the Color Ramp node, you can alter what parts of the original image are shown.

Once you have it looking the way you want, you can duplicate the image in your hard-drive directory, rename it, and then dragNdrop it into the Node Editor.  Now if you bake the material, this texture will contain the final result so it can be used for any Blender renderer or external program.

Here is the final baked image.

You can also make the texture seamless as shown on the following page.  http://blender.stackexchange.com/questions/15085/how-can-a-texture-converted-to-be-tileable-seamless


text:
Does the Glossy BSDF include Fresnel and geometrical attenuation factors?
The analytical Torrance-Sparrow BRDF model incorporates a Fresnel reflectance factor and a geometrical attenuation factor.
Does anybody know if these effects are also considered by the Glossy BSDF material in the Cycles render engine?

Visually, I don't think it incorporates fresnel. But I can't find anything to back up my claim right now.


text:
increasing amount of side faces on object made from cylinder
Is there a way to increase the amount of side faces on a cylinder-like object  after manipulating the object in edit mode other than using subsurf and creasing every single edge? The edges selected on the picture are the ones I'm refering to.
I modeled a now somewhat complex object starting with a simple cylinder, assuming that the amount of faces on the side would be sufficient though there's a need to increase it now.
Also, does the shading method (smooth/flat) affect the model in any way when exporting to other file formats?

Why do you need to add more edges? Its mode than enough edges for that curve.

When modeling it's usually easier to use a lower number of edges and so  avoid editing dense meshes like that, and instead use the subsurf modifier to smooth things out. Also see this question and it's many linked and related questions.

You can select the edge loops and bevel them.

Mesh Objects in Blender don't have an Edit History that would allow you to edit a parameter somewhere at the start of the Object's life and have that propagate through all other operations to the present. You can't in your example change the tube's vertex count after you've made edits to it.
But it is possible to reconstruct the object quickly with the desired vertex counts. For instance use the Screw Modifier to Lathe the profile around an axis. The Object's center can be used as the rotation coordinate or an Empty.

Using bevel along the side isn't quite the cleanest solution though it works when the sharp edges at the bottom and the top won't be modified afterwards.
I am probably going to use subsurf and crease all sharp edges to a maximum.
Thanks for the help


text:
Append an object without its associated objects
When I append an object, it also appends a lot of other associated objects, such as it's rig, and even the rig's custom shapes. And if I append an armature object (not just the data), then i also get all of the objects that use it, and even other rigs on those objects and their custom shapes. This makes for a massive cleanup job any time I want to grab even a simple accessory from a previous project.
Is it possible to link an object without getting it's associates? I am aware that I can link only the object or armature data, which avoids this problem, but then I lose my modifiers, constraints, etc.

Have you tried unticking the Localize All option in the file browser settings (bottom left)?

@DuarteFarrajotaRamos that does it! Want to put it in an answer?

While apending, in the file browser, untick the option Localize All at the bottom left settings panel.


text:
Pack UVs without rotating them?
I have an object with a UV unwrap, but there are overlapping parts. I want to pack islands to avoid any overlaps. However, the rotation of the islands matters due to using procedural textures. Pack Islands doesn't seem to give me any options, but is there a workaround or other tools that would let me stop overlapping UVs islands without rotating them?

UV Pack Islands operator has an option allow/forbid island rotation. Just press F6 after packing to adjust operator preferences like in 3D View operators.

Gah! I assumed it had no operator because there wasn't one in the side panel where it usually is.


text:
Can a local axis be aligned with an edge?
I want to align (make parallel) any of the 3 local axes with an edge. How can this be done? Can such an axes system be made available outside the object the edge belongs to?

see manual/transform_orientations

also see this answer: http://blender.stackexchange.com/a/31699/47 (works for Edges too)

Yes, you can have any number of custom transform orientations. You create a transform orientation by selecting either a vertex, edge or face and in the Tool Properties panel (N) at the bottom, expand the Transform Orientations tab. The plus sign will add a new orientation based on the currently selected element in the scene.
It's a good idea to name these orientations if you plan to reuse them, else that list can get confusing.
This Transform orientation can then be selected from the drop downs in that same panel, or in the 3dView header. Because they persist in the .blend they can be recalled at any later stage.
Also see this answer, which covers much of the same
Limitations
(Dec 2015) You can't make a Transform Orientation using a Curve Object's Point or Segment.

Unfortunately setting the axis using two points does not work with two control points of a NURBS-curve, only with two vertices.

I do believe i wrote that already.

God this is SO useful! I just did a loop cut into the direction I wanted the axis to be. Easy.


text:
PC "not responding" when I use the Subsurf and Bevel modifier at the same time
Blender "not responding" when I use the Subsurf and Bevel modifier at the same time. That is the only time Blender does this.  Anybody an idea what could be the cause?

Large amounts of calculations (very high polycounts) most likely

What level of subsurface and home many faces?

Blender can become unresponsive if

the combination of modifiers creates a large amount of Faces

Make sure the subsurf is turned to a low level when applying the bevel modifier!
Also keep in mind that changing the order of modifiers affects the order in which blender processes them.

placing the subsurf as the second modifier includes the bevel in the calculation

If neither of the above causes the problem, try a different version of blender or a new file.


text:
What does the fading selection color mean?
In the picture you can see that the last vertex selected on the edge loop is somewhat separated by a color change from the rest of the selection. What does this mean?

The fade from orange to black along an edge means that the edge in question is connected to the selected vertex, even if the edge itself is not selected. The situation in your screenshot is caused by two vertices in the same place. These are called doubles and can be automatically merged via W > Specials > Remove Doubles.

Somewhere there was an option to adjust this fade. In themes? Or somewhere else?

Hi, @blenduser, it would be in Themes > 3D View.. but I haven't been able to find a setting that alters the fade. The colour is set by 'Edge Select'. SE sites have a structure: a question followed by ranked answers, no.. supplementary questions can't be asked in the answer section. If your question is sufficiently distinct, ask it in its own right. You could chase this one down.. but personally,  I don't believe you can adjust this aspect of the display.. sorry..

There are actually two vertices in the exact same position there, which can be seen as you noted by the differences in edge shading.
I would box select where the manipulator (the blue, green, red arrows) are and either hit alt-m to merge  or hit W > Remove doubles.

ah too slow, gandalf3 beat me to it.


text:
Sky & Atmosphere for Cycles Render
The Blender Manual describes for Blender Render extensive setting options for Sky & Atmosphere, like in-scattering, extinction, exposure, brightness, turbidity etc. However, in Cycles Render that all seems to be condensed in world => background => sky texture, with only turbidity and albedo as parameters. Aren't there any more functionalities in Cycles Render?

That's because if you are using cycle as a production tool, you will most likely be also using a hdri or exr format to create Image Based Lighting (IBL) environment. An example of how a hdri IBL look like http://media.hdrmaps.com/media/catalog/product/cache/1/small_image/620x310/9df78eab33525d08d6e5fb8d27136e95/f/r/free-hdri-map-066_1.jpg Some production artist will go so far as to take an image on location and then use it later in their rendering.

And 3rd party add-ons are available -- from Blender Guru, Dragoneex and others, I am sure... -- providing out-of-the-can Cycles lighting and sky options.

In Cycles it's done just in another way. Sky Texture node is procedural hdri map which may work for testing renders etc. If you add Environment Texture you can plug any hdri map you have. For scattering you use special nodes like cegaton answered. Exposure and brightness can be set in different ways, including compositor.


text:
Simple edge loop won't Grid Fill
This edge loop (the roof of the car I'm trying to create) consists of 34 vertices on each long side, and 8 vertices on each short side. Together with the 4 corner vertices that makes 88 vertices in total. I'd say the perfect set-up for a Grid Fill ... except that it does not work (see error at top of screen). I checked for double vertices, there are none. I checked if the loop is water tight, by using ctrl+RMB select, and that's all ok. So what could be the problem?

What happens if you provide only the vertices on both short edges as initial selection for the command?

If you extrude inwards and grid fill it should work. You need supporting outside topology to determine the direction of the fill.

The problem has been solved, but don't know how. Had redrawn the edge loop, and afterwards it workded. thx

As stated by the Blender manual's section about the Grid fill command:

Grid Fill uses a pair of connected edge-loops to fill in a grid that
  follows the surrounding geometry.

Despite this, using the vertices indices and the picking order, the operator is capable to guess the user intention even if he defines the whole boundary, but it still needs to guess the right offset's and span's values because you are not providing edgeloops but only some vertices and it has to guess which gruops of them belong to an edgeloop.

See in this sequence how the operator behaves differently on same geometry simply by picking another vertex to complete the selection.


text:
Applying material to a face
I selected a single face in the object (car wheel, see picture) to be given a particular material (rubber, red color). However, when I press "assign" in the material tab, the whole object (wheel) is painted in the material. How can I limit this to the face?

The assign material button only works when there is more then one material.
When there is only one material the material is always on the entire model. To be able to use the assign button, just add another material.

To limit your material to one face, or specific faces, first go into edit mode. Then select the desired face(s) then the material you want to have assigned. Then with both the active material and the desired face(s) selected, click assign.


text:
Create a compositing node 2D Vector from individual x & y components
A node I want to use requires it's inputs to be Vectors. However, video tracking nodes output separate x & y components, not a Vector. I can't seem to find any node that allows me to create a Vector from these components within the node editor.
Am I missing something?
What would you recommend as a method of generating the vector input?

Does the Converter > Combine RGBA node work?  At least in Cycles this is the same thing as a Combine XYZ node.

You can use a Combine RGBA node. This is because in practice color and vector inputs are more or less the same.

Ha Ha, I almost tried that but thought, "No, there has to be a better way". Thanks.

@Glyph heh, yeah it's pretty strange. They added a "combine XYZ" node to cycles for just this reason (it's identical to the combine RGB node).


text:
2.74 Camera Solve failing despite having 8 consistent tracks and matching keyframes
I'm sure this must be something I have just overlooked or misunderstood, but I cannot for figure out why I can't solve camera motion in this situation.
I have 8 tracked points, with seemingly very smooth motion, yet when attempting to solve camera motion it refuses giving the "At least 8 common tracks are needed on both key-frames for reconstruction". My keyframes are at frames 0 and 67, the same as was set for solving. Yet I still get nothing each time.
Here is a short clip of the situation for additional context.
You can see that the 8 points track from 0 to 67 then stop, yet that range for solving does not work.
Thanks in advance for the help.


text:
Accessing Scale data from motion tracked point
I have a motion tracking point set to track location and scale. This works great, however, I can not figure out how to access the scale data in order to use it as part of a driver. Could somebody tell me where I can find the scale value for individual tracking points?

@cegaton I have an object tracked to the point, however, I also need to scale the object so that it maintains scale with the car in the video. The tracking point perfectly scales with an emblem on the car so I think I can use it to get the proper transition.

@cegaton Unfortunately corner pinning won't work in this situation, but I just did it by hand so don't worry about it. Thanks for trying to help.


text:
Keeping a mesh flush against another surface without ruining geometry (Non-Spherical Eyes)
I am working on a cartoon style animated character who has unrealistic non-spherical eyes.
Warning, it looks really dumb from this angle.

The problem is that because the eyes of my character are not spherical, attempting to move the iris and pupil simply by rotating the eye is not possible. I am now trying to figure out a way to manipulate the iris & pupil separately. However, when moving the eyes it is almost impossible to keep the surfaces together, but shrink wrapping causes the geometry to warp.
I would really appreciate some help and suggestions on how to get this to work. Thank you.

First rig the eyes as spheres, then use a lattice modifier to deform them into the head shape.

@sambler Hey, thanks for your response, that is a really clever idea. However, it doesn't quite seem to work in my case, perhaps I misunderstood. Here is what my attempt looked like


text:
Accessing Point Data of an Animated Bezier Curve Through Python API
I am currently working on the rig for a simple robotic character. This character has tube-like arms which bend and deform smoothly using the curve modifier. This works great, but I had to figure out a way to keep the robot's hands attached to the right point at the end of the arm and to stay perpendicular to the arm path. I wrote a python driver to accomplish this which yielded great results as seen here.
However, the problem is that as far as I can tell Blender only updates the coordinates of Bezier Curve Handles when in edit mode, which means as soon as I attempt to animate the limb using shape-keys the hand is frozen at the last edit mode point regardless of driver dependency updates.. You can see the value I am using for the driver not changing during animation here.
So my question is essentially, where can I get the animated spline data used for object mode? If this is impossible, what are my options.
Thanks

SplineIK could be an option

@batFINGER Yeah, I think that is also a perfectly legitimate option, but in this case I would rather not deal with it. I've always found curves easier to predict anyway, but I might just be doing IK wrong.

Could you perhaps solve your problem by using Hooks?

Edit the curve
select the endpoint you want controlled by the empty.
Ctrl-h and Hook to New Object

Now moving the freshly-created empty drags the curve control point around.
It is also possible to hook the control points to bones in an armature, or maybe just select the hand and the curve and hook the control point to the hand object.

Thanks, this actually does work, however the part that fixes my problem isn't explicitly stated in your post so I am going to write it here. The way to achieve the hand effect is to hook the curve to the Empty, then parent the hand geometry to the empty so that it controls both in terms of both location and rotation. Thanks again.

I think I edited my answer after you read it.  I suspect that hooking the curve control point directly to the hand object might be an even more direct solution.

Yeah you must have, thanks again for the help.


text:
Use a Geometry Nodes Instance Attribute in the shader?
Is it possible to get any of the Instance level Attributes into the Shader without Realizing Instances? If you use Instanced Objects, you can have different Object level attributes and access them properly (rotation, location, etc.) But it seems that Instances within Geometry Nodes do not work like this.
Here is the issue I want to solve: I have created some Instances (cones in this example). They have random rotation. I have Stored their Normals as an Attribute, but it is the Normal BEFORE the rotation. So the Normals are not World Space, and they are all the same.

If I could pass the Instance Rotation to the Shader, I could use it to rotate the Normals into the proper space. (I do know that I can use the Geometry Node in the Shader to get the Normals. This is just a simple example. I would be doing more complex things to the Normals in Geometry Nodes first.)
It looks like the Object Info shader node will give Location of the Instances properly. Random also works. But there is no option for Rotation or Scale.

Instances are used for the purpose of duplicating data for performance. So each instance holds the same geometry data and instance-specific data is only location, rotation, scale and additional custom attributes you add to them, but you can't red those attributes in a shader... If you can afford to realize instances then the problem disappears.

If you really just want to align the rotation of the previously captured normals along the World Space, you could simply use the Vector Transform node in the shader:

This will rotate the direction vectors from Object Space to World Space.
(Blender 3.2+)

So it seems you can infer the instance rotation using the difference between local and world space normal?

@MarkusvonBroady Yes, it seems so. Apparently the node Vector Transform processes each instance as a separate object and therefore rotates the normals per instance. ...But it may also be that I have completely misunderstood the question. :D


text:
Twist like SimplerDeform but with bones?
I want to create the same sort of twist that you get from the SimpleDeform modifier, but by using an armature so that I can have more control of it. I want to get at least 360degrees of twist, maybe up to 720. The object is basically a cylinder.
If I use just a couple of bones, then when they twist, they pinch to no thickness in the middle. What is the proper setup with bones to get the amount of twist I want?

the Preserve Volume option in the Armature modifier does a good job to prevent the thinning, I don't know if that's enough for you're trying to do. Edit: It looks like you need more than 2 bones to make a 360° though

It looks like you can't rotate a bone more than 180° (to be confirmed), except if you deparent it of course, so I guess you must create a chain of bones. In the Armature modifier, don't forget to activate the Preserve Volume option.

Are those bones inheriting rotation? What is their relationship to each other, and how much are you rotating each? Thanks.

yes they inherit rotation, I have just subdivided a bone several times, it looks like you can only rotate 180° with a bone, so theoretically you should only need 3 bones to make a 360° rotation, but it's actually not enough to get a good result, so you need more

I'm having trouble getting it to preserve the volume. Even with Preserve Volume checked. Can you show your weights?

I've just parented with Automatic Weight, you need to subdivide enough your object, please share your object: https://blend-exchange.giantcowfilms.com/

I would try to use a bendy bone with controllers (see here), then add a bone at the base of the bendy bone (I'll call it "rotator" from now on). The opposite bendy bone's controller will be parented to the rotator, and its rotations will also be driven by the rotator.
In theory, this will make the opposite controller rotate arround the bendy bone base and rotate it twice the amount of the rotator's rotation. The bendy bone would form a perfect half-circle shape, without any wrong deformation.
Duplicate the whole thing and invert it to get the other half, and you have your simple-deform-like rig.
I did a test, you can download and retro-engineer it.

I think Drudge is talking about twisting a shape, like parent a column to two vertical bones and rotate the top bone 360° on the global Z axis. With your method you will have a better result than with 2 bones but I don't think you can do more than a 180° twist. I think he needs several bones and enable Preserve Volume.

Oh yes I mistaken x) Though, I bet the same method can be used for a twist too, just by changing which axis is driven.

I've tried with bendy bones + stretch to, but same problem than with 2 bones: you can't exceed a 180° rotation (well, it looks like)... you can add a second bendy bone but it begins to be a bit hard to control


text:
Expression based Drivers are not updating in the UI
Here is a Driver. It is a Custom Property on an Object that is driving a value in a Shader Node. It was made by right clicking on the property and Copying as Driver. It uses a Variable. If I change the property's value, it updates instantly. This is working properly.

Here is an equivalent Driver accessing the same property, but this time its using the Full Data Path as an expression. It works, but it does not update in the viewport when the property's value is changed. It is the correct value when doing a F12 render. Updating Dependencies or reloading the file updates it.

I am trying to figure out how to get drivers to update in the UI instantly when using an expression like this. (The use case is Relative Path Drivers. I want to Drive based on a path to a property by name in the current file, not an absolute path to a specific property and target, which is what you get when using the variable system. In other words, if I drive based on World Color, I want it to be the World of the current file, not the asset's home file. See this question.)
There are a lot of questions out there related to Drivers not updating. Most of those are from before the new Dependency Graph that came in 2.8, so they don't apply.
So I need a way to have it automatically update, or I need to figure out how to Update Dependencies on everything. This is also a question that comes up. The usual method is to re-assign the existing expression to the Driver. This solves many update issues, and it solves this one on objects local to the file. But it does NOT work on Linked Objects, so cannot fully address the problem. Those can still be updated with the Update Dependency button, but their expression field is greyed out and cannot be modified.
How can I get expression drivers to update?

Similar to this button function but for all drivers

import bpy

# not include shape-key driver because they are not in animation_data.drivers
def update_driver(obj):
    try:
        for fc in obj.animation_data.drivers:
            fc.driver.expression = fc.driver.expression
    except:
        pass

for obj in bpy.data.objects:
    update_driver(obj)

update once when active object changed
import bpy

# not include shape-key driver because they are not in animation_data.drivers
def update_driver(obj):
    try:
        for fc in obj.animation_data.drivers:
            fc.driver.expression = fc.driver.expression
    except:
        pass

def when_active_object_changed():
    print("when_active_object_changed")
    for obj in bpy.data.objects:
        update_driver(obj)

owner = "owner"

bpy.msgbus.subscribe_rna(
    key     = (bpy.types.LayerObjects, 'active'),
    owner   = owner,
    args    = (),
    notify  = when_active_object_changed,
)

Live update, performance issues if there are too many objects in the scene, maybe it has a better solution
import bpy

# not include shape-key driver because they are not in animation_data.drivers
def update_driver(obj):
    try:
        for fc in obj.animation_data.drivers:
            fc.driver.expression = fc.driver.expression
    except:
        pass

def when_depsgraph_update(dummy):
    print("when_depsgraph_update")
    for obj in bpy.data.objects:
        update_driver(obj)

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

This is working as an update, even on Linked Data! (In my case I had to change it from Objects to node_groups as that's where my drivers are). I would still like to find an answer to the update issue other than manually doing it with a script though. Perhaps there is some way to auto run this script on changes to certain property fields?

Consider using bpy.msgbus to subscribe to the property ["obj_prop"], when this property value changed, it will update the driver. but still need to run the script once.

@X Y Okay I have a basic msgbus setup that prints when the property changes, but I'm not quite sure how to use it. I take it I have it run the update script above instead of just print.

Yes, you should just have it run the script above. In this case it is probably best to pack this code into an addon so it is run every time blender starts. You can subscribe to new properties by copying and pasting their datapath into an operator field of your choice.


text:
How can I add control points to a NURBS surface
How can I add control points to the default 16 control points of a NURBS surface?

"Extrude Curve and Move" or "Subdivide"
You can add control points to a NURB surface object by running the command Extrude that you can find in the modeling section of the Tool bar in the Tool shelf and then move le vertex away with grab. Or you can do all at once with the operator of the title (shortcut E).
The operation is very similar to the one you can perform with meshes, but this is for surfaces only (UV coordinates only).

If you want to increase the resolution while keeping a similar shape of the grid, you can use the Subdivide operator (you can find it in the Toolshelf too). Subdivision cannot break the NURBS's laws, so you should select a whole U (or V, or both) stripe to make it work.

Remember that NURBS modeling tools in Blender are not currently (2.76) as advanced as the Mesh counterparts, so some functionalities you expect may be missing.


text:
Controlling lighting in Edit Mode
How do I control (increase) lighting in Edit Mode? Some parts of my object are really dark, making it hard to edit.

You can control the lighting of the mesh via the user preferences. However if some of the faces are dark and others not, it is a telltale sign of a certain flaw in your mesh: normals pointing inwards. You can fix it by selecting all (A), hitting space and looking for Recalculate Normals.
If you want to read up on normals, see Wikipedia: https://en.m.wikipedia.org/wiki/Normal_(geometry)

Was it normals facing inside?


text:
The main header has disappeared
The main header (Save File etc) has disappeared. How do I get it back?

Click the upper left icon and select Info

You can also load your file with the default interface. Here is how to do it:

Quit blender
Open it again to get the "startup file" and the default interface
Click "File -> Open..." and uncheck "load UI" before choosing your file

As a quick note to that, the start-up is it's own .blend file, therefore, can be saved with CTRL + U

All default windows in blender are all customizable, and as you may of noticed, changeable. It appears you have changed the window  on your top bar.
Click the small box, revealing a drop-down.

And in the drop-down, select Info.


text:
Can an edge be solidified?
An object consists of a single edge (two vertices). How can it be made visible when rendering? In other words, how can it be "solidified"?

It can be converted into a curve ( Object Mode > AltC > Curve from Mesh ) and then have its bevel and profile modified in various ways

Although, personally, I'd like to be able to cap its ends without having to assign a bevel object?

Two different options:
Skin Modifier
Used a lot in combination with the subdivision surface modifier to generate a base mesh to sculpt on. It also has an option to generate a rig to modify the 'pose' in a later stage.

Wireframe Modifier
The options in the modifier's panel are the closes to the Bevel modifier. This does the job, but personally I think you have less control over the generated volume.

Wireframe Modifier and Wireframe Node don't work in this case, they both need adjacent faces to work properly.


text:
Cannot find spacing button
I know there exists a spacing button in Blender (seen it on YouTube) but can't find it. It automatically spaces selected vertices an even distance from each other. Ideal for getting a more regular Grid Fill .

That person probably used the space tool from the LoopTools Addon.

To activate the LoopTools Addon, go to the User Preferences Window and find the Addon in the Addons tab (CtrlAltU > Addons > Mesh > LoopTools), then Check the little checkbox on the right.
After selecting a bunch of verts, use the Space Tool from the Tools Shelf > Tools tab > Looptools, or via the Specials Menu (W) > LoopTools > Space.

@TLousky How you display that fancy looking rainbow-like edge colors? Is it the matter of User Preferences settings or your scripting magic skills :) ?

@Gonzou LOL, the edges are simply green when not selected (User prefs > Themes > 3D view > Wire Edit > Hex color 42C291), instead of the usual (almost invisible) black. So when some verts are selected and some aren't, you get this nice gradient from green to orange.


text:
Cutting bevel in mesh surface
In the picture I've selected the edge loop I would like to see "cut out" like a bevel, so like a kind of groove in the cube's surface. The Bevel Modifier only seems to work on edges that are at the cube's actual edges. I tried assigning the loop edge to a vertex group, and then select "vertex group" in the bevel modifier, but to no avail. Please advise

Do 3 loop cuts (Ctrl+R) really close to eachother. Then select the one in the middle (Alt+Right Click) and scale it down (S).
Another option would be to separate the mesh by the selected loop. I don't remember if you can do that, but you can always select half the cube and make it a new object (P), then join it back again (Ctrl+J).
Excuse my poor answer but I don't have Blender on this computer to give you some pictures.

Definitely! I've also done something similar with the Subsurf Modifier, where the solution was to add a loop cut really close to another one.

Works! But is there also a way to do it using a Modifier? In that way the geometry doesn't get "destructed". You know, where the edge loops is marked as a "bevel edge" or something, and the cutting out is then done automatically (and reversibly) by the Modifier.

I don't really know, but if you go for my first option you would only be adding some extra vertices. The second option will disconnect your mesh in two pieces. Edit: No, sorry. It's just the way it works, it needs to have a difference in height to make a bevel.


text:
How to undo a window split?
I know how to split a window (dragging the window splitter widget in the top right or bottom left of a window), but how do I   undo it?

See http://blender.stackexchange.com/q/5631/599

There's no helpful Ctrl+Z for that, however, you can usually sort it out just by fiddling with the handles again a bit.

See this video tutorial by Neil Hirsig.

there is join option next to the split option in the menu.

Again, I didn't read the manual thoroughly. Drag the splitter widget to the adjoining window, till the latter changes color. Then release. The windows are merged.


text:
Tangent handles in NURBS curves
Is it possible to have at the end of a NURBS curve the same kind of handle (tangent line) as at the end point of a Bezier curve? Even with a control point set at the end of the curve, the control point lines in a NURBS aren't really tangent lines to the curve.


text:
Changing shape/size of green collision box
Under the physics tab, when selecting "box" as collision shape, a green box appears around the object, which is presumibly the "collision box". Can this box be reshaped/resized, so that it becomes e.g. a bit wider than the object itself?

Related: https://blender.stackexchange.com/q/107231/28015

You can not resize the collision box itself, but you will notice that if you scale your object your collision box will scale as well.
To customize the collision box:

Scale your object in Edit Mode to fit the collision box.
Note the scale factors on paper and take the inverse of those numbers by calculating 1/x.
Then scale your Object by those Factors.

Notice that this will work perfectly for cubes, but if you want spheres you have to keep them spheres. You can not turn spheres into ellipsoids.

You cannot move or rescale them. From the Blender manual (emphasis added):

Primitive Shapes
These are best in terms of memory/performance but do not necessarily
  reflect the actual shape of the object. They are calculated based on
  the object’s bounding box. The center of gravity is always in the
  middle for now. Primitive shapes can be shown in the viewport by
  enabling Bounds in the Object ‣ Display panel.

Use a mesh shape to get more precision:

Mesh-Based Shapes
These are calculated based on the geometry of the object so they are a
  better representation of the object. The center of gravity for these
  shapes is the object origin.

You could, however, use a parent object with a collider if you want more control.


text:
Don't have H.264 as a video output format option
I don't seem to have H.264 as a video output format option. I need it to be able to put out video in RGBA (so with an alpha channel). Tutorials on YouTube all have H.264 available, but not my Blender.
I have Blender version 2.79a

Avoid rendering to video with alpha channel. Better render to stills and apply any effects requiring alpha information first, then mix into video

It's for short videos of maximum 200 frames.

Choose FFmpeg Video and then it's available as codec. In 2.79 the Encoding panel has been improved, see the release notes for more information.

Unfortunately, the "RGBA" option does not appear when selecting H.264. Tried al sorts of combinations. "RGB" remains the only option. My aim is to export Video in RGBA. If that is possible without H.264, that's OK.

Combination of "MPEG4" en "QT rle / QT Animation" has the RGBA option!

Unfortunately Blender says "Could not render. Possibly unsupported codec combination".

In the end, "Flash" worked. It doesn't require a codec combination.


text:
What is this cursor?
I've had this cursor for some time now. What is it and how can I make it go away, and get the normal cursor with which I can select objects?

Read the tag description.

This cursor only moves if you left-click, doesn't it? I think it means that your actual cursor did not change into this one, it is more that your actual cursor is invisible for some reason...

You can't make it go away (as long as you use Blender for modelling or anything in viewport) and it was never meant to be used for selection

This question was not a joke. When you've been away from Blender for two years, this is the sort of question you end up asking. It's obviously not like riding a bike.

If the cursor shown in your picture is moving when you try to select something,
then try to select something with the other mouse button.
Normal:
Select with right, move 3D cursor with left.
Changed in UserPreferences:
Select with left, move 3D with right.

So I phrase, "the other mouse button".
The most easily available description of the cursor in your picture is the description of the tag you used. Read up on it. (And as cegaton said, "make it your friend" instead of fighting it.)

"The 3D Cursor is simply a point in 3D space which can be used for a number of purposes."
this is just a quote from here (read it):
https://docs.blender.org/manual/en/dev/editors/3dview/3d_cursor.html


text:
Problem with UV mapping/bake AO
I got an issue with a mesh I created.
I unwrapped it, baked it, and exported to a game in the proper format.
The thing is that is looks like the UV mapping got mix in some triangles (areas) of the mesh.

Bake AO          http://abload.de/img/hood_midulqwk.png

UV Mapping   http://abload.de/img/hood_uv_midd0pu5.png

You have 2 UVMaps, i think you need to remove one of them that does not use the baked texture

I will try it Denis. Thanks. I'll come back and post results.

No, problem continues. I now have the mesh with only 1 Uv channel

Can you add the blend file?

I tried importing the file I export from blender, instead of continue working on the .blend file. And I found that the 1 UV channel was not exported properly.            http://abload.de/img/hood_blender2l3rch.png

I fixed it. I was using UV smart Project to Uv mapping, the game possibly can't handle it. Tried using UV Wrap instead, and worked fine. Thanks Denis for the help I think this is pretty much closed.

you could post your findings as an answer and mark it as correct if you want to.


text:
How to show more digits in blender when working at a small scale
How can I get more digits in the user interface for modeling.
Of course we can scale up the scene always, but that is just annoying, I like to work in millimeters for example which is possible with the Metric settings in blender, but the UI only shows floating point up to 3 digits?
Is there any way of improving this? Especially the scale in the transform property tab only shows 3 digits, that's annoying :-)

when you define the properties, you set the  precision for the display so i think this will be hard to achieve

For 2.8+ you simply need to change the Units to Millimeter (leave the scale at 1). I find that updating the unit scale plays havoc with other objects, like camera and lighting.

Optionally update the Viewport Overlay Floor scale to .001 (as to achieve incremental grid lines that apply to a smaller scale object)


text:
How to align a camera to another camera view?
I have an animated camera A with tracking modifiers to track an object.
I would like to generate an static camera at frame 200 from the exact look of camera A.
How do I do this? This seems tricky but should not be?
thanks :-)

Go to frame where your camera A looks where you want static camera to look to. Duplicate camera A. Remove modifiers. Done.

I tried that, Removing the modifiers (tracking) actually changes slightly the view again, dont know why?

Generally this is the right answer! But If it's not working, maybe just manually copying the contents of the Transform tab of the camera object into the duplicate will work for you?


text:
delete properties in messed up file
I am trying to delete properties which some plugin messed up.
I wanted to delete a property PN781673099840471551 with
del bpy.data.scenes["Scene"].PN781673099840471551

but that does not work, (type : bpy_struct)
are these strange properties blender related, they got somehow generated from loading and unloading a plugin. And I am stuck with some values inside my blender file which crash the plugin when loading. Is there anykind of tool to remove unwanted properties?
(What I did: I added somewhere in an plugin (RIB Mosaic) related panel an illegal value, and saved the blend file, and now the value is somehow stuck inside my blend file, so when trying to use the plugin again the plugin raises an exception...)

can't you do del bpy.types.Scene.PN781673099840471551 ?

what is the value of bpy.data.scenes["Scene"].PN781673099840471551

it worked with del bpy.types.Scene.PN781673099840471551

what are such values? does blender generate these names automatically under certain circumstances?

I've never seen them before, but addons can store working data in all kinds of ways. (adding explanation to answer below)

You can delete that property, the error you get is probably (here recreated):
>>> bpy.types.Scene.ragamuffin = bpy.props.IntProperty(default=1)

>>> bpy.types.Scene.ragamuffin
(<built-in function IntProperty>, {'default': 1, 'attr': 'ragamuffin'})

>>> bpy.data.scenes['Scene'].ragamuffin
1

>>> del bpy.data.scenes['Scene'].ragamuffin
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: bpy_struct: del not supported

But there's no guarantee that will make the scene work again..
removal anyway:
>>> del bpy.types.Scene.ragamuffin    # success!
>>> bpy.types.Scene.ragamuffin
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: type object 'Scene' has no attribute 'ragamuffin'

I can't for certain say what produced those properties, but it's worth having a look at the source of the plugin. For instance here RIBMosaic implements some unusual (not bad...just not standard bpy style) property registration techniques using exec. meaning you can't easily tell in advance exactly what the properties will be called.

Thanks a lot!
I am actually improving RIBMoasaic.
I found the error: So far the standard hash() function was used to generate some properties for loaded shaders and so on. Becaus hash() is not consistent it turned out to get a real mess in my blender file. This bug and the deletion of all the properties via dir(...) and a regex search for "ribmosaic_*"  are now solved :-)


text:
Add more fractals without subdivide again
I create a plane, subdivided it. And added fractals using subdivision panel.(w key)

Then I close the subdivide panel.

After some modification, I tried to modify the fractal intensity.

So I have to open subdivide panel again.
But, when I open the panel, subdividing is applied again automatically.

Is there any way to add or modify fractals without additional subdivision.

No, you cannot change the parameters of an operation after you have modified the mesh with other operations.
What you can do is reopen the dialog of only the previous operator with F6 if you've accdently closed it, but this is not quite what you are looking for.
(An operator is basically every command where you move or change something about a mesh, an object, a material, you name it)
What you want, if I understand you correctly, is to open the operator history with F3 and change the past and have everything that happened after the fractal subdivide to be reapplied on top of your change of the past. This is basically the same as if every operator was a modifier. Modifiers work that way, but operators don't. Once an operator is applied you can't change their old parameters (well, Blender keeps the parameters editable for the last operator).
Maya does almost what you want: It keeps the full operator history of a mesh and you can actually change it afterwards and all the subsequent operators are reapplied. BUT it doesn't work in complicated cases and can lead to crashes :)
Also it's common practice in Maya to regularly collapse (=delete) the operator history, otherwise Maya gets pretty slow.


text:
Importing normal maps from obj/mtl
I need to import a mesh with more than 100 normal maps and diffuse textures.
The mesh is in Obj/mtl format, and Blender loads  the mesh and the textures. However, it doesn't set the normal map as normal map: I need to check Texture/Image Sampling/Normal Map to get it working.
However, doing this to more than 100 textures is too bad.
How can I do this automatically?

related: http://blender.stackexchange.com/questions/24020/importing-obj-with-mtl-and-image-not-working-properly/24024#24024

This is obviously an old post that perhaps no one answered. However for the sake of information I will attempt to answer.
Firstly have you atlased the normal map and diffuse map?
This consists of using something like Unwrapper Pro to open the model and move each component part into an individual location to produce one set of UV's for the entire model. Then print out the UV's as a template and cut and paste the relevant parts of the various diffuse and normal maps to all fit onto one image. That is one image for the Diffuse Map and one for the Normal map.
Obj files can have both mesh groups and material groups. So while your model retains all the mesh groups you can select the entire set of UVs and assign it to one material group. So instead of having 100 material groups you have one and this should allow you to only have to set the normal map once.
This is the reverse of what most modelers do where they usually set up only one model group but have many material groups. This is also helpful if you have an animated model as mesh groups are usually where bones are added or weighted.
cheers