text:
How to show different images based on Object ID
I got an image sequence for the poker faces (totally 54 images). And I want to find an effective way to place them on 54 objects. According to my knowledge, I just tried to use tricks like the Oject Info node, with concept like this:

It would also be great to be able to animate multiple frames per object - for example, something similar to this, with each cube showingn a short video clip :

Theres 52 cards in a deck

Oh come on guys, that's not the point, right? lol

Does using an object info/random into color ramp with constant interpolation as mix factor between two or more of these sequences do the trick by chance? I do something similar for random materials,  not at my computer to show an example at the moment however.

@Timaroberts thanks but the problem is that it's not a "two or more" thing, it's a sequence of the whiole poker cards.... Yeah I'm sure I can put 54 Image Texture nodes there for mixing, but... you know.

I thin I do not get the questin. It sounds like the usual: have one big picutre for UV mapping. Map each object with suitable coordinates to only a part of the picture. What keeps you from doing it like that?

Can that be a single image instead of a sequence?

Actually what I'm trying to learn here can have other usages, like this, or this, which can be simply textured by using a single clip with random offsets. And obviously, a giant UV texture won't work easily.

An idea could be to use a driver. But as it is to be set in the image_user/offset (in the outliner), for now I don't know how to bind a card object property to the driven value... but if the idea can help you...

It is possible with tile mapping. It is similar to what i did here: https://curiousblends.blogspot.bg/2018/02/all-in-one-blender-matcaps-material.html  But too long to explain here.

@lemon you can add a driver to the frame offset value of an image/movie node. Then set duration to 1. Assuming you have individual card images as a sequence then the Object Index node should be enough

@RumenBelev Interesting, that should be a good way when I have to use a huge altas texture for them. Will learn from it, thx.

@3pointedit, it seems it does not work when the driver is directly added to the node in the node editor (no update occurs), but it works adding the driver from the outliner. But from that, I was no able to get the corresponding pass index because I don't know how to reach an "upper element" through the data from the "offset" field put in the driver.

@lemon Yeah I only have success driving from the 3D scene, e.g. from object locations etc.

Solution 1. I think it is a good idea for UDIM tiles map.
https://blender.stackexchange.com/questions/264619/one-frame-of-image-sequence-per-geo-node-instance Solution 2. You can tile the video clips into one video clip firstly, and then use uv-offset to select different part.

Here's a solution using OSL to read from multiple images based on the Object Index.
Enable OSL and paste the following into a new Text Editor datablock named something like dynamic_texture.osl :
shader dynamic_texture(
    vector Vector = P,
    string FileName = "",
    float Index = 0,
    string Suffix = ".png",
    output color Color = color(1,1,0)
    ) {
    int _index = (int)Index;

    Color = texture(format("%s%i%s",FileName,_index,Suffix), Vector[0], Vector[1]);

}

In the Node Editor you can now add a Script node and point it at the new Text block. This should create you a new node with inputs for Filename, Suffix, and Index. This can be used to feed the Object Info Object Index to dynamically select the required texture from a set of images :

Note that the filename is absolute in your filesystem - so you need to specify the full path - or prefix with //to specify a relative path in relation to your saved .blend file (eg, //rendered/ for a local subdirectory named ‘rendered’). In my example I placed the files in c:\users\rsedman\Pictures and named them 1.png, 2.png, 3.png, etc. The Suffix indicates the filename suffix - in this case .png.

EDIT : In order to allow for multiple 'frames' per image set you could amend the OSL shader code to the following :
shader dynamic_texture(
    vector Vector = P,
    string FileName = "",
    float Index = 0,
    float Subframe = 0,
    string Suffix = ".png",
    output color Color = color(1,1,0)
    ) {
    int _index = (int)Index;
    int _subframe = (int)Subframe;

    Color = texture(format("%s%i_%04i%s",FileName,_index,_subframe,Suffix), Vector[0], Vector[1]);
}

This will add an additional 'Subframe' input to the socket and the filename will now be built using the subframe as an additional suffix (with up to 4 leading zeros).

For example, setting the Filename parameter to '/tmp/images/', the Index to 3, the Subframe to 26, and the Suffix to '.png' will pick up the image from /tmp/images/3_0026.png. In this way you can use the node to pick out a particular frame of your particular set of images. To drive this from an MP4 video you would need to split out the individual frames and name each file appropriately.
This can produce the following result :

NOTE : I don't know exactly how OSL manages memory and file access when accessing multiple images in this way - there may be a noticeable practical limit of how many images can be accessed by an OSL shader. If nothing more, it will certainly require a significant amount of additional memory to cache a large number of images.

Brilliant idea, Rich! It works like magic. Just... As I commented above, I really wonder how could I use the sequence as "video clip" texture for things like a wall with tens of TVs? You know, it needs to be animated. Besides, can I use something llike a mp4 file directly as sequence in this way?

@LeonCheung The OSL ‘texture’ function does accept an optional subimage argument - that may be able to select the sub-frame of an mp4 but would presumably work with other formats if not - so if you could convert your videos into a suitable format you could tailor this to pick a specific image based on an additional input to the OSL shader node. The alternative might be to split your videos into individual frames, each stored in a uniquely named file, and pick them out based on, say objID *1000+subframe or suchlike.

I see. And one last question, how can I add frame as var to index, so that I can animate the texture? Should it be like int _index = (int)Index + frame_current? I don't know if osl support it.

Currently I'm inspired by things like this, but supposing you got better idea on animating it. :)

I've updated my answer with a change that should allow you to access multiple frames per ID - these must be split into actual separate files and given appropriate names (eg, 1_0001.png, 1_0002.png, 1_0003.png, etc., 2_0001.png, 2_0002.png, 2_0003.png, etc.).


text:
Dynamic EnumProperty values changing unexpectedly
I'm trying to create a collection of items, that have dynamic EnumProperty (scene objects of given type):
import bpy

def enum_items(self, context):
    items = []
    for obj in context.scene.objects:
        if obj.type == 'MESH':
            items.append( (obj.name, obj.name, "") )
    return items

class SomePropertyGroupEntry(bpy.types.PropertyGroup):
    mesh_obj = bpy.props.EnumProperty(items=enum_items)
    val = bpy.props.IntProperty()

class SomePropertyGroup(bpy.types.PropertyGroup):
    collection = bpy.props.CollectionProperty(type=SomePropertyGroupEntry)
    index = bpy.props.IntProperty()

class SCENE_UL_list(bpy.types.UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.prop(item, "name", text="")
            layout.prop(item, "mesh_obj", text="")
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

class SCENE_OT_list_populate(bpy.types.Operator):
    bl_idname = "scene.list_populate"
    bl_label = "Populate list"

    def execute(self, context):
        context.scene.prop_group.collection.clear()
        for i in range(3):
            item = context.scene.prop_group.collection.add()
            item.name = "item"+str(i)
        return {'FINISHED'}

class SCENE_PT_list(bpy.types.Panel):
    bl_label = "UIList Panel"
    bl_idname = "SCENE_PT_list"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        self.layout.operator("scene.list_populate")
        self.layout.template_list("SCENE_UL_list", "", context.scene.prop_group, "collection", context.scene.prop_group, "index")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.prop_group = bpy.props.PointerProperty(type=SomePropertyGroup)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.prop_group

if __name__ == "__main__":
    register()

It works as expected (properties are set and saved properly)...

...unless I add or delete a mesh object - EnumProperty values in collection items are shifted:

I'm guessing there is a problem with mesh object's enumeration... byt why? All objects have unique names, so items properties should be consistent despite the enumeration and mesh objects count in the scene... what am I missing here?

The EnumProperty properties represent underlying integer values - 1, 2, 3, etc. - and the 'enum_items' function provides the conversion between the numbers and the textual description (in this case the names of the objects in the scene).
The problem is that the list returned by the 'enum_items' function is changing when meshes are added or removed from the scene so that the values held in the EnumProperty properties no longer corresponds with the same object. This means that as the sequence of objects changes, the corresponding enumeration value also changes, resulting in the values being reassigned.
The 'enum_items' list is currently being built directly from the context.scene.objects list and each item is appended to the list. When objects are added to the scene they are added to the start of the list of objects - hence they are appearing at the start of the list and this is shuffling the objects along the list - so what was in position 1 is now in position 2, what was in position 2 is now in position 3, and so on. A simple dirty fix to this would be to change the order of the list - by inserting each one at the beginning rather than appending them at the end. ie,
Change :
items.append( (obj.name, obj.name, "") )

to :
items.insert(0, (obj.name, obj.name, "") )

You should now find that adding new objects to the scene no longer upset the existing EnumProperties. However, deleting objects still presents a problem - unless it's always the 'newest' object that is deleted, although even then you have the problem that the EnumProperty still points to the same (empty) slot of the list (so if a new object is added again then it will be immediately populated into the same slot - rather than the slot being initially blank!).
To address this you can assign a unique identifier when adding items to the list (in which case it no longer matters on the order in the list since the uniqueid is used to maintain consistency regardless of the sequence) :
items.append( (obj.name, obj.name, "", <uniqueid>) )

This can be achieved as follows :
import bpy

# NEW CODE - Create a list to assign unique identifier to each mesh name
enum_items_store = []

def enum_items(self, context):

    items = []
    for obj in context.scene.objects:
        if obj.type == 'MESH':

            # NEW CODE
            # Scan the list of IDs to see if we already have one for this mesh
            maxid = -1
            id = -1
            found = False
            for idrec in enum_items_store:
                id = idrec[0]
                if id > maxid:
                    maxid = id
                if idrec[1] == obj.name:
                    found = True
                    break

            if not found:
                enum_items_store.append((maxid+1, obj.name))

            # AMENDED CODE - include the ID
            items.append( (obj.name, obj.name, "", id) )

    return items

class SomePropertyGroupEntry(bpy.types.PropertyGroup):
    mesh_obj = bpy.props.EnumProperty(items=enum_items)
    val = bpy.props.IntProperty()

class SomePropertyGroup(bpy.types.PropertyGroup):
    collection = bpy.props.CollectionProperty(type=SomePropertyGroupEntry)
    index = bpy.props.IntProperty()

class SCENE_UL_list(bpy.types.UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.prop(item, "name", text="")
            layout.prop(item, "mesh_obj", text="")
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

class SCENE_OT_list_populate(bpy.types.Operator):
    bl_idname = "scene.list_populate"
    bl_label = "Populate list"

    def execute(self, context):
        context.scene.prop_group.collection.clear()
        for i in range(3):
            item = context.scene.prop_group.collection.add()
            item.name = "item"+str(i)
        return {'FINISHED'}

class SCENE_PT_list(bpy.types.Panel):
    bl_label = "UIList Panel"
    bl_idname = "SCENE_PT_list"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        self.layout.operator("scene.list_populate")
        self.layout.template_list("SCENE_UL_list", "", context.scene.prop_group, "collection", context.scene.prop_group, "index")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.prop_group = bpy.props.PointerProperty(type=SomePropertyGroup)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.prop_group

if __name__ == "__main__":
    register()

Note that mesh names are never removed from the list of IDs. This means that the unique identifier will only be re-used if a mesh is re-created or renamed to the same name as a previous mesh.

I'll accept it since it solves the problem. Would you say enumerating will be consistent when saving/reopening file on different computers? I've been thinking about using some sort of unique id produced from hashed obj name (hashlib), however that produces way too large ints and chopping them wouldn't guarantee unique id, also been thinking about looking for some unique property of an object, but I don't think there is any I could use. So I'm guessing the safest bet would be to create a CollectionProperty in the scene and strore id's there (and check against it on new object)?

Thanks. I can't really comment on whether it will be consistent as I'm not really experienced in UI mods so must admit that I don't really know. However, the code doesn't currently store its state and would need to re-build the panel when Blender re-loads so I guess one solution would be to store the object name rather than enumeration id - and just re-generate new ids as required.

source: Stack Exchange

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

sort: votes


text:
Fade to black during animation
How can I 'fade out' (or in) my animation? For example, at the end of a scene I want it to fade out to black to indicate time passing and then fade back in from black for the next scene.

Just a quick reminder, StackExchange is a Q&A website, not a forum. You can answer your own questions, but you should still post a question and then submit your answer.

@Robert. I've edited your question to reformat as a Question and Answer format more suitable to this site. Feel free to edit it and/or post your own answer and you'll gain your own reputation from any 'upvotes' (the answer I've posted is 'Community Wiki' so I don't gain anything from any upvotes). You can also mark your own answer as 'Accepted' after a couple of days grace period. Thanks for your contribution to this site by sharing your knowledge.

(from @Robert's original question)
I found an elegant way to fade to black.
go to compositing, enable nodes.
add an 'rgb' node and an 'alpha over' node.
plug the render layers node into the TOP image input
plug the rgb into the BOTTOM image input
animate the factor in the Alpha over.
you wont be able to see it without a 'viewer' node, but it renders nice.
and uh.. set the rgb to black, or whatever colour you want to fade from
or use an image
or a movieclip
world is your oyster

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


text:
Why is my animation appearing jittery
I made an animation using the cycles renderer but the end animation is jittery, and I don't know why. I've attached the final video file link here. I'm using the latest 2.92 version of blenderenter link description here

Please clarify what you mean by ‘jittery’. Watching on phone screen I can see some jumping in the shadows under the table due to denoiser. Is that what you’re referring to?

No two frames produce the same picture every one of the frames has a slightly varied image that makes it look like every picture was taken a different lighting condition

I've just reviewed it on a larger screen and the only thing I can see is denoiser "noise". Try disabling the denoiser and see if that makes for less jitter. You may need to increase the number of samples to improve the image quality to reduce the variation.

How many samples would you recommend? This one is at 75.

75 samples is a very low number of samples for such a complicated scene. The render engine will really struggle to deal with the shadowy areas effectively, leaving a lot of boise - which is why those parts are showing the problem. It would be OK for still images but animated brings out the discrepancies. Samples are a matter of diminishing returns - more will almost always be better but the higher you get the less improvement you’ll see. Try with double and see how that improves matters.

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


text:
Black reflections in cloudy glossy acrylic floor material
Okay so I'm building out my scene and before I know it there's these strange reflections in my floor.
So the way my scene is setup is I have three walls, all of them are the same semi-transparent material and I have light panels shooting through them.
The floor is a cloudy, glossy acrylic-like material and I also have a light shooting from below. Let me know if you have questions. I have my floor settings with the Principled shader below.

Blend file here...

You could try tweaking the normals a touch on the floor, as in the answer to this question: https://blender.stackexchange.com/questions/24852/black-reflections-with-cycles-glossy-material?rq=1.  Or, maybe try subdividing the floor?  Or increase the number of Glossy bounces in the Light Paths rendering settings?

I put the blend file in the post, I can't figure out what's wrong :s

The problem is due to your wall material - specifically that you are using Subsurface Scattering on a mesh that is non-manifold.
The Subsurface shader (and the Subsurface element of the Principled shader) simulate subsurface scattering based on the surrounding geometry of that mesh - ie, to determine the thickness of the volume enclosed by that mesh and how the light that hits the surrounding surfaces would propagate through that volume before scattering out of the surface again. For this to work properly requires manifold meshes - otherwise you will get unpredictable results.
In your case you have a single-surface plane for the floor and similar for the wall (albeit with ridges for the beams and edges) - ie, these are non-manifold (meaning that they do not fully enclose a single volume in space).
To resolve this you have two options; either change the wall and floor meshes to be manifold panels, or switch to use a Translucent shader in place of Subsurface (which produces a very similar effect).
I amended your example to replace the Principled shader for the walls with a simple Translucent shader and updated the floor with a material made up of a mix between Translucent and Glossy (ideally you'd also include Fresnel for the glossiness but this is grossly simplified) :

This produces the following result (obviously I'm missing your logo - hence the pink) :

Blend file included
Note : To track down issues like this in the future it's best to start from a copy of your file and remove elements bit by bit until you have a very simplified file that contains just those parts that are causing the problem. For example, remove all the lamps, remove the side walls, remove all but one of the 'light panels', remove each material in turn - checking at each stage whether the problem still exists. Once you've tracked it back to a particular material you can substitute each element with a simpler one until you know the exact setting that is causing the problem (in this case the Subsurface setting of the Principled shader). After that it's a matter of determining under what circumstances the issue causes a problem and, hopefully, this should point to a cause.


text:
How do I iterate over keyframes in python?
I'm trying to export animation data, but my bones never get updated from keyframe to keyframe. This is how I iterate over my actions and keyframes:
for action in bpy.data.actions:
    armature.animation_data.action = action
    bpy.ops.screen.frame_jump(0)
    bpy.context.scene.update()
    while {'FINISHED'} == bpy.ops.screen.keyframe_jump():
        bpy.context.scene.update()
        for boneName in bones_index:
            bone = armature.pose.bones[boneName]
            mat = glob_mat * mathutils.Matrix(bone.matrix)

The 'mat' variable is the bone matrix for each bone. Per frame, the 'mat' variable doesn't seem to change. For example, if I only look at the bone "Leg", the leg pose matrix doesn't seem to change keyframe to keyframe. The matrix is the correct matrix for frame 0, and it is different from my base pose. Am I not getting the pose matrices correctly? Or am I not correctly changing the scene? In the blender console, bpy.ops.screen.keyframe_jump() does exactly what I want, so I don't think that's the issue.

Well, you are in luck I think.  CodemanX just answered this for someone else a few days ago and the code is very easy to work with.
http://blender.stackexchange.com/questions/8387/how-to-get-keyframe-data-from-python

@MarcClintDion If a question seems to be asking the same thing as a previous question, feel free to cast a "close as duplicate" vote.

@gandalf3 it's not exactly the same (but very close). That in that thread, their solution was going from the start frame to the end frame (iterating over every single frame). What I want is to iterate over key frames. That's why bpy.ops.screen.keyframe_jump() is used. It jumps to the next key frame. That seems to work, and the code I have works perfectly in the interactive console. However, when I put it in a text file and run it from there, the pose bones are stuck in the pose of the first frame. I even call bpy.context.scene.update(), but that didn't seem to help

On some further investigation, and looking at other threads, I solved my issue by using the following method to update the scene.
bpy.context.scene.frame_set(bpy.context.scene.frame_current)

So now I'm thinking there is a bug in how bpy.ops.screen.keyframe_jump() is implemented. The line I added should theoretically do nothing (ie. setting the current frame to the current frame should be a no op). The strange thing is that my original implementation worked in the interactive console, but not when I put it in a text/export file and run it from there.

you're a life saver

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


text:
Import a .mhx file and export it to .bvh problem
I imported a .mhx file. After that, I export it to .bvh without changing it. I remark that when I import the .bvh file, I did not get the same .mhx file? I found a closer question to this problem question but i did not understand how can resolve this problem. Are there any configuration before exporting to .bvh or before importing it? Any suggestion?

When you export from Makehuman try to change axes to Z up and Y forward.

@Denis, when I export from Makehuman as .mhx there is no option to change axes. I can change axes just if I import as *.dae

@Denis I think the problem is come from blender because when I import .mhx I did not get any problem. The problem is presented just when I export to .bvh

I think the simple answer to this is just to save your work as a blender file, i.e. .blend.
I could not find a better way of getting around importing a .mhx file, and then .bvh file and saving my work, so I can reload it later?
As was explained here BVH Export/Import, Armature different when re-imported , blender files encode more information than bvh files so it make sense to save in blender format.


text:
How to configure 4 point lights to generate different shadows
I am using the cycles render and I have a 4 point lights attached at the same height of a cube scene. I have an object at the center of the scene and I need to configure the lights such that they generate different shadows (gradually darker). Any help?

Result:
Here, we can see the shadows but they are not very sharp because there are a lot of luminosity as in a real case, but is there any possibility to use different intensities to generate different dark shadows?

I'm having a hard time understanding what you are going for. Do you think you could make some kind of illustration, or at least show us the scene?

@GiantCowFilms, I edit my question. I think that we can do it by generating different intensity for each light. So, the light having higher intensity will generate darker shadow.

Try it then? Show us your result...... what is wrong with the result?


text:
How to discretize a 3D mesh to generate a 3D binary matrix
I apply the algorithm proposed by TLousky discretize a mesh to discretize the entire mesh. I get this result
import numpy as np
import bpy, bmesh
from mathutils import Vector
print('Start')
def check_raycast(ray_origin, ray_destination, obj):
    ''' This function casts a virtual ray from "ray_origin" to
        "ray_destination", and finds any intersections along
        the ray's path with the mesh object referenced in the "obj" param.
        If there are any intersections, it will return True, else False.
    '''
    mat = obj.matrix_local.inverted()
    f   = obj.ray_cast(mat * ray_origin, mat * ray_destination)
    loc, normal, face_idx = f

    if face_idx == -1:
        return 0

    return 1
matrix=np.zeros((76,76,88));
#the size of the cube (voxel) is 2*2*2 cm
i=-1
for x in np.arange(-.75,.75,.02):
    i=i+1
    j=-1
    for y in np.arange(-.75,.75,.02):
        j=j+1;
        k=-1
        for z in np.arange (0,1.75,.02):
            k=k+1
            c = bpy.data.objects['Cube']
            o = bpy.data.objects['modelPerson:Body']
            bpy.context.object.location[0]=x
            bpy.context.object.location[1]=y
            bpy.context.object.location[2]=z

            # Generate bmesh object from cube mesh data
            bm = bmesh.new()
            bm.from_mesh( c.data )
            bm.edges.ensure_lookup_table() # Generates edge   index table
            bm.verts.ensure_lookup_table() # Generates vertex index table
            intersectsMesh = 0
            for e in bm.edges:
                # Find the global coordinates of each edge's two vertices
                coos = [ c.matrix_world * v.co for v in e.verts ]
                # Set these verts as ray casting origin and destination
                ray_origin, ray_destination = coos
                if check_raycast(ray_origin, ray_destination, o):
                    intersectsMesh = 1
                    break
            insideMesh = check_raycast( c.location, Vector( (0,0,1000) ),  o )
            print( "Intersects: ", intersectsMesh )
            print( "Inside Mesh: ", insideMesh )
            matrix[i][j][k]=   insideMesh|intersectsMesh
            print("value",  matrix[i][j][k])
print("max value of matrix before reshape ", np.max(matrix))
matrix2=matrix.reshape(1,16*18*16);
print("max value of matrix ", np.amax(matrix2))
'''I reshape the matrix for using savetxt() after I can reshape the matrix using Mathematica'''
np.savetxt('3DMatrix.csv', matrix.reshape(1,76*76*88),delimiter=',')
print('finish')

here is my code

Can you be more specific as to what you don't understand?

You're getting this because of the matrix[i][j][k]=   insideMesh|intersectsMesh line.
The "insideMesh" test is currently not accurate enough: If the cube intersects with the mesh at a certain Z height, the "insideMesh" test will also be true for all the Z (k) values below that height in that matrix column (that have the same X and Y values), since the test is based on a ray cast straight up towards (0,0,1000).
You can fix this either by replaceing the or | with and & (which might require smaller cubes but nor necessarily), or by making the "insideMesh" test more robust by checking for intersections with all 6 possible directions:
directions = [
    (0,0,1000),
    (0,0,-1000),
    (0,1000,0),
    (0,-1000,0),
    (1000,0,0),
    (-1000,0,0),
]

insideMesh = len( [ i for i in range(6) if check_raycast( c.location, directions[i], o ) ] ) == 6


text:
Parenting Armatures Causes Animation to Break
I have made an animated conveyor belt. Now, I want to parent all the objects to a single empty, allowing me to translate and rotate the object and armature together.
If I do not rotate or translate the new empty, then everything works fine.
However, if the parent empty rotates, the pieces of the track warp out of shape.
I am still trying to understand why this is happening. Can anyone please illuminate what I have done wrong?
Before Rotation

After Rotation

Project File

delete your empty
add a new empty

select all conveyor_roller* (3 objects) and the path curve (shift-select)
at last shift-select the empty
press ctrl-p -> object

result:


text:
Render Surface Normals in Camera Space
I have some automated code below that I have written to set up render nodes for full output, depth, object index (segmentation) and surface normal maps.
I notice the output of the normal map is in World Space. Is there a trivial way of changing the render node of the normal map to camera space?
def PrepareRender(context, resolution, output_dir):
    scene = context.scene

    scene.render.engine = 'CYCLES'
    scene.render.filepath = output_dir

     #Output open exr .exr files
     context.scene.render.image_settings.file_format = 'OPEN_EXR'
     context.scene.render.image_settings.use_zbuffer = True
     context.scene.render.image_settings.color_depth = '16'
     context.scene.render.image_settings.use_preview = False
     context.scene.render.image_settings.exr_codec = 'ZIP'
     scene.cycles.samples = 1

    # Configure renderer to record object index
    scene.view_layers["ViewLayer"].use_pass_object_index = True
    scene.view_layers["ViewLayer"].use_pass_z = True
    scene.view_layers["ViewLayer"].use_pass_normal = True

    # Switch on nodes and get reference
    scene.use_nodes = True
    tree = scene.node_tree
    links = tree.links

    ## Clear default nodes
    for node in tree.nodes:
        tree.nodes.remove(node)

    # Create a node for outputting the rendered image
    image_output_node = tree.nodes.new(type="CompositorNodeOutputFile")
    image_output_node.label = "Image_Output"
    image_output_node.base_path =  os.path.join(output_dir, "image")
    image_output_node.location = 400,0

    # Create a node for outputting the depth of each pixel from the camera
    depth_output_node = tree.nodes.new(type="CompositorNodeOutputFile")
    depth_output_node.label = "Depth_Output"
    depth_output_node.base_path =  os.path.join(output_dir, "depth")
    depth_output_node.location = 400,-100

    # Create a node for outputting the index of each object
    index_output_node = tree.nodes.new(type="CompositorNodeOutputFile")
    index_output_node.label = "Index_Output"
    index_output_node.base_path = os.path.join(output_dir, "mask")
    index_output_node.location = 400,-200

    # Create a node for outputting the surface normals of each pixel
    normal_output_node = tree.nodes.new(type="CompositorNodeOutputFile")
    normal_output_node.label = "Normal_Output"
    normal_output_node.base_path = os.path.join(output_dir, "normal")
    normal_output_node.location = 400, -300

    # Create a node for the output from the renderer
    render_layers_node = tree.nodes.new(type="CompositorNodeRLayers")
    render_layers_node.location = 0,0

    # Link all the nodes together
    links.new(render_layers_node.outputs['Image'], image_output_node.inputs['Image'])
    links.new(render_layers_node.outputs['Depth'], depth_output_node.inputs['Image'])
    links.new(render_layers_node.outputs['IndexOB'], index_output_node.inputs['Image'])
    links.new(render_layers_node.outputs['Normal'], normal_output_node.inputs['Image'])

    camera = scene.camera
    scene.render.resolution_x = resolution
    scene.render.resolution_y = resolution

    return image_output_node, depth_output_node, index_output_node, normal_output_node

Output of render for each node, left to right (image, index, depth, normal)

There are two things you need to convert from world space normals to tangent space normals. First you will need the forward vector of your rendering camera and then you have to normalize the generated Normals output.
What you are looking for is a setup like this. Please note that this setup assumes that your rendering camera is looking down the Z axis. If your camera should change location or look down another axis, you need to adjust SeparateXYZ and CombineXYZ setup. Also, you may want to flip the X or Y channel depending on your target application.

To generate this setup via code, you have to do this:
    # Create a node for outputting the surface normals of each pixel
    normal_output_node = tree.nodes.new(type="CompositorNodeOutputFile")
    normal_output_node.label = "Normal_Output"
    normal_output_node.base_path = os.path.join(output_dir, "normal")
    normal_output_node.location = 1200, -300

    loc_x = 400
    loc_y = -300
    sep_xyz_node = tree.nodes.new("CompositorNodeSeparateXYZ")
    sep_xyz_node.location = (loc_x, loc_y)

    loc_x += 200
    normalize_x_node = tree.nodes.new("CompositorNodeNormalize")
    normalize_x_node.location = (loc_x, loc_y + 40)

    normalize_y_node = tree.nodes.new("CompositorNodeNormalize")
    normalize_y_node.location = (loc_x, loc_y - 40)

    loc_x += 200
    combine_xyz_node = tree.nodes.new("CompositorNodeCombineXYZ")
    combine_xyz_node.inputs[2].default_value = 1.0
    combine_xyz_node.location = (loc_x, loc_y)

    loc_x += 200
    set_alpha_node = tree.nodes.new("CompositorNodeSetAlpha")
    set_alpha_node.location = (loc_x, loc_y)

The linking code would look like this:
    links.new(render_layers_node.outputs['Normal'], sep_xyz_node.inputs[0])
    links.new(sep_xyz_node.outputs[0], normalize_x_node.inputs[0])
    links.new(sep_xyz_node.outputs[1], normalize_y_node.inputs[0])
    links.new(normalize_x_node.outputs[0], combine_xyz_node.inputs[0])
    links.new(normalize_y_node.outputs[0], combine_xyz_node.inputs[1])
    links.new(combine_xyz_node.outputs[0], set_alpha_node.inputs[0])
    links.new(render_layers_node.outputs['Alpha'], set_alpha_node.inputs[1])
    links.new(set_alpha_node.outputs[0], normal_output_node.inputs[0])

Thank you for your answer. I really do need to have the vector from any angle. Can a Vector Transform to camera space? If so, what is the Python code for it?

I'm certain that this is possible using python but I'm afraid that is beyond my skillset, sorry. I'm no export at vector math and matrix transformations. I can build a material that does what you want but you would need to change to this material before rendering.


text:
How to make Control bone affect only wanted Bones
Rotating CTRL_Tweak_Chest.002 ,selected on picture, on Y axis affect both front legs and neck all the way to the head. How to make it rotate only front legs, without affecting neck, head rotation.
Rig here:

It depends on how is the rig built, you can upload it https://blend-exchange.com/ (it's ok to upload the rig only). You can try to select the TGT_Neck.001 bone, and uncheck its "Inherit rotation" option in the bones properties > relations panel (pose and edit mode), but it's not sure it will work (it depends by the architecture of the rig).

Tried but doesn't work. Added the .blend file, so if you can see - thanks!

Changing the "Inherit rot" parameter doesn't work because TGT_Neck.001 bone is part of an IK Chain, so its rot is overwritten by the IK solver.
To have the rig behave as you want you can add a machinary bone, extruded from CTRL_TWEAK_Chest.002, with the same axis orientations, uncheck its "Inherit rot" and its "Deform" options.
Then in edit mode you have to set 3 bones child (keep offset) of this newly created bone (I called it MCH_Head_Base): TGT_Neck.001, DEF_Neck.001 and IK_Head_Target.
I added to the new bone a copy rot constraint, targeting CTRL_TWEAK_Chest.002, so that you can use its influence slider to choose between the old head rotation mode (influence = 1.0) and the new independent one (influence = 0.0).
Some more work it's needed if you want the whole character to rigidly rotate when you rotate the root bone (as it should), but how to it depends by how you want to organize the rig.

Fantastic! Just the control I wanted to have. Thanks for sharing. I see you are very experienced in rigging. May I ask you where can I put my rig to get some tips, critiques, advices since Stack Overflow is not for opinion based Questions? There is not a lot of tutorials for Rigging, there are some good humanoid rigs, but for quadruped or anything similiar not so advanced.

I don't know much about forums, but I can sugget you this old free rigging course https://www.youtube.com/watch?v=3J-XN38EnhQ&list=PLE211C8C41F1AFBAB&index=1. Also Level pixel level has advanced tips, and CG Dive for expanding the use of Rigify Addon for animals and special creatures https://www.youtube.com/channel/UCRSx63y-VPidCrycgDS-o_Q.

Thanks for assistance, looking forward to watch those.


text:
Automatic Weight Painting Problem
When I apply Automatic Wieght Paint Mesh deforms unnaturally as seen on second picture. On the first one is normal mesh without weight paint.

I deleted some parts of mesh since this is project work so it can't be used by other. Hope you can work out with this, because problem is on the spine. Let me know if you can't.

hello, could you please share your file? delete the parts that you don't want to share. https://pasteall.org/blend/

Disable each bone constraint visibility, you'll find that you need to switch the Copy Transforms constraint of the bone called Spine.003 from World Space to Local Space:

I see now. Probably changing not only Spine.003 but Spine.004 and so on would be useful too, or it doesn't matter? Thanks, that will solve it.

yes of course also check the other bones


text:
Whatever I do in Pose Mode of my Rig, Tail of the Rig goes crazy
My first rigged object so I will try best to describe. I was trying to rig the horse, first had problem with automatic weights ( as I tried to parent horse object to rig, and finally did it with the Add-on).
Now, Problem is, whichever bone I move, tail goes whirling crazy, also can't put it in rest position, it doesn't allow. Scale is not applied because if I do it, my rig moves and messes up the object it is parented to. Whichever Bone I move, tail starts whirling. Maybe some problem with parenting or IK constraints. I will upload Blender file so if you can try to see the problem. Thanks

What do you mean you can’t put it in rest position?

Sorry for unclear information. Imagine still standing horse, and tail standing still between his last legs and this tail on my picture. It's ugly angle to see it, updating answer and another angle. Whatever I do, whichever bone I pick - neck, legs he just starts whirling uncontrolled.

THATS your rest pose?!?

OK, I am going to try and get the blend file just out of curiosity (am currently on mobile app).

Picture 2 is crazy pose, and picture 3 is what I think is normal :D

Oh, pickled marshmallows...

There is a Parenting loop.
What is happening is the green bone at the very top of your tail is copying the rotation of a bone that is parented to it (I cannot find it for some reason) this bone is called tail control. When your tail bone rotates, it rotates the control bone, which rotates the parent bone, which rotates the control bone, and so on.
What fixes the problem is simply remove the bone constraint from the green bone. If you still want to keep the copy rotation, just add a bone into your scene, press alt+p to remove parent, and use the new bone you created.

Thanks!  Shall try that


text:
highlighting intersections
I'm not sure the best way to explain this, but I want a material to mix into an emission shader along the edge where it intersects with another object. This video is a good example:link
edit: I want to do be able to do this in realtime (eevee), thought I'd add it here rather than just having it in the tags.
edit:
edit: I also want to be able to achieve this in eevee with this same method. this is done in cycles:

and this is eevee:

I just followed the method in that link:

you can use add shader in the end but results were not good so I used a mix of 50/50
you can use a light path node with out put of is camera ray to get rid of shadows.

works in eevee too but you should enable ambient occlusion + make the shader show transparency + adjust the color ramp. if adjusting color ramp is hard add a math node with power before it.

eevee setup

thank you for the input, and i'm sorry, i should've mentioned that i wanted to do this in eevee in the post as well, instead of just leaving it in the tags. the ambient occlusion node doesn't work in eevee like it does in cycles.

works in eevee too but you should enable ambient occlusion + make the shader show transparency + adjust the color ramp. if adjusting color ramp is hard add a math node with power before it.

could you show me a node example for using it in eevee? i know it needs ambient occlusion under render settings enabled for it to work, but tweaking with math nodes and color ramps still cause it to glitch out at less than 90 degree view angles (depending on the math function). this was when i tested it on a plane with an object intersecting it (material was applied on the plane). will get on pc in about 12 hours

Edited my answer. better results need more adjusting but I leave that to you.

I've editted my post, with a new image with the material having the exact same nodes and values, and settings enabled, but some parts seem thinner than others. I have tweaked the values around, but the intersecting area seems to always be thinner.

Play with ambient factor. Also scale is important. Adjust the last mix to 20/80. Spend some time with your shader and adjust it. If I handhold you all the way you will never learn.


text:
Where is the volume step size option in Blender 2.83?
Here is a picture of what I see in the volumes dropdown:

I tried going through all of the dropdowns in the render settings but still, no such luck.

Alright so i think the Viewport option is like Step Size but in view port and step rate is probably the same but in render mode.


text:
How to make a ratchet-like driver that increases a value only when object moves in certain direction and ignores it moving back?
New to drivers and Python in general, I’ve been playing around with it, but I need to do it without any animations or shape keys, tried a bunch of things with my limited knowledge even combining constraints with drivers, I’ve getting very interesting results but not what I was looking for.
I have two bones: bone1 and bone2. What kind of expression, can I use to affect z location of bone2 to go upwards whenever bone1 moves up, but stop it from moving and keep that position when bone1 moves downward, then as you manually move bone1 up again, bone 2 will start to move up from the position it was left at, and so on.
Someone here said, "a ratchet?"- yes. One example I gave to someone else was those zip ties that only tighten but won't come loose unless you cut them, but that's not quite the use I got for it. There are 2 bones in the scene, bone and bone 1, we need bone 1 to move up by the same amount as bone when bone moves up, regardless of their relative Z locations. But you want bone 1 to stay still when bone moves down, regardless of their relative Z locations. So, bone 1 can only move up and not down, and it always follows bone’s upward movement.
I played around with it a little more, most of the times this would result in a recursive loop when trying to add a third variable representing the difference of these two bones to bone1. Someone suggested I make a custom property to store bone1 last position and have the Python script check it before it performs the action, but I don't know how to go about it.

this kind of behaviour makes no sense to me (except you can explain this furthermore...or have another condition) because at a certain time after moving bone1 a lot, bone2 will be lost in space. So i think you need a kind of "reset" of bone2 e.g. at frame 1 for a certain value.

Do you mean whatever upward motion of bone 1, from whatever start-point -- i.e. a ratchet?

yes, exactly, a ratchet, one example i gave to someone else was those zip ties that only tighten but wont come lose unless u cut them, but thats not quite the use i got for it. ill try to explain the problem above in better words. yesterday i played around with it a little more, someone suggested i make a custom property to store bone1 last position and have the python script check it before it performs the action, but idk how to go about it.

You could have an Application Handler:
import bpy

 # Create custom property
bpy.data.objects["Empty"]["prev_Z"] = bpy.data.objects["Empty"].location.z

def ratchet(scene):
    driver_object = bpy.data.objects["Empty"]
    driven_object = bpy.data.objects["Cube"]
    if driver_object.location.z > driver_object["prev_Z"]:
        driven_object.location.z += driver_object.location.z - driver_object["prev_Z"]
    driver_object["prev_Z"] = driver_object.location.z

#bpy.app.handlers.depsgraph_update_pre.clear()
bpy.app.handlers.depsgraph_update_pre.append(ratchet)

First I have to admit I didn't even read the question, since Martynas' answer is accepted and seems to express the problem very clearly, so here's how this can be done with new simulation nodes in Blender 3.6 (yes I've read you ask for a driver specifically, but not sure why, so here's an alternative):

You need to ␣ Spacebar Play the animation in order to make it work (and restarts at frame 0):


text:
How to get rid of the blue line in character follow path animation?

The blue line makes the gap between the path and the character. So when I play it, the character walks in a huge circle. How do I get rid of the blue line so that it'll snap into the path?

Select the character and press AltG to reset its location. An object that has a Follow Path constraint will be as far from the curve start as it is far from the world center.

Thank you so much!!!


text:
How can I achieve Fake Depth of field for a 2D Image Plane?
Let's say I have an Image plane and a Camera looking at the plane from some angle (large or small).
I want the middle part of the viewport of the camera to be in focus, the rest should be blurred, but the part of the image face away from the camera should be the most blurred.

Source: https://www.youtube.com/watch?v=N9RzuCWdBDY
I have tried with Empty as Focal point at the Image plane but the F-Stop makes it ether all blurry or too sharp for the sides of the viewport. I also tried moving the focal point very far, but this has an effect only if there are actual 3D elements in front, the Image plane isn't affected.
What I imagine:

At angle in perspective.

I will appreciate your suggestions. I'm looking to repeat the solution for other projects, so I hope what I need as camera blur is easy to achieve.

"but the part of the image face away from the camera should be the most blurred." - what are you talking about? Actually the whole question is unclear. You should edit it and describe what you want to do, maybe show an example of desired result.

Are you just asking how to render depth of field, or is there more to this question? What exactly do you want to do with the plane?

Thanks for the reply @MartynasŽiemys like this After effects tutorial: https://www.youtube.com/watch?v=N9RzuCWdBDY in perspective, closer it is the plane as angle to the camera the sharper the image is. Also the sides are out of focus.

If you don't mind using the Compositor, you can use a Defocus Node when you enable the Z Pass in the View Layer Properties:

For more control over the blur shape, you can also use the Defocus Node with a (blurred) Box Mask instead of the actual Z Pass, but this is only a 2D effect:

Great answer. I did tried the Defocus node, but I guess I was following the wrong tutorial.  Only left to feather out the Mask edges. Trying it with "Double Edge Mask".


text:
Is there any way to simulate connected solid objects using cloth physics or similar
I've been talking to some people who use Maya and they said that this (video) was possible in Maya... Is this possible in blender using cloth physics or hair physics? In the video I have it animated.
https://youtu.be/c_UvMqTWTaE

Thanks!
Ekrcoaster

Hm, you need to use Rigid body physics, or Soft body instead. Cloth physics can't maintain volumes. https://www.youtube.com/watch?v=efEGZVI9VwM

Why specifically cloth physics? As @Crantisz says, rigid body or soft body is more suited to this.

...hair physics?

Im sure animation nodes could do this.

@RichSedman The reason that cloth simulation would be preferable to rigid body simulation (specifically in blender) is because BPhysics simulations involving both rigid body and cloth are practically worthless - (and have been for the last 15 years.) But, If you could emulate a rigid body using a cloth simulation, you could bypass a whole host of problems with "Rigid Body Cloth Sims", by instead using only cloth simulation (with 'structure and bending' vertex groups for parts of your mesh!) If this functionality works in Blender, I have not yet been successful in implementing it.

This can be achieved with Cloth physics or Soft Body physics.
Starting with Soft Body (since it's more versatile), the first step is to create the mesh - effectively two joined cubes. So starting with the default cube, select it and use Ctrl+D to duplicate it and position it in the desired location. Select both cubes (select one, hold Shift while clicking the other) and press CtrlJ to join them into a single object. NOTE : You should select the 'child' cube first (the one you want to have dragged about by the other), followed by the 'parent' - this way the origin of the combined mesh will be at the centre of the 'parent' cube.

We could use Soft Body options to keep the cubes from being distorted. However, this will interfere with the bending motion we want to produce. Therefore, we'll add 'struts' to the mesh to give it rigidity.
Go into Edit mode (Tab) and select wireframe view (Z). Select two opposing corners of a face and press F to create an edge between them.
Repeat this for every face on each cube - this will make each cube rigid without having to use the Soft Body 'Stiff Quads' or 'Bending' options, leaving them to be adjusted for controlling the bendiness between the cubes.

To join the cubes together, select each nearby pair of vertices in turn and again press F to create an edge between each.

Whilst still in Edit mode, select all the vertices of the 'parent' cube, create a new Vertex Group (named 'pin') and click 'Assign' to assign those vertices to the group.

Now swap back to Object mode (Tab) and in the Physics panel add Soft Body. In the Soft Body Goal settings set the Default Strength and Stiffness to their maximum and set the Vertex Group to the 'pin' group created earlier. In Soft Body Edges set the Pull and Push springs up to their maximum - this will force the edges to be a fixed length, locking the shape of the cube due to the 'struts' that were added earlier.
Now animate the mesh as desired - you should get the 'child' cube following and adjust the Bending Stiffness spring in the Soft Body Edges to get the desired stiffness of the joint. Switch off gravity (set the Soft Body Field Weight to zero) and enable Soft Body Self Collision if required. Optionally adjust the Soft Body Solver settings (eg, increase Min Step) if necessary. You can also adjust the Friction (on the main Soft Body properties) to calm down the bounciness if required.
This can produce the following result :

Cloth physics is fairly similar but needs a minor tweak to the mesh - since the cloth uses the presence of faces rather than edges to determine how the mesh behaves. So using the same mesh (ie, two cubes with added 'struts'), in Edit mode, select the 4 vertices between the two cubes and press F to create a  face.

Instead of Soft Body (remove it if using the same model), add Cloth. On the main Cloth properties panel, enable Pinning and use the same 'pin' vertex group as used for the Soft Body version. Disable Gravity in the Cloth Field Weights and enable Self Collision in the Cloth Collision panel.
You can use the Cloth panel to adjust the behaviour of the simulation. It's not as tunable as the Soft Body simulation but you should be able to get reasonable results - although you might still get some distortion of the cubes at high speed.

Blend files included :
Soft Body
Cloth


text:
Eevee volume scatter movement issue
I have used a cube and applied a principled volume/volume scatter on it. When I render an animation in Eevee with a still camera it renders just fine. But when I apply keyframes to the camera with a simple location movement, the volume fog starts moving.
Here's the GIF Preview of the render

My project settings are as follows:
Render Engine Eevee -
Sampling Render 128 -
Viewport denoising on -
Ambient Occlusion off -
Bloom off -
Frame rate 25 -
Res 1920 x 890
Blender 2.92
Cube

Setup

Can anyone help what might be causing this?
Thank you

can you provide blend file?

Thanks Chris, just emailed you the blend file.

In Eevee, volumetrics are approximated by combining a number of 'slices' of the volume together. While being much more efficient than rendering the complete volume, the accuracy is very dependent on the number of 'slices' used and how those are spread through the view.
You are seeing artifacts resulting from those 'slices' being in a different position for each subsequent frame and while this wouldn't be noticeable in a still image, it becomes very apparant in the animation.
The solution to this is to increase the number of 'slices' present so that any gaps between them are smaller and therefore far less noticeable. There are a number of ways of achieving this :

Increase the number of Samples in your rendering (the 'Render' and 'Viewport' settings in the Sampling section of the render properties). More samples will result in more detail being rendered in your volume. More samples will slow down your rendering - but should also produce better results.
Increase the number of Samples in the 'Volumetrics' section of the render properties. Again, more samples will take longer to render but will improve the quality of the volumetrics.
Concentrate the volumetric samples in a smaller part of your scene by changing the Start and End settings in the Volumetrics section of the render properties. The 'Slices' of your volume are only calculated for a distance from Start to End from the point of view (the camera or the viewport). If you have 'Start' set very small and your volume is a fair distance from the camera then there is wasted space that will waste your samples on slices that do not have an volume of interest. Increase 'Start' to the distance where your volume starts. Similarly, if 'End' is way beyond where your volume finishes then it will waste 'slices' that will never contain volume. The default values are 0.1m and 100m respectively. If your volume starts at 20m from the camera and ends at 60m from the camera then changing Start and End to 20 and 60 will concentrate the volumetric samples over just that range.

By making the above changes the volume 'slices' will be more concentrated in your area of interest and you should have far less noticeable artifacts.

Thank you Rich Sedman, increasing the samples helped solve this issue. Thank you very much


text:
Blur effect throught glass
What I'm trying to do in Blender is a blur effect in a way that, whenever something is not behind the crystal of the glasses, it should be blurred. That means, the sentence "Saw you there" should be clearly defined meanwhile "And I thought" should be blurred. Any ideas?
Thank you!

I need to clarify that it is an animation: "Saw you there" comes from the bottom of the scene and stays behind the crystal. The same with "And I though" but it comes from the top of the scene

This does not answer your question really but could you render out a "everything blurry" render and another "everything clear" and composite the two videos with a mask of some sort? I am sure this could be done in Blender without compositing but you will have to wait till someone who knows the math nodes better than me to help there.

Sounds like the work for postprocessing in the compositor

I know a way to achieve what you want through object masks and the compositor, but I'll have to post my solution later on in the day.

Set the lenses object pass index to a value of 1
Then under the layers panel use the passes dropdown and enable Object Index

Render that out and then head over to the compositor. Create a node setup as illustrated by the image below:
As you can see by this render, I believe it resolves your problem.
Hope this helps.

Put a refraction shader on a plane everywhere  exept the glasses' lenses.


text:
Generate a repeating mesh pattern without extra geometry - twisted cable/guitar string
Is there a way to fake a large number of turns of windings? Example: the strings of a guitar, if you gotta model the winding details, how do you fake the windings, so as to reduce the vertices?(because creating them with an array and a curve modifier boosted them up to a 70K vertex count)  I've tried bump mapping and normal mapping but, they don't seem to work well.
Looking to create an effect similar to this :

Bump map or normal map would be the way to go. You should figure out why it isn't working well.

Instancing is another option. See https://blender.stackexchange.com/questions/510/how-can-i-duplicate-a-mesh-along-a-curve

Assuming Cycles, how about something like this :

This is simply a cylinder with a procedural texture based on a Wave Texture and a Radial Gradient Texture.

The Object coordinate is split into it's X,Y,Z coordinates and just the Z is used to feed into the Wave Texture X coordinate. Without any offset this would simply result in rings along the length of the mesh. Adjust the Scale of the Wave Texture to get the desired pitch. Adding in the output of the Radial texture skews the rings and this can be adjusted (using the Multiply node) to join each ring to the next to produce a continuous winding.
To double up the strands you can include maths nodes so that the 'dip' in the wave becomes a second strand - by subtracting 0.5 and then using Absolute to make the negative section positive.

Adjusting the pitch produces the following :

Use a metallic material and this might be reasonably close to your needs.
One limitation of this is that the 'turns' must be aligned with the texture space - in this case the Z axis of the Object coordinates - so the mesh must be aligned with the axis and cannot be curved. However, this limitation can be overcome by simply UV unwrapping the mesh and ensuring that the faces are all alligned and oriented correctly in UV space and this allows the mesh to take on any form while still maintaining the twists.
One way to achieve this is to create a curve or a path along the desired route of the 'string' and set the Curve Bevel settings to give it thickness.

Convert it into a Mesh (Alt-C).

Go into Edit mode and select all faces (A) and select Mesh/UV Unwrap.../Follow Active Quads to unwrap the mesh. Open a UV/Image window and scale and align the unwrapped 'island' so that the narrow edge is just the same size as the UV image space as shown below.

With the UV Map scaled and positioned as shown, the Y coordinate can be used in place of the Radial Gradient in the previous material. The X coordinate will represent the length along the 'string'. This produces the following material and result :

Adjusting the Multiply nodes and the Wave Texture Scale will adjust the pitch and twistiness of the string.

http://pasteboard.co/wRwqniHdG.png, in an upclose and large number of turns,

are there any ways to improve this?

Try bumping the scale value WAY up on the Wave Texture node.

@BeshalJaenal Please add a reference image to your question - this will make it clearer to see the exact effect you're looking for.

@RickRiggs Please could you update the image in your edit to remove the properties panel (it's distracting from the enswer) and add in the radial gradient used to make them spirals rather than rings.

@RichSedman, I was looking for this effect.

@RickRiggs, please see the comment above

@BeshalJaenal I've updated the answer to include some maths nodes to hopefully get it closer to what you require.

@RichSedman, thanks for the great big help!!!

@RichSedman, the best edit ever!

Glad you like it - and glad to be able to help :-)

@RichSedman, a question that I thought would ask that I had forgotten to when I revisited this. How do I gain a better understanding of how the coordinate system works in blender?

Hi @BeshalJaenal. It's probably best to add a new question as it would require quite an in-depth answer.

@RichSedman , I'll do that, hope you'll answer it as well. ;-)

@RichSedman, hope I'm not being too persistent but thought I would point to the link: http://blender.stackexchange.com/questions/73769/how-do-i-get-a-better-understanding-of-the-coordinate-system-in-blender


text:
How to reflect a beam of light on a mirror using cycles?
In the context of a tutorial, I need to create this experience using a light spot on cycle engine.
We can replace persons with other objects.  I tried to do it using this answer mirror but the mirror does not reflect the light. here is my .blend exemple. Any help?

@cegaton can we do it with blender render (internal render) ?

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

@cegaton, thanks for your suggestion. It work with luxrender.


text:
How to control the angle and range of a light
I am working on project where I am using an infrared light. I want to simulate my real scene on blender. I am using a Cycles Render engine. I want to choose a point light. It is possible to fix a level angle visual range (45 degrees in the real scene)? The viewing range (80meter in the real scene). Any explanation will be appreciated. I need to simulate this light:

Illuminating range: Standard 45Â°
Viewing range: 80m (outdoor)

I used the solution proposed in the create an array of lamps? to model the Infrared light mentioned above which has these properties:

Led quantity: 96 leds.
Wave length: 850nM.
Illuminating range: Standard 45Â° level angle visual range
Viewing range: 80m (outdoor).

The fisheye camera is installed in the ceiling in a room.
When we use the wave length node, the array of lamps does not emit a sufficient light!!

Not sure what you mean... You want a point light that has angle limits, like a spotlight and a distance limit?

I don't understand your question. Are you asking for parameters of the light source or for camera parameters?

@maddin45, my question is about light source.

@Bithur, I edited my question

The following page may be useful for you when it comes time to add all the lights.  http://blender.stackexchange.com/questions/24391/how-to-create-an-array-of-lamps Unless you are using geometry lights, then you should be fine for the array part.

@Bithur, it is possible to specify the wave length for a spot as in a real case.

there's a wavelengh node and blackbody (temperature)in converter submenu

@Bithur, What is the units of Strength in Light FallOff. it is in meter?

I really don't think so. As far as i know, maddin45 told you how to stop light at the exact distance you want but i wasn't able to find a good way to get a nice falloff. Someone with better math or coding knowledge could do better.

@cegaton, you are great. Excuse, I suppose that the camera is sensible to infrared wavelength!!

visible light and its wave length : https://en.wikipedia.org/wiki/Visible_spectrum

If you want to keep it in cycles, you'd better model your own lamp as anything can cast light. This way you can control the shape and with a light falloff node you can control the distance.

assign the correct shader : emission for the face you want to cast light, plastic or anything else for the other parts.

Thanks, it seems very cool, but I have to change the color to white as in a real case.

easy as a click on color (emission node)

You cant control the angle with this.. you would have to model the leds also..

why not a array of modeled leds :) but the angle can be controled with the depth of the emitting faces inside the spot.

because the render times would be ridiculous! Array of Spot lamps maybe..

sure, that's why a simple model fits a basic solution. But that's what makes cycles so powerful, you can make things as complex as you need.

Unfortunately, i can't use the GPU render because I have mac pro with Intel HD Graphics 4000! So render times will be very important!

keep it simple then.

To control the angle more precisely you can use the facing output of the layer weight node in conjunction with a math > is less than/is greater than and multiply that by the light falloff's output.

@PGmath Really interesting, 'less than' makes the single face's emitted light acting like a spotlight (round and sharp) unless you use a subdivided smoothed curved surface as emitter, giving interesting effects too!

Add a Spot Lamp to the scene, switch to Blender Render engine and set the Spotlights size(angle) and distance(falloff).

Position it in the scene like you want, the visual spotlights guides will help, you should see the spotlight cone and range.
Switch to Cycles if you want, but the falloff will not work there, you will have to adjust the light's strength. If you like you can use volumetrics to visualize the lights cone in render:

It will look like this:

Sure there is, but its not that important (strength will do) nor physically correct.

Disclaimer:
This answer might be better suited as a comment, but since you can not post images in comments I created an answer instead.
Sounds to me like you want to use a spot light. Spots work similar to point lights but also have an opening angle. Unfortunatly Cycles only supports round spots, not rectangular ones.
About the viewing range: In real life light will not stop abruptly, so this parameter does not really make sense in a physically based renderer like Cycles. You can however mix the emission shader of the spot with a holdout shader depending on the ray length to only make it illuminate objects in a certain range.

The result looks something like this:

At a certain range from the lamp the lightsource is treated as black. This creates the hard round 'light borders' to the left. The soft 'light border' to the right is where the opening angle of the spot ends.

Thanks, but I remark that the shadow is not very clear and in the real case, the Infrared light is a monochromatic, so we get grayscale image not RGB. So, I think I have to choose precisely the diffuse of the spot.

@startingBlender I only wanted to demonstrate a method to make the light stop at a certain distance here.

really interesting but i'm trying to make a falloff with raylength. Something like an inverted exponential. As you can guess, my maths are not good.


text:
Shiny Materials Not Showing Up In Render
Ok so Blender was working perfectly fine for months now until today I tried to render a weapon with a chrome material, only to find out that it rendered without the material! I already tried resetting Blender to all default settings and I've quadruple checked to be sure non of the objects are hidden. Yes, the lighting is very bright too, but that doesn't show either. See pictures below.
(Edit): Guys, I'm not stupid. I already tried the background idea. I looked around for an hour for solutions before posting this question and found a few people having the same problem, (including the thread that this is a "duplicate" of) but none of the suggestions people gave them fixed my problem. Even if there is no background, the object should at least be interacting with the light somewhat. Example:

That's a render I made the week before I started having issues, I'm not very proud of it but it proves my point. So what's below doesn't make any sense.

Even with a different color.

But when I use a dryer, non glossy material like leather or just the default diffuse mat everything shows up fine.

Plz help ;__;

Pretty sure this has been asked before. It does look right, it is reflecting all that grey from the background you have surrounding it. Add an image to the world background and see what it looks like.

What do you expect it to look like? A reflection of a perfectly flat environment is perfectly flat..

I expect it to at least shine. There's nothing for it to reflect but it's not interacting with the light at all. And when I add a background the object simply takes on the exact same texture as the background.

Then you may at least try uploading your file, a most straightforward way to target your problem. You can upload here and paste the link in your question.


text:
Is it possible to apply modifiers to multiple objects at once?
You can copy modifiers from one object to other objects with CtrlL> Make links > Modifiers, or the Copy attributes addon.
However, is it possible to apply modifiers to many objects at once?

You can select all of the object you wish to apply the modifiers to, then press AltC> convert to mesh:

Note:

Some modifiers have different values for View and Render.
This will apply the View settings.

This doesn't work if the modifier isn't being displayed in View. Next question... how do you set all modifiers to display in view at once?

How about for complex modifier stacks? i.e. several array modifiers, curve modifier, lattice modifier, etc. and Multiuser data

Convert To
One very easy way to do this is to use the Convert To command:

If you have curve objects that need to stay curves, then use Convert to Curve
ALTC -> Convert to -> Curve from Mesh/Text
If you have mesh objects that need to stay meshes, then use Convert to Mesh
ALTC -> Convert to -> Mesh from Curve/Meta/Surf/Text

This will automatically apply all modifiers at once:

Blender 2.8x and 2.9x comes with the add-on "Modifier Tools".
The add-on ads four buttons in the top area of the Modifier tab and the entry "Apply All Modifiers" in the menu under "Object" - "Apply".

In addition to applying and deleting the entire modifier stack, you can also disable it in the Viewport (Viewport Vis) and collapse/expand all modifiers with the press of one button (Toggle Stack).

Yes. But this is not working for multiple objects at once.
Additional info: The default shortcut Alt+C isn't working in version up from 2.8.

@ChristophWerner - It does in fact work on multiple objects at once. I just tried it in one of my projects. Select all objects you want to apply modifiers to, then select "Apply All" - done.

You're are right. It was my fault. I expected it works for the selected object stack only. Thank you!

@ChristophWerner if you select 2.79 keymaps in BlenderPreferences > Keymap > Presets Alt+C works just fine.

Wish this also worked for constraints, welp / EDIT: Okay this works. TL;DR Ctrl+A > Visual Transform and Object > Constraints > Clear Object Constraints

One year and seven months ago.  I checked under extensions.blender.org.  It's also available and working as recently as blender 4.3 beta.  Since I wasn't offered the option (maybe just because it's beta, or maybe because of backwards compatibility which changes with 4.3) to bring over settings from an earlier version of Blender.
Might be useful to know, if you use it, like it.  And like me, maybe forgot how you got it the first time. For what it's worth.


text:
Get which screen the cursor is in?
Is it possible to tell which screen (3D view, Node editor, etc.) the cursor is in with python?
Can I also get properties specific to that view, (even when there is more than one open) e.g. determine which (if any) 3D view is in camera view?

It's all accessible through bpy.context. The active area is accessible through context.area (of type Area), while data specific to the active area's current display type through context.space_data (of type Space).
Once the active space is ascertained as a 3D View, we can access its view properties through context.region_data or context.space_data.region_3d (of type RegionView3D) e.g. to check its view perspective.


text:
Decimate A Mesh To An Explicit Number of Vertices and Faces
I am building a machine learning dataset from a collection of 3D models. Training the models requires that the mesh have the same number of faces and vertices for every model in the dataset, which requires me to treat my data.
I have cobbled together a method of achieving this from PartSegmentationToolbox (link), which manages to obtain the same number of faces per model by using a Subdivide and Decimate Modifier.
However, I notice the number of vertices differs between objects I apply the method to. I am a bit puzzled, as I thought the number of vertices would be directly proportional to the number of faces.
Is there a way that I can obtain the same number of vertices and faces at the same time using an input model? If not, what method could be applied to obtain the result I am looking for?
def Subsurf(mesh):
    # Subdivide the mesh
    mod = mesh.modifiers.new(name='Subsurf', type='SUBSURF')
    mod.subdivision_type = 'SIMPLE'
    bpy.ops.object.modifier_apply(modifier=mod.name)
    # Triangulate the mesh
    mod = mesh.modifiers.new(name='Triangulate', type='TRIANGULATE')
    bpy.ops.object.modifier_apply(modifier=mod.name)

def Simplify(mesh, target_faces):

    nfaces = len(mesh.data.polygons)
    # Check if number of faces less than required, and subdivide until achieved
    while nfaces < target_faces:
        Subsurf(mesh)
        nfaces = len(mesh.data.polygons)

    mod = mesh.modifiers.new(name='Decimate', type='DECIMATE')
    mod.decimate_type = 'UNSUBDIV'
    mod.use_collapse_triangulate = True

    # Set the decimation ratio
    ratio = target_faces / float(nfaces)
    mod.ratio = ratio

    # Apply the modifier
    bpy.ops.object.modifier_apply(modifier=mod.name)

F + V - E = 2  (Euler's Formula)    :)   ... I think we need to know if your objects are always manifold?

EDIT: Yes, the meshes are non-manifold.

Tricky because so open-ended.. do your meshes have anything in common? Maybe an example?

Sorry: I am not sure quite what you mean. There are a thousand meshes, with vertices varying from 1000-10000 vertices.


text:
Panels on the space station module
I would like to model a space station in Blender. As you can see in the pictures, the individual modules are covered with aluminum panels. Is there any way to procedurally cover an object with panels (or with anything else)? It would be nice if I could set different numbers of panels around the perimeter of the module. As well as different number of panels per length.

Hello, Saturn V, these are all reasonable questions, but not all in the same place; the answers would have to be modelling tutorials.. SE sites aim to be archives of answers  to specific problems. Please go ahead and edit to isolate one task, and we can re-open for you.

Thanks, Saturn V, for your understanding.


text:
Z axis of mapping node in Shader is not working

As you can see in the picture above, touching the values of the X and Y axes moves the texture, but touching the Z value does not move the texture. What should I do?
i have new problem. please show below picture.

Your image is the same for all Z values, because images have no depth. What result are you expecting, what is it that you actually want to do?

it's moving but you can't see it because the projection is flat, if in the Image Texture you choose Box instead of Flat you'll see the texture moving

It's moving but you can't see it because the projection is flat, it means that the image is only projected on the object local Z axis and therefore on the side you'll only see the stretched pixels of the picture. If in the Image Texture you choose Box instead of Flat you'll see the texture projected on the sides and you'll be able to move it.

But keep in mind that even with the Box option, if you rotate your image, it will stretch it. It's not because it is projected on its face that it can't be stretched if you rotate it.

Thanks to your answers I could solve the problem. By the way i have new problem. If i rotate image by using Mapping node, only part of face move. how can i solve it?

what do you mean exactly when you say part of face? maybe edit your first question and show some screenshots. Also you should find some tutorials about how the mapping works and how to deal with the 3 axis...

I'm sorry for the late reply. I guess you didn't quite understand my question. I've attached a new GIF to the top. As you can see from the new GIF image, if i rotate image of object, only part of face move. Can you still answer that?

your gif is hard to follow, please tell what you're doing exactly with the Mapping node

okay. i updated new viedo. as video explain, if images of object is not rotated, image of every face is moving. But if image of object is rotated, only image of some face is moving. how to sovle this problem? i edited video upl : https://www.youtube.com/watch?v=XkK48nu3EBI

if you rotate your image 90°, what I've explained on my first picture happens again, the pixels are stretched on one of your axis. Also, maybe you must keep in mind that maybe your local axis is not aligned on the global axis.

So do you mean i must allign axis about image? but how? could you tell me how to do?

What is your goal exactly? If you don't want any stretching please read my answer again, if you want something else, please be more specific

Yes, my goal is to follow your answers to the my questions with YouTube videos attached. But you explained it only in text, so I don't understand. So, I'm sorry, but could you answer to me a solution process described by video or images?

could you please share the plank object? Just make sure you've packed the image, go in File > External Data > Pack All Into Blend. Use https://blend-exchange.giantcowfilms.com/

sure. i uploaded my blend. file on main text.

Ok I understand your problem, I've edited the answer. It's not because it is projected on each face that it can't be stretched if you rotate it. Also don't forget things like applying the scale (ctrl A), it will avoid other texture deformations that you may don't understand.

Yes, I saw your new photo. So how do I solve that problem? I can't find picture to solve this problem. did i miss something? perhaps is it solved when I apply scale (ctrl + A) to object? but although i apply scale (ctrl + A) to object, it didn't solved. if you don't upload, could you upload a picture of how to solve problem?

You just need to let the Rotation at 0°. If you're not glad with the result you need to find another texturing method: Either create a procedural texture (meaning without the use of any image so you'll have to use nodes like Noise etc), or unwrap your plank and put the UV over the image.

Aha, Now I see. Thank you for your sincere answer. It was a great help.


text:
Eevee Sunlight Contact Shadows cause unwanted flickering shadows
When I turn on contact shadows, unwanted shadows appear. When I change the viewing angle they flicker.

Contact Shadows off.

Contact Shadows on.

How can this be avoided without turning off Contact Shadows?

Does this answer your question? Random shadows - Flag & Cloth Simulation

I did try that but it did not help. But I found another solution to the problem. Instead of using contact shadows I sat the Distribution to 1, witch gave the same effect as contact shadows but without the problem.

Instead of using contact shadows I sat the Distribution to 1, witch gave the same effect as contact shadows but without the problem.


text:
Parent object to mirrored side of object
I am trying to make an animated short film with Blender. I need to parent an object to the mirrored side of another object. Do anyone know how to do that?
Here is an an example
The cube on the left is a mirror of the cube at the right. The mirror object (the center of the mirror) is the big flat cube. I want to parent the monkey to the cube at the left. The cubes need to be animated. So I can not parent the monkey to the cube at the right. I hope it makes sense.

Hello. Can you add more details (a picture) of the mirrored object? Also, what do you mean by "parent" in this context?

Now I have added an example of what I mean.

By "parent" I mean follow the mirrored side of the object.

ok, thanks for the edit, though why don't you invert all that: you can have the same result if the original cube was on the left

The reason why is, that I want to "parent" objects to both the left and the richt cube. I should have written that in the example.

That can be done with some constraints:

Place an empty has child of the original cube. This is to place Suzanne relatively to the cube.
Then add two "transformation" constraints to Suzanne, with the above empty as target.

Presuming the mirror is on X.
One constraint for the locations, inverting X source (maps -1/1 to 1/-1).
One constraint for the rotations, inverting Y and Z source either (the same way).

Thank you very much! It worked.


text:
Parent with automatic weights problem in Blender
I am rigging a character for an animated short in Blender 2.82, but then this happend:

On the other hand it looks as it shouldt, but here something went wrong. Do anyone know what I did wrong?

you need to give some corrections to the wrist in weight paint mode

I found the solution! I had already parentet the mesh to the armature erlier. Later I flipped the names from L to R. Then I parentet it again, and it had still saved some of the old vertex groups. I deleted all the vertex groups, and now it works:)


text:
How to make a cut on a face between an edge and a vertex?
Basically I wanna make a cut between edge on the right and a vertex

But when I try to do it with the knife tool, it creates additional edge that I don't need

So I wonder how can I do it, since loop tool creates another cut, not between these two.

Can you share your blend file?  (Grab the URL of the question.
Go to https://blend-exchange.com/.
Select the blend file.
Add the url of the question.
Grab the url that results.
Go back to the question and edit it.
Add the new url to the bottom of the post.)

This might be related to the fact that all edges making a face, have to be connected into a single path. So you can't create an "O" shaped face and knife will make an additional cut to deal with this problem. Here's a screenshot of a single face, that has two pairs of overlapping vertices. Pressing A, M, B will create an abomination. https://i.imgur.com/Ia1D9IO.png

Possibly related: Is there any way to remove edges causing a loop?

You can just do it with the knife tool and select the edge you do not want. Then press "x" to delete it, and choose "Dissolve Edges". I hope that helps.

When i did it it deleted the edge i needed too

Then try to delete the two faces that are on each side of the unwanted edge. Then select all the edges around the hole and press "f".


text:
How to smooth rough surface scanned with 3D scanner?
Newbies here need help. I scanned a model with 3D scanner, but the surface is rough and have a lot of bumpy areas and I would like to smooth them. I tried Decimate, Auto Smooth, Smooth, but it's not working. Appreciate if someone can guide me.

If you can post the .blend file, someone might be interested enough to give it a try.

You could try 3 different smooth modifiers:

Corrective Smooth seems to be appropriate here. It works a bit weird, since you need to lower the scale in order for it to have an effect:
You can apply the modifier to the mesh by hitting  Ctrl  +  A  while hovering the mouse over the modifier in the UI once you are happy with the result.


text:
What does Translate Instances node do?
I searched for the function of Translate Instances geometry node on Google and only got answers from Blender official website. I don't understand what it actually does. Can somebody explain the function in non-technical way?

It moves instances https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/instances/translate_instances.html

It really does what it says - translates the instances. So let's say you have some instances and you want to move some of them. You need to pick the ones you want to move if you don't want to move all of them so you can use Selection input. I made an example where I instance some spheres on each point of the geometry - in this case each vertex of my default cube, then I compare their position in Z axis to 0 because let's say I want to move the ones that are higher than the floor - so 0 in Z axis. I feed the result of that comparison to Selection input and change the translation vector(X, Y and Z coordinates that I want to add to the location of my selected instances):

It is indicated by this icon:

that the Translation input of the Translate Instances node accepts fields so it can get a lot more complex since you can feed it all sorts of data with ranges of values.


text:
How to subdivide curve segment without changing its shape?
I have a primitive bezier curve circle and when I subdivide 2 points, it changes the shape of the curve. How can I subdivide without changing the curve's shape?

Hello, you've already asked the question, maybe show some screenshots?

hi @moonboots, pics were added

Please don't post the same question more than once. If your previous question was put on hold, address the raised issues by editing it so it can be reopened rather than post a new one, otherwise see What should I do if no one answers my question?

Change the handle type to Free, then subdivide:


text:
Bisect not cutting all the way through?
I'm trying to bisect an object along a flat plane running along the x-y axes in order to separate it into two parts. When attempting to rip along the bisection, some of the geometry is not bisected:

The steps I followed:

enter edit mode and select all vertices
select the bisect tool
draw a bisecting line/plane roughly along the z-height I want
press "v" to rip off the selection and try moving it
some of the vertices remain and were not bisected

What am I missing?

In addition to the other answer I would consider just moving/straightening one of the existing edge loops to where you need the bisect to be and ripping that instead. Instead of trying to cut across the whole thing for no reason. Bisect tool will work best when you're working with more manageable geo and you mesh looks pretty dense.

You seem to simply have some other geometry there not related to the cut:

Even if you cut all the geometry above it, the operation does not remove topology around the cut, it will remain. You should just select all the geometry you want to move including the loop.
This is what's happening:

How do I select all the geometry above or below the cut?

Using any of numerous selection tools in Blender. There is no one right way. If it's a loop, you can alt+click an edge, if it doesn't form a nice loop, you can select an edge and ctrl+click on some other to select shortest path between them, or you could just use select box, or any other way. See: https://docs.blender.org/manual/en/latest/modeling/curves/selecting.html#

I just want to partition the mesh into "above" and "below" parts along a plane like "z=42.5" or something close to it, my goal is to simply extend the length of a handle. Am I using the right tool? I'd like to avoid having to click hundreds of edges if it's possible to specify a plane along which to cut.

Don't click hundreds of edges then. Learn to use selection tools in Blender. They are there to avoid clicking hundreds of times. Click dragging to box select for example is one click and it doesn't have a limit of how many elements it selects - could be millions.

What do you mean that the geometry is "not related to the cut"? Isn't the cutting plane bisecting that geometry? Or is it only touching the outer edges of the mesh?

No, you are not bisecting all geometry, just some. You bisect some edges and faces, but they are still connected to some other edges and faces and those remain where they are when you move your new edges.

@user84207 I added a GIF showing what's happening. The edges marked red just stay where they are.


text:
How to render lots of fur that does not fit into memory all at once?
I'm currently making a short film in Blender with a lot of animals. In a specific scene I have around 10 of them with full groom. The models come from VFX Grace and other stores, they are super high quality. I'd prefer not reducing the hair amount but Blender often gives me "Out of GPU memory" error when trying to render. I have a RTX3080 and 32 GB of RAM.
I've already limited textures to 2K, optimised the poly counts, but don't want to compromise on the hair.
Is my only solution to render on a RTX3090 / 4090 machine or is there a way to optimise the render further? I'm not that familiar with decomposing shots to save memory (background / foreground) but I feel like it's common practice in the industry?
Here is a portion of the shot with only two animals where Blender is already struggling:

Since when do RTX3080 cards come with 32GB? :D

RTX4090 has 24GB of VRAM. There is no guarantee that your scenes are going to fit that. You are rendering with 10 or 12 GB of VRAM currently, depending on the variant of your RTX3080 and you have 2 animals. If you have 5 times more animals(10), that is likely 5 times more fur, so you may need up to 5 times more VRAM... So you might not be able to use GPU at all and may need more RAM for CPU rendering as well if you don't somehow split your scene. It's not uncommon for things like this to require render farm services.

@MartynasŽiemys haha I meant that I have a 10gb VRAM rtx 3080 and 32gb of "normal" RAM ;) thanks for the post edit and answer !

I was hoping maybe someone else would expand on splitting the scene into layers in a proper answer. That is probably another solution besides rendering on a render farm. I have seen tutorials on that on YouTube. You should be able to find some. It would probably be a long kind of answer here on BSE...

There are two BVH calculation methods, one is more RAM intensive because it's faster for hair systems, the other is slower but you might at least be able to render..  There's a setting somewhere to switch between them

Try turning off "Use Hair BVH".
Look under Acceleration Structure
Blender Manual: http://builder.openhmd.net/blender-hmd-viewport-temp/render/cycles/settings/performance.html


text:
Rotate an object and move up local z axis at the same time
I need to rotate these two objects around the same pivot point with the outer object sliding up it's local z axis and ending up inside the inner object. I have tried using a transformation constraint along with a copy rotation however the object gets moved up the z axis in world space (even after selecting local space in settings) which doesn't lead to my desired outcome. Any help would be greatly appreciated. Thank you.
This is my setup with the constraints I thought would work:

Here is how the constraints work with undesired result:

This is how I want the constraints to work, with the object rotating and moving up it's local z axis at the same time:

I would suggest animating the position and change the constraint from loc to rot.

so why don't you parent object 1 to an empty (that will be the rotation center), parent the object 2 to object 1, then rotate the empty, object 1 will follow, then move object 2 along the desired local axis (G Z Z if it's Z)

I wanted a way to make it easier whilst editing to see the changes. I'm going to make it a bit more complex with more objects moving in between in a similar way. Basically I want to use the empty as a slider control that calculates and shows the positions automatically. Is there anyway of doing this without going into animation to make it easier for concepting. Apologies for my poor way of describing things.

in the case you show up above, object 1 parented to empty, object 2 parented to object 1, then Copy Transforms constraint for object 2 would work fine but I'm not sure it will work for all the cases you're planning to do

Thank you so much. You helped me get it working how i wanted it to

So what you can do is:

Create your 2 objects. Create an empty where the rotation is supposed to happen. Parent object 1 to the empty, parent object 2 to object 1.

Give object 2 a Copy Transforms constraint with object 1 as Target.


text:
Shrinkwrap moving below the surface
I am trying to use the Shrinkwrap modifier to wrap clothes around my model but some of the clothing is moving below the surface on some of my model. If I use a negative value for the shrinkwrap the parts that were outside my mesh are inside and the parts that were inside are outside.

Looks like you most likely have flipped normals on some of your model (the arm). The Shrinkwrap is set to move the cloth above the closest surface. For the arm the normal is pointing “inside” so “above” is effectively inside your model.


text:
How to choose between entering a Radius or a Diameter when creating a Circle
When using Shift+A to add a Circle, you can specify the Radius of the circle in the tool panel. How can I choose between entering the Radius and entering the diameter?

It's not posible to toggle the Radius field to Diameter. However, as the diameter is twice the radius there is a direct relationship between the two - so the Radius is the Diameter divided by 2. Also, Blender is capable of automatically interpreting mathematical formula when entering values.
Therefore, to create a circle of, say, 30 units in diameter, simply type 30/2 into the Radius field and Blender will automatically calculate 15 as the radius.