text:
How can I create an animation of many ants spawning from a central point and fanning outward?
I have a single animation of an ant walking across a plane and I'd like to use that as the base for a larger animation with hundreds of them spawning from a central point and walking outward in various directions away from that point. Think about ants emerging from a small ant hill and spreading out from that point.
I'm relatively new at this so I'm looking for the optimal way to do something like this without having to individually animate every single ant to move in a random vector away from the spawn point. I have spent a few hours fiddling with particle systems to see if that might suit my purpose. I managed to spawn particles that are instances of my ant collection, but I have been unable to figure out how to control the path of the particles to the degree that I'd need for such an animation.
Any help is greatly appreciated.

Search for "blender birds" on the internet.  There is such a thing in other 3D software that I can't mention that allows you to create such behavioral simulations.

Thank you, I will definitely search for that. Much appreciated.

You could also search for "blender boids", this way you avoid most of the bird modelling tutorials ;)

I found a flock of birds tutorial and it was perfect. Thanks so much! Also I feel dumb for going over almost every inch of the particle system, seeing "boids" and going "huh, weird" and then going right on past it. smh lol

@Chev It would be great to know how you did it because your particles seem to have several goals, maybe write an answer?

@moonboots sure! I’m busy this morning but I’ll throw an answer together later today and include a link to my particle test blend file.

@moonboots I do have this TikTok sized render on my phone in case you want to see the result. Each particle is an instance of a collection that contains a complex object with the cone “hat” being animated separately just to show that particles can be objects that are animated. I’ll be applying it to my actual scene soon but for now this proof of concept is all I have :) https://imgur.com/a/3QSKfDY

thanks but how did you set the boids so that they go in different directions?

It’ll all be in the answer when I’m at the computer later.

It looks a bit toxic, but this might be of interest to you....
Here you can see the video
And of course, you can push it to the limits and make your GPU glow if you want:

With this setup you can actually use any shape for an ant hill.
For the sake of simplicity, I used the same shape in this example with which I implemented the individual ant trails.
At the beginning I use the top surface of a cylinder (with sufficient subdivision):

Then move the points with a Noise Texture:

Using the nodes Shortest Edge Paths and Edge Paths to Curves (available since Blender 3.3!) I convert the mesh into individual curves and trim them:

I can then conveniently time the trim of the curves:

Not only from one point, but also from another point:

This way I get the necessary lines, which I then only have to divide into points:

Ants can then be instantiated at these points or whatever.
You can control the distances between the points, the start point and end point of the curve, as well as the speed and many other things...
Of course this is only an example and you would have to adjust some things here, but it could be a good starting help for you.
The nodes are a bit more extensive than usual, but it's not exactly an easy task:

(Blender 3.3+)


text:
Rendering only a single mesh in an environment and having everything else (behind it & overlapping it) masked out/transparent
I have a completed scene in which I wish to render all the animated characters separately from the stationary environment, with everything but the characters being transparent (including everything that might cover/overlap parts of those characters); like masking out all of the environment parts around them and then rendering only the character and their animation as separate PNG frames.
I haven't worked with layers or the compositor very much and I can't quite figure out how I would go about it. If there is an easier way of only rendering the single mesh with the environment masked out do let me know!

You can put all the objects that you want to be transparent in the same collection and activate the Holdout option for this collection:

Don't forget to activate the Render > Film > Transparent option:

source: Stack Exchange

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

sort: votes


text:
Glitch(?) - Script to Replace All Selected Objects with Active object
I'm creating some ways to 'retopologize' CAD assemblies with low-poly objects. I came up with a function that takes all the selected objects and replaces them with the active object, while retaining each original object's dimensions, rotation & location.
However I have a glitch. I can't seem to figure out why half the time one or two of the newly created objects default to (0,0,0) as their location. It doesn't make any sense to me. It only seems to happen on some occasions (not all the time). Any ideas why / how to prevent this?
import bpy

def replaceObjects():
    import bpy

    objects = []
    active_object = bpy.context.active_object

    for obj in bpy.context.selected_objects:
        # Pass if the object is active object, or is not a mesh (e.g. Camera & Light)
        if(obj.type != 'MESH' or obj == active_object):
            pass
        else:

            #This is an important step since objects can be offset from their origin
            bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY',center='BOUNDS')
            world_matrix = obj.matrix_world
            global_location = world_matrix.translation
            rotation = world_matrix.to_3x3().to_euler('XYZ')
            data = obj.data

            # Save the object's name, dimensions, location to array
            objects.append({"name": obj.name,
            "dimensions": obj.dimensions,
            "location": global_location,
            "rotation": rotation,
            "data": data})

            # Delete this object
            bpy.data.objects.remove(obj)

    tag = '.c'
    newID = 0
    for item in objects:

        newID += 1
        new = str(newID)

        n = bpy.data.objects.new(new, active_object.data)

        # when you create a new object manually this way it's not part of any collection, add it to the active collection so you can actually see it in the viewport
        bpy.context.collection.objects.link(n)

        # Name the object
        n.name = item["name"] + tag

        # Size the object
        n.dimensions = item["dimensions"]

        # Position the object
        n.location = item["location"]

        # Rotate the object
        n.rotation_euler = item["rotation"]

replaceObjects()

You're iterating over selected objects, but also modify selected objects by removing them… "if you mutate something you're iterating over, you're living in a state of sin and deserve whatever happens to you" - Raymond Hettinger

@MarkusvonBroady yeah I ended up solving my problem by saving the object itself as a value within the array objects and then delete them during the second for loop. That fixed it.

I played around with it and moved the remove() operation to the end which solved the issue. I learned today not to iterate through a list while modifying it. Should have known!
This code works. I think it should be a standard feature in Blender actually - it's really fun & useful:
import bpy

def replaceObjects():
    import bpy

    objects = []
    active_object = bpy.context.active_object

    for obj in bpy.context.selected_objects:
        # Pass if the object is active object, or is not a mesh (e.g. Camera & Light)
        if(obj.type != 'MESH' or obj == active_object):
            pass
        else:

            #This is an important step since objects can be offset from their origin
#            bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY',center='BOUNDS')
            world_matrix = obj.matrix_world
#            global_location = world_matrix.translation
            rotation = world_matrix.to_3x3().to_euler('XYZ')
            data = obj.data

            global_location = obj.location

            # Save the object's name, dimensions, location to array
            objects.append({"name": obj.name,
            "dimensions": obj.dimensions,
            "location": global_location,
            "rotation": rotation,
            "data": data,
            "obj": obj})

            # Delete this object
            #bpy.data.objects.remove(obj)

    tag = '.c'
    newID = 0
    for item in objects:

        newID += 1
        new = str(newID)

        n = bpy.data.objects.new(new, active_object.data)

        # when you create a new object manually this way it's not part of any collection, add it to the active collection so you can actually see it in the viewport
        bpy.context.collection.objects.link(n)

        # Name the object
        n.name = item["name"] + tag

        # Size the object
        n.dimensions = item["dimensions"]

        # Position the object
        n.location = item["location"]

        # Rotate the object
        n.rotation_euler = item["rotation"]

        # Remove the original object
        bpy.data.objects.remove(item["obj"])

replaceObjects()
```

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


text:
Best way to copy /mirror/duplicate mesh?
I spent 4 years using Creo Parametric for CAD and now I'm learning Blender. I'm struggling to make simple rectangular frames. What is the most efficient way to copy this little rectangular block of geometry from A to B? I'm in edit mode, so this is already a single mesh. I'm trying to keep all surfaces flush (coplanar) & aligned.

Have a look at the Snap options. Select the faces of the little block, duplicate them and enable for example Snapping > Vertex (other options like Edges should also work good in your case). Drag the duplicated faces and while dragging, move the mouse over the target you want to snap to (indicated by a little orange circle, it's a bit hard to see in the gif):


text:
Custom CTRL+Z handling? (Avoid crash)
I created my first Blender operator: If the user selects 1 or more objects, and presses a button, a Python script will replace all the selected objects with cubes of the same size & location. The function first iterates through the objects and saves their data in an array and then deletes them, then it uses that array to create corresponding cubes. Anyway, if I press CTRL+Z it usually crashes Blender, since it can't always undo everything.
Is there a way to control what happens when I (or any user) presses CTRL+Z immediately after triggering the custom operator? (In my case, I would want to save all the objects I deleted, and then re-add them). Or even prevent Blender from trying to undo that action?

You may looking for bpy.app.handlers.undo_post. Blender may crash when you access a invalid pointer. For example: cube = bpy.context.object>undo>print(cube.name)


text:
Why does Blender inflate file size in comparison to STL?
I created a new scene and deleted everything in it (the lamp, the camera, and the cube). When I save this file, its size is 438 KB.
I then import an .stl file, the .stl file is 7,754 KB.
When I save the scene, the resulting file grows from 438 KB to 10,365 KB. That's a difference of 9,927 KB, much larger than the .stl file, which is an increase of 28%.
Why is the .stl mesh file size so bloated when saved in a Blender scene?

there are two kinds of STL, binary (very efficient storage, but not human readable with a texteditor) and ASCII (not efficient storage, but human readable) : https://en.wikipedia.org/wiki/STL_(file_format)  I suspect you are importing a binary STL, Blender doesn't export binary STL files. related different filetype but same scenario: http://blender.stackexchange.com/questions/43737/import-and-exported-file-have-different-sizes-though-they-are-identical

@zeffii I hadn't thought about the binary vs ASCII issue. You're right; they are binary STLs. I wonder what the results would be with ASCII STL files...

Blender stores a lot more mesh information than an STL file.
An STL file is a basic «geometry only» file format suitable for 3D printing and fabrication processes, it saves little else beyond the geometry itself. There is no color, UV coordinates, normals or anything else saved in the file.
A blender file has  much more complex geometry system suited for a lot more than just fabrication processes.
It stores not only geometry, but also UV Coordinates, vertex colors, normal information, mesh selection state, vertex groups, among others, it also stores the geometry itself in a much more versatile format allowing complex geometries beyond triangles, like quad faces and NGons.
Besides that there may be other complexities involved like inefficiencies of the file format/application, file compression, or data caching.
Under the menu File > User Preferences > File > Save & Load you will find a Compress File option, which if ticked should have Blender store information in a much more compact way.

Do you know of any documentation on the nuts and bolts of the .blend file format?

When a file is imported, even into an otherwise unpopulate scene, Blender adds a series of hierarchical information, including a set of node trees, UI information (which is why opening someone else's Blender file can change your UI view -- although this can be prevented) and tool information (ex: brushes) and a couple of large array of application data... From an archive standpoint, if you do not need higher-level data, saving an stl is fine... the rest added by Blende allows you to migrate a file from one person to another and carry along a lot of stuff -- mostly useful.

Surely UI and tool information is included in the original 438KB the OP mentioned?

Fair point, although I notice that naked file sizes are even influenced by whether you are saving a Cycles, BI or GE file... someone with Periscope or something similar could parse the binary portions better than I.... and I know that UI elements like add-ons you have installed impact size, although I am not sure it that is just a path or something more.... But I used pretty fast and loose just saying UI...

I'm assuming that Blender stores the surface normals of each polygon (instead of calculating them on the fly). Also, I wonder if other information is calculated and stored like each polygon's neighbors. This data is definitely not part of the .stl file. Could that make for a 28% increase?

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


text:
Operator Properties Panel at Bottom of Tool Shelf Grayed Out
I have lost functionality in the Operator Properties Panel at the bottom tool shelf.
When I click on a selector or something in the bottom part of the tool self that you can hide and unhide, nothing happens. I can see the options but when I click it doesn't work.
This is what hapens when I use Add > Cylinder.

A better title might attract someone who knows the answer to this. Perhaps something like "Operator properties greyed out" or "Bottom of toolbar inactive" - assuming I'm understanding the question right myself. It's not an uncommon problem.

I appreciate the advice and will definitely put it to good use, however not everyone is familiar enough with the proper way to format a question so people will answer it. If we want this site to be a resounding success we are going to need to be a bit more flexible and patient with beginners. After all, we are here learn and BECOME experts.

So become one . . . :D

It's likely caused by one (or more) of the many add-ons you have enabled. Try launching Blender from a console/command-prompt and see if any errors are being reported. Failing that you can go File>Load Factory Setting and start enabling stuff while checking for breakage.

Ok, what I did was similar to this answer except that I got rid of the startup file in the config directory and then restarted. Low and behold everything was back to normal. Just had to redo my layouts.

Make sure Global Undo is enabled.
For 2.8x and 2.9.
Edit > User preferences > System > Memory & Limits: Global Undo

For 2.7x use  CtrlAltU > User preferences > Editing > Undo:

That panel is called the redo panel, because when you change a setting on it, blender actually redoes the previous operator with the new settings.
If blender can't undo the previous operator first, running it again will add it's effect on top of the result of the previous operator (which is not the desired effect at all).
So this panel is disabled when undo is not available.

Ok, this happened to me again and I have figured out what the problem is/was.
If you are rendering with Luxrender and have sent a render off to Lux, while it is rendering it will not allow access to the operator panel. I guess I'm a bit thick not to have figured this out before but there it is.
As soon as you stop the render in Blender you have access back again. This won't stopp the render in the Lux gui if you are using that though, so you can still continue the render and work in Blender at the same time.
Hope that helps

This happened to me for whatever reason, enabling Global Undo in the User Preferences > Editing panel made it all good again.

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


text:
Alpha channel through glass material instead of background
I'm trying to render some windows, reflecting an environment map, and to be transparent to let light enter inside the house. There are two windows facing each, and I need to see through both, and keep the alpha channel here.
Here are the window's material nodes that do (half) the trick :

But, as you can see, there is no reflection on windows, which is needed. The is Camera Ray is overriding the reflections too. But if I don't add the is Camera Ray to the is Shadow Ray, the background is rendered instead of alpha channel:

Is there a way to have a "glass" material with reflections of an env map, light passing through and alpha channel through?

Well, thanks @RayMairlot, this should have answered, but only partially (see my edit).

@Polosson I realized that, and edited my answer with another solution which should answer both this question and the other, provided I understand correctly. Have you tried using a transparent shader?

Well, thanks @gandalf3, I tested your second solution with not much luck. And yes, I use a transparent shader, mixed with glass shader by a "light path" (as shown in the screenshots). The problem on your solution is that with the Fresnel node it doesn't work... May be an angle of camera view story... Thanks anyway!

@Polosson Are your windows made of 2D planes? Try using the Facing output of the Later Weight node instead.

@gandalf3, no more luck with the Facing output of Layer Weight. The blend setting swaps from one situation to the other (reflexions and no alpha / no reflexions with alpha). I tried to play with Light Path to drive this blend setting, but no combination works.

Well, keep in mind that at shallow angles real windows will reflect almost all the light that hits them and goes into the camera. If you always want the window to be a mix of reflections and alpha, no need to plug anything into the factor input. Just set the mix factor directly.

@gandalf3 well, you're totally right, using manual mixing works fine. But, with a bit of tweaking I found that using the Layer Weight (with Facing output), and playing with the blend setting is more accurate in my case. Tell me if you want me to write an answer? Or, please do. Thanks a lot anyway!

By mixing a glass or glossy shader with a transparent shader based on a fresnel node, rays will be allowed straight through the glass at smaller angles of incidence, and will reflect at grazing angles. Rays which go through and reach the environment background will give alpha transparency:

Note that the Fresnel node is not necessary for mixing (setting the factor directly will get something like what you are looking for), but it does make the reflections of the material behave in a more physically based manner.


text:
How to make this kind of "bumpy" mesh to model without Sculpting?
I wanna make a table with this texture (image)
Actually its not a texture, its mesh. How can i get this result without sculpting ?
Like handmade*

It is exactly a Voronoi texture stretched along one axis. What is your question precisely ? You could use a Displace modifier for example.

Do you truly need the geometry to be real? If this isn’t going to be 3-D printed, you probably don’t.

Yeah,i am gonna print it in 3d. Thanks for advice! Gonna try Voronoi !

I did this in Cycles but I think it works in Eevee too.

Add a Plane and subdivide it several times.
Add a Displace modifier.
Click the New button and click the little switches icon Show Texture in Texture Panel. This should take you to the Textures tab with the texture you have selected. Open.
Inside the Textures tab in the Properties panel, choose Voronoi as type.
Adjust the values inside the Voronoi and Feature Weights to achieve the appearance you are after. You will need to scale the plane on the x or y direction to achieve the elongated divots.
Once you have the look, duplicate your mesh.
With the duplicate selected under Object in Object mode, select Apply > Visual Geometry to Mesh.
Apply the scale and export to .stl.


text:
Normal map doesn`t work on Blender
Painted model in SP. Created Normal map.
But in Blender there are artifacts, it doesn`t show any normal map effect. But mesh gets Sharper...
+Normal map applies with wrong UV (Applied Texture Coordinate - didnt work...)
Here some images from Blender and SP.

if Jo xXx's answer is not good, please pack the images and share the boot object: https://blend-exchange.com/

Didn`t work. Uploaded Blender file (with Packed images) :

thanks but I can't see any image, you need to go into File > External Data > Pack Resources, then save

Sorry,my bad:     uploaded )

Switch the Normal Map from Object Space to Tangent Space?

moonboots is right, change to tangent space. Also make sure your normal map texture is set to non-color.

Switch the Normal Map from Object Space to Tangent Space:

Thanks Everyone!! Will keep it in mind  :D

@AlmasIskak May I recommend to apply this : What should I do when someone answers my question?

Maps made in Substance Painter (and designer) are by default optimised for DirectX, whereas blender uses OpenGL for its shading calculations. Often, to look correct, you need to give the normal map a DirectX to OpenGL Conversion (Highlighted Below):

Try setting the photo color space to non color.
A good idea is to add an input vector from its source object. You can set this up like so:


text:
How to apply only one axis Transform?
I have a model which rotation is x-38. y-30. z-40. (for example)
How can i apply only "X" axis ? And keep other rotations the same.
Is it possible ?

You want to apply only $x$ rotation, so assuming your Euler order is XYZ (or assuming the axis you want to rotate by is the first non-zero rotation), all you have to do is to hover your mouse over that rotation, ✲ CtrlC, $\color{green}{█}\color{#888}{0█}$ click, type zero 0↩ Enter, go to Edit Mode ⭾ Tab, RXX to rotate around local $x$ axis, ✲ CtrlV to paste the copied rotation value.
However if the assumptions were incorrect, it's tricky to think on what exactly should "applying a single rotation axis" be; I imagine it should be making setting a single rotation to $0$, keeping all other properties unchanged, and keeping the appearance of the object unchanged. I think the best way to achieve that would be to press ⬆ ShiftF4 and paste the below code into the console:
coords=[C.object.matrix_world @ v.co for v in C.object.data.vertices];
C.object.rotation_euler.y = 0
mat = C.object.matrix_world.inverted()
for v, co in zip(C.object.data.vertices, coords):
    v.co = mat @ co

C.area.type = 'VIEW_3D'

Make sure to change the 2nd line if you want to apply a different axis than $y$.

@RobinBetts You're correct, I think at first I rotated in both object and edit mode, and then changed the technique to a little more efficient. Impressive you caught the error :)

Phew! I had to check ... UV'd you, and then thought... hang on a minute! :)

If you wanna apply something other than rotation_euler, remember not just to replace the axis letter, but the word for the kind of movement as well, such as location.


text:
How can i achieve this model with pops on it?
I`ve made a lot of models. But stuck here...
How can i achieve this curve figure with pops on it.
I can make this curved model of Ice cream. But how to attach this round pops on its surface with smooth holes, with exactly distance and etc.?
I tried with Array - Curve along this path, but i get "shattered" topology...
Maybe someone knows the way to get this figure.

https://blender.stackexchange.com/questions/5910/how-do-i-prevent-object-distortion-when-applying-a-curve-modifier

You can create this mesh and this spiral curve:

Then give your mesh an Array modifier, a Curve modifier with the spiral as object, and a Subdivision Surface. Decrease the radius of the top vertices of the curve:

Yeah,i tried this. But u see, some pops were deformed.. so i cant solve this, to get exactly round pops/holes (

the sphere can be another object that is instanced


text:
How to make holes in chair like in this picture?
Does anyone know how to properly make this holes in chair ? Without boolean. With good retopology.

It looks like this is a good starting point: Modeling hexagon pinhole lens for 3D printing (subdivided hexagons become circles)

If you already have the shape of the chair then you could make the holes separate and use shrink-wrap to project them onto it. Then duplicate the chair chair surface and manually cut a whole in it to insert the hole grid.
As for good topology, maybe something like this?


text:
Why are there Topology artefacts in Unity, but can`t see in Blender?
When i check model in Blender - everything is Ok*
But in Unity, even in PAINT 3D - there are artefacts in model. How can i see it in Blender and anticipate topology errors in Unity?

Impossible to say for sure without more information, but it looks as if you have n-gons in Blender and Unity probably triangulates them automatically and fails at that. You should make sure you don't have n-gons and concave faces in your model - you could simply triangulate the mesh in Blender.

"in Blender - everything is Ok" It isn't, the problem is just hidden away. Looks like you abused booleans and are now paying the price for it. The issues of bad topology become visible in Unity.

Apply modifiers and triangulate in Blender, only then export mesh to Unity.
Also, this looks to be mesh made with booleans. Boolean is not going to give you a clean topology. Rather apply boolean and make sure in Blender that the topology is ok.

Sometimes this is overkill, and simply selecting everything and doing Mesh > Cleanup > Split Concave Faces is enough.

For anyone wondering, it's because Unity (like other game engines) doesn't support N-Gons and automatically triangulates the mesh when imported. But it doesn't do it the same way as Blender, hence the discrepancies.


text:
How to select multi particle systems and modify their properties together
I noticed that we couldn't multi-select particle system, so I could not use copy_to_select button.
Is there a way to select multi particle systems and modify their properties together(e.g. render_step)?
Any help will be appreciated.

so you have only 1 object that has multiple particle systems?

yeah, and I want to modify those particle system together.@HarryMcKenzie

unfortunately it seems you cant select multiple particle systems in the list. if it was possible you could change a property value and hold down Alt while pressing enter to confirm the input. Do u have tp repeatedly change values and how many particle systems are there? python seems like the only way. just loop throught the particle systems list and set each value.

You can write a script in the Text Editor and make a list of all the materials and assign an ID to them. In this script ID=1 relates to Material.001. So if you want another material to be assigned to all the particle systems, just assign another value for ID and click Run Script in the Text Editor. show_emitter is the same for all particle systems assigned to the same object so you don't really need to drive it. You can do similar script for all the other properties in the particle system. Just right click a property and select Copy Full Data Path and paste it into Text Editor to see the property that needs to be manipulated. Let me know the full list of properties that you need to control and I will update the answer.
import bpy

ID = 1
show_emitter = True

obj = bpy.data.objects["Cube"]

material = ""

match ID:
    case 1: material = "Material.001"
    case 2: material = "Material.002"
    case 3: material = "Material.003"

for particle in bpy.data.particles:
    particle.material_slot = material

obj.show_instancer_for_render = show_emitter

Yeah, we have the same idea! I have made a button to to make all particle systems' properties consistent with the first particle system. But the operation is uniform, and I can't choose just two or three of them. So I want to
make a multi-select list widget so that I can pass the selected items into the list and iterate over them. https://blender.stackexchange.com/questions/271847/how-to-make-a-list-widget-which-can-allow-me-to-multi-select-items

This is a use case for Custom Properties/Drivers.
You'll notice this little "Custom Properties" tab at the bottom of almost every panel in the Properties Menu.

Where you put these Custom Property is dependent on how high you want to the "scope" of the property to go. If you put it in the Particle Property panel, that value will be limited to that particle system (not what we want), if you put it at the bottom of the Object Properties panel it will be limited to the current object, if you put it in the Scene panel it will work with all objects in the scene etc.

It depends on the situation, but for this example and for longevity I'll use the Scene Panel.
So, add your Custom Property and edit the name of prop (has to be a Python friendly syntax, i.e. no spaces, snake case, all lower is typical), as well as the format and Min/Max values. The Time Step property in particle systems uses float so we'll stick with the default.

Then once thats done, right click the value and select Copy as New Driver.

Then go to whatever values you want it to control in both particle systems and right-click > Paste Driver.

If you want you can split the Properties pane into multiple versions, and have one with your properties open, which makes for easy editing.
Result:

Thank you for your help! It's a good idea. But I notice that the custom property can only be float/float array/integer/integer array/string/python type. How can I make 'material slot' or 'show emitter' a driver?

I think you can use drivers to control Boolean values with a technique something like this, for the material slot you would probably need to dive into a Custom Particle properties panel written in python, which wouldn't be too terribly difficult. You can use the templates from the text editor under Templates > Python > UI Panel ... to get you pretty far, and then maybe a custom operator that just loops over the objects particle systems and sets the values to the properties in your panel.


text:
How can I copy objects without linking data via python?(deepcopy)
How can I copy objects without linking data via python?(That is deep copy the object data.)
I'm using this to copy objects, but the new object's data linked to origin.
obj=bpy.context.object
obj_data = obj.data.copy()
obj_1 = obj.copy()
obj_1.data = obj_data
bpy.context.collection.objects.link(obj_1)

I don't want this result.
I want this:(CTRL+C CTRL+V)

How can I make it via python?

I just hit on the idea myself!
new_obj=[]
for obj in context.selected_objects:
    # duplicate the object
    obj_data = obj.data.copy()
    obj_1 = obj.copy()
    obj_1.data = obj_data
    bpy.context.collection.objects.link(obj_1)
    new_obj.append(obj_1)
bpy.ops.object.select_all(action='DESELECT')
for obj in new_obj:
    obj.select_set(state=True)
    context.view_layer.objects.active = obj
    bpy.ops.object.make_single_user(object=True, obdata=True, material=True, animation=False,obdata_animation=False)


text:
Moving objects to a location
This is probably a simple thing I'm just overlooking.  When I move an object, it moves the amount I enter.  I would like it to move TO the location I enter instead.  What I need is the plane representing the floor of my model to move to the zero location of the Y axis.  When I enter G, Y, 0 it goes nowhere, of course.  When I enter G, Y, 1 it moves 1 from where it started.  How can I get to move to the location I specify?
Thanks for your help.

if you open the 3D view right panel (press N) > Item tab, you can use the Location values and press what you want, is it what you're looking for?

Yes, that helped a lot.  Thank you!!


text:
Need to share with non Blender users
I'm on a committee to remodel the stage and platform at our church. I have our ideas modeled in Blender 2.80 and would like to share the final product with the team in a way that they don't need to have or understand Blender in order to view or interact with it.
How can I do this?
Thanks for your time and effort.
James

Does your model need to show materials? If not, you could use an online viewer like this one - https://3dviewer.net/. It accepts .obj files, which blender does export, but you have to color it based on the website's rather limited options.

Mmm.  Yeah, it really needs to have the colors and textures included.  The remodel is going to include painting, adding wood accents, lighting, as well as rearranging the piano and drums.  So far, I have just sent screenshots of different points of view.  I really wish there was a way I could just send them the model itself so they could move it around and look at it.  They are all capable of figuring it out but it would not really be worth it just for this.

I'm sure there is a way - take this example from sketchfab - it's from someone who's selling a model, but there may be a way to just upload it on it's own (without selling). - https://sketchfab.com/3d-models/stage-set-for-la-boheme-opera-50c524ec00934949bd94b5afc7cb2e94. Info about uploading is here, but I noticed there's a 50mb limiit for the "basic" profile. I assume that's the free limit - https://help.sketchfab.com/hc/en-us/articles/202508836-Uploading-3D-Models


text:
Facial movements distort the face of the character when auto-rigged in mixamo
I tried to upload my exported model in mixamo and did an auto-rig. All the other parts seemed to be rigged nicely, apart from the face and the hair. As they move, the hair and head get distorted weirdly… Now, I have a list of questions :
A. I tried to export the auto-rigged mesh to blender again to see what is the problem. Would this be something to do with weight painting? Should I consider rigging without the hair and then parenting the hair to the head bone after the rigging is done? At this stage, I am not considering for a face rig, but just be able to have my mesh to replicate all the animations from mixamo so that I can use it in game engines.
B. Another factor that I am considering which might have caused this problem is that all the modifiers were not applied before the export from blender. Would this be the part of the problem?
C. Last but not least, when I uploaded the obj. file in mixamo initially, all the materials were lost. How do I import the mesh into mixamo with the materials and textures that I used to have in blender?
Here is the project file extracted from mixamo : https://drive.google.com/file/d/1NZm-1OJrRbtS6YWrBGpbd0CydHZA3zZl/view?usp=sharing[![enter image description here]1]1

Im not sure about the distortion, but if you want your materials to show up in Mixamo just take the .obj and the .mtl of the model and zip them. (select both files, right click, --> send to ---> Compressed Zip) Then upload the entire zipped folder in Mixamo


text:
Baking normal for high poly sculpture not applying to low poly mesh
I will list the steps that I did -
I opened the high poly mesh that was initially sculpted, with multires modifier on. (I did not apply the modifier)
I duplicated the high poly mesh and made a low poly mesh using decimate modifier in the collapse tab with the ratio of 0.1.
I UV unwrapped the low poly mesh, created a new image with default settings.
I created a new blank material for both the high and low poly mesh and applied it to both of them.
I opened the shade editor, and added a image texture node with the image created before opened up.
I turned my render settings to cycles, GPU compute, and selected the high poly mesh and baked a normal map using the ‘bake with multires’ setting.
Once the map is baked, I created a normal map node and connected to the material node to complete it.
However, nothing seems to be happened… What would be the problem? I think the problem is in the unwrapped UV of the low poly mesh, but it is only a guess and I am still not sure…
https://www.youtube.com/watch?v=bFOkHxZzVZ8 This is the tutorial that I followed.
https://drive.google.com/file/d/1FAElBG4TOwq6HVqRG3IiGr1LBfk6O9MC/view?usp=sharing Here is the link to the file.

Bake from multires only bakes the information of the multires onto the same object. Since you used the decimate modifier, you probably changed, if not destroyed the UVs. That's not the option you need. You need to bake the normals with the option Selected to Active checked, with your highpoly selected and your lowpoly active and slightly inside the high poly. Do check the UV map of your low poly one though.
Also: Make sure to check the normals in rendered or shaded view, your screenshot is a bit too low res to really make out what's going on.

Thanks for the response.. So it is the decimate modifier creating all this mess to the UV.. I only did it to reduce the number of polygons. Should I then just duplicate the high poly and then simply remove the multires to make it back to low poly? Also, whenever I unwrap the UV, the UV shows up like the photo above with all the vertices crammed into one side, which certainly shows that there is a problem.. How should I fix this?

I couldn't find the crammed UVs, but that's the case with a non-existent or destroyed UVmap, You could still use the decimate modifier in planar mode, just make sure you check Delimit UV.
Or re-unwrap your model after decimating. Doesn't have to be perfect, since you're baking not painting.

Whenever I open up my UV editor of the low poly mesh, the UV seems to be unwrapped already and yet the UV is all squeezed to the left side. Isn't this the one that is causing the problem?

then re-unwrap it

Ok.. how do I even do that.. First of all can I even undo my UV unwrap?

no need to undo it, go into edit mode and press U -> smart UV project. It's not the cleanest way, but in your case it should get the job done


text:
Modelling an amphitheater/hemicyclic rows
I'm quite new to Blender, I started using it for a project which requires me to 3D-model a theatre. Up until now, I've somewhat managed to do what I wanted thanks to online tutorials, but now I'm facing a problem for which I found no solution/tutorial/help on the internet. The problem is : how can I model a hemicyclic fly of rows (such as in antique amphitheaters) ?
Something like this (I don't own this pic) :

I've tried to model a single row, make it follow a curve/path, and then use an array modifier to reproduce it, but the result is not correct, as it's just a bunch of steps with a fixed curvature - not following the radius augmentation of a (hemi)circle.
I guess I need to use a circle mesh and somehow model the steps along it, but I can't seem to find the proper way to do it.
Any help will be greatly appreciated...
Thanks for your attention !
BONUS (lol) : it's actually even more complicated that this technically, because the theatre I'm modelling has curved side walls as well. And the stairs inbetween rows follow this same curve. I don't even know if this is do-able at all.
Here's a very ugly sketch to represent the room's layout :

You could try it with the Simple Deform modifier and its Bend mode but I'm not sure it will fit your need (not sure to understand your drawing). Anyway you can try with whatever method then apply the modifiers and finish it manually

i think this could be done via GN so you would have a lot of flexibility. But...of course...you need to have some knowledge of GN to do that.

This is a "dirty" GN solution, which - hopefully - some GN pro's will improve.
But i think it is a good starting point and maybe you can use already some ideas of this.

and by the way: my first community wiki answer - so i will not receive any reputation from this...and all other won't too. But i hope some guys will nevertheless have fun helping here ;)

feel free to download, change and upload better version of my "dirty" blend file

Woooow, thank you for your time ! I'm not familiar with GN, but I guess I'll give it a shot and learn ! It looks... quite powerful. My other concern now (as below) is with the placement of the small steps, as here, they are rectilinear, but in my original theatre (I work with plans of a real place), the stairs are curved (as in my ugly sketch which is probably not very helpful lol).

Here is a try with a Simple Deform (Bend mode), it would work with a Curve modifier as well. If it doesn't fit your needs please precise in what way:

Thank you for your time ! I thought that was the solution I had tried, but mine did not look as neat; I'll give it another shot. My problem now with this option is the placement of the stairs (small ones) : here, the stairs are rectilinear. I need them to follow a curve (as in my ugly sketch). I tried doing a separate object and bending it in other axes, but it did not give the proper result, because I need to curve not each step, but the stairs as a whole - if that makes sense. Maybe I can try and figure that out by placing the small steps along a Bezier Curve or something ?


text:
Convert animated 3d curve to Grease Pencil
When I select the curve and do convert to -> grease pencil the animation is lost. This is really frustrating.
Is there any way to maintain the animation of an animated 3d curve? In my case I use an alembic import.

Could you tell us more about the animation you're trying to keep ? If it's the position of the object in 3D space, it's easy to transfer from one object to another.

It's not only the object (transform), but also the shape that changes :/

Maybe you've already seen it, but this topic shows many ways to convert curves to Grease Pencil.


text:
Face Model Disappearing When Rendering
I'm currently working on my first portrait design and recently all of my renders have been coming out with my main head model completely missing, leaving only the eyeballs and hair particles. Initially, everything was working just fine but when I added a particle system for peach fuzz, that's when the head started disappearing in my renders.
Some more context: the facial textures are pretty hard on my computer so I usually don't add them until I'm ready to do a test render, so maybe whatever is causing this whole thing accidentally happened while I was add those image textures. I'm also using GarageFarm to render everything.

maybe you've disabled the render option for the emitter in the particle system panel?

Is the face the particle emitter for the hair?
If so, go to the Particle Settings > Render. Check if Show emitter is checked.


text:
How can I create a ellipse gradient on flat plane?
I need to create a ellipse gradient to be used as a background in a animation but all I managed to do so far is this circle it works great but no matter what I try I cant change the shape of it.

Gradient Texture with Generated Coordinates will do it in a way that scales to the size of the object, but you need to do a couple of operations on the coordinate space first.
The Subtract and Scale nodes here are Vector Math nodes.  The Mapping node then controls the size and position of the gradient.


text:
How can I make a dashed line on a road that completely follows a curve?
I want to create a dashed line in the middle of a road which follows a curve using Geometry Nodes.
The problem in my current setup is that the individual 'dashes" don"t follow the curve since they are defined as cubes. This causes them to disappear at certain places or float a bit above the surface.
Would it be possible to make the dashes follow the road in the same way the full white lines do?
The Blender file is in attachment under the images.

In order for the geometry not to overlap with the other, it would have to follow exactly the topology of the road.
You can solve that this way:

Here I use the same curve that you use to create the road, but convert it to a mesh line.
This way I can delete single points, so that gaps are created. These mesh lines are then converted back into curves, so that these segments do not differ from the original curve in terms of the position of the points (apart from the gaps).
Finally, as with the other objects, you convert this curve to a mesh using Curve to Mesh.
(Blender 3.2+)

This is great! :-D I wouldn't have found this solution by myself. Thanks a lot Stephan! A paypal coffee is underway.

@PieterLéon Always a pleasure! Thanks for the coffee!


text:
Make every extrusion faces camera
I have a Curve. It contains lots of splines.
(Here I simply take two splines as an example)

Now i extrude it.

Now i want make all the extrusion face the camera.
That is，I want all spline extrusions to rotate along the spline axis when the camera rotates.(to simulate the cylinder effect in the camera view)
Any help will be appreciated.

This might be possible with geometry nodes, but I imagine it would be very complex. Why not just make them actual cylinders?

@TheLabCat Cause I have millions of splines, it takes more time to render if I bevel it to cylinders. Could you please tell me how to do it with geometry nodes?

Is this what you want?

I made that with the Geometry Nodes Modifier.

This node tree will extrude any spline. The extrusion is oriented to the camera while still following the curve tangent.
What it does is create a face line position it in the curve points with an offset to the sides, the sides being the $X$ axis of a rotation in which the $Z$ axis points to the camera, while the $Y$ axis points to the curve tangent.

$$\text{The Way It Works}$$
First, a grid is created. Y vertices = $2$; X vertices = curve's point count.

That way, it's vertices are ordered as this image shows:

The grid's vertices are ordered as: indexes $0$ and $1$ are for right and left of the curve point with index $0$; indexes $2$ and $3$ are for right and left of the curve point with index $1$; and it goes that way for all...
Now it needs to set the vertices of the grid to the curve position using the index to select the curve point. For a point in the grid, it's position is set to the position of the curve point with index equal to $\lfloor i \mod 2\rfloor$ where $i = \text{vertex index}$. The position is accessed using a Transfer Attibute Node with the curve as source and index as mapping.

Now the pair of vertices of every curve point is in the curve point's positon. The next step is to offset them to the extrusion direction, which is calculated by the following way:
For a point in the curve, a vector pointing to the camera is calculated by subtracting the point position from the camera position. After that, the vector is used to create a rotation that points the $Z$ axis to the camera. Then it aligns the rotation's $Y$ axis with the curve point's tangent, here it uses the $Z$ axis as pivot so it doesn't change.

the resulting rotation's $X$ axis, now points to the side in relation to the camera and curve direction.
Now the vector $(0.5, 0.0, 0.0)$ is rotated with the calculated rotation, this is now the extrusion direction. $X$ is $0.5$ because the curve point is the extrusion center, so the left and right vertices needs to be transformed by half the extrusion length, but opposite directions.

Now for offsetting the vertices of the grid, we first transfer the offset from the curve's points using the same way as for positions.

Before plugging the extrusion direction in the offset socket, it is first multiplied by: extrude length, if vertex is from right side; If not, negated extrude length.

Now faces are facing the camera, but, if there's multiple splines, they will be connected:

These connecting faces needs to be deleted, so a way to is needed.
First, the spline index is captured in the curve, with that it's possible to tell from which spline a point comes from.
A face connecting splines is the last face of it's spline index, so we can select them by verifying if the spline index of the next face is different.

And finally faces are deleted using the selection of connecting faces.

Oh my god, this is exactly what I want! Thank you so much. Could you please help me to explain its theory?

@Tac no problem. I added an explanation to the answer. I also corrected an error and made a change in the nodes. The blend file was also updated.

I am making note of this answer to be part of my continued math class when I am awake enough to read and understand all of it.

Thank u very much!! You are so kind!! Sorry to disturb you, but when I tried to make this complex geometry nodes group link to a new file (That is make it a node template) and changed the camera, there was a problem with curve extrusion in the new file. It has the wrong direction and will twist. Thank you very much for your help and sorry to bother you again.@Hulifier

@Tac I fixed and error in the nodes, the Object Info Node for the camera was in Original mode, but it should be Relative, sorry for that. See if changing that fix it. I updated the file and the images in the answer.


text:
My animation suddenly won’t move despite the timeline moving like normal?
Im very new at blender. I’m doing polygon runway’s 3.0 spaceship loop tutorial. I’m around 14 minutes in at the point where I need to actually animate the ship itself.
At the time, the animation was running smoothly. The ship didn’t move but the walls were animated to move. The next step was to animate the ship moving side to side.
I moved the ship with auto keyframe and I hit play. Somehow, suddenly my entire animation won’t move. The timeline goes forward like usual but the entire scene stays still.
This is probably an easy fix but I just don’t know what to do and, as a newbie, it has me worried.

Don't get too worried, you should have my "MyFile.blend1" and "MyFile.blend2" backups in your folder that you can recover from.

maybe share your file? https://pasteall.org/blend/


text:
Why are my textures bending on quads?
I'm making my first Blender model, a low poly humanoid. After texturing most of it in traditional UV style (just seam + unwrap) I realized drawing on this type of texture is not exactly ideal..

It's nearly impossible to make things line up across faces, or even in the same face on the far ones, which are warped pretty severely.
So after some research I decided I'd square my UVs like they did in the days where low poly was necessary, given that the ease of drawing straight lines on a texture is cited as one of the biggest benefits. I paid for UV Squares and gave it a whirl, and..

The texture is bent in the middle, where the quad is being split into triangles. How Do I remedy this? I've tried Clean Up > Make Planar Faces, installing Loop Tools and flattening all my edge loops, moving things vertex by vertex, nothing seems to work. I've seen plenty of low poly models with non-rectangular quads that still use square UVs, what am I doing wrong?

you probably have 2 solutions, either don't square the UVs, or create loop cuts in order to add topology and remove the triangulation effect?

Try cube unwrap as your model  seems angular.


text:
Strange Travel Path in Quick Smoke Simulation
Every time I run a quick smoke simulation regardless whether it is in a new or existing file it creates this strange travel path where it goes off to the side and looks like it gets cut of on the top.
Any suggestions on what I can do in the settings to stop this from happening?
thanks.

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

You may just need to up the resolution divisions. If not, please include the .blend file as it is hard to figure out the problem without it.


text:
Help with export button (exporting fbx)
Im in need of some python help or someone with more knowlage with python, tryn to update an old 2.7 scrip to 2.8 and so far so good until clicking on export button. i get this error when using a relative path and the same using a custom path but on line 1638
NameError: name 'FBX_Export_Actions' is not defined , line 1636, in execute

This is the error lines within my class
#FBX Export button
class FBXEXPORT_OT_button(bpy.types.Operator):
    """Button for Fbx Export"""
    bl_idname = "ue.export_fbx_button"
    bl_label = "ExportFbxButton"

    def execute (self, context):

        ActualPath = dirname(bpy.data.filepath)

        if FBXRelativeFolderSelector == True:
            if ActualPath == "":
                self.report({'ERROR'}, "You need Save the file for use save automatically into a relative folder")
            else:
                FBX_Export_actions(self,context) #this is line 1636
        else:
            FBX_Export_actions(self,context)     #this is line 1638

        #print("test OK")
        return {'FINISHED'}

I can see the problem is within FBX_Export_Actions (maybe not being defined right?)
    #Init button
class INITUETOOLS_OT_button(bpy.types.Operator): #InitUEToolsButton
    """Init Main Properties"""
    bl_idname = "ue.init_button"
    bl_label = "InitButton"

    def execute (self, context):

        Main_UI_Properties(bpy.context.scene)
        SetObjScale(bpy.context.scene)
        Rename_Properties(bpy.context.scene)
        FBX_Export_Properties(bpy.context.scene)
        Animation_UI_Properties(bpy.context.scene)

        global Init
        Init = True

        return {'FINISHED'}

    #FBX Export Actions

    def FBX_Export_actions(self,context):

        if FBX_PivotToCenter == True:

            global FBX_name_multi

            scn = context.scene

            sufix = 0

            #Create group

            group = "exportgroup"

            if group in bpy.data.collections:
                print ("Group already created")
            else:
                bpy.ops.collections.create(name="exportgroup")

            ActionGroup = bpy.data.collections["exportgroup"]

            bpy.ops.object.select_all(action='DESELECT')

            Get_Custom_ExportName("String:   ", 'FBX_Custom_Export_Path', scn)

            #Group Operation

            for ob in ActionGroup.objects:

                print(ob.name)

                ob.select = True
                bpy.context.scene.objects.active = ob
                bpy.context.view_layer.objects.active = ob

                if FBXBaseNameSelector == "Object":
                    FBX_name_multi = ob.name
                if FBXBaseNameSelector == "Custom":
                    FBX_name_multi = FBX_CustomExportName + "_" + str(sufix)

                #Store initial position
                obStartPosX = ob.location[0]
                obStartPosY = ob.location[1]
                obStartPosZ = ob.location[2]

                if FBX_ExportCollision == False:
                    print("Collision Not Exported")
                if FBX_ExportCollision == True:
                    FBX_SelectCollsionObjects (self,context)

                #move object to center
                bpy.ops.view3d.snap_cursor_to_center(false)
                bpy.ops.view3d.snap_selected_to_cursor(use_offset=False)
                ob.location = (0,0,0)

                #Export
                FBX_Export(self,context)

                #Move to initial position
                ob.location = (obStartPosX,obStartPosY,obStartPosZ)
                bpy.ops.view3d.snap_cursor_to_active()
                bpy.ops.view3d.snap_selected_to_cursor(use_offset=False)

                ob.select = False

                if FBX_ExportCollision == False:
                    print("Collision Not Exported")
                if FBX_ExportCollision == True:
                    FBX_SelectCollsionObjects (self,context)
                    bpy.ops.object.select_all(action='DESELECT')
                    #FBX_Make_Only_selectedObjLayer_visible (self,context)

                sufix = sufix +1

            bpy.data.collections["exportgroup"].user_clear()
            bpy.data.collections.remove(bpy.data.collections["exportgroup"])

            #print("pivotOK")

        if FBX_PivotToCenter == False:
            FBX_Export(self,context)
            print("Export normally")

It would be a great help if anyone could take a look over this code and help to pinpoint this error.

Hi and welcome! TBH: There are several naming and reference issues in the script so I don't think it's worth it fixing the bugs. I recommend have a look into the templates that come with blender and start from scratch. What exactly the add-on is doing? Just exporting individual objects of the scene for unreal? Maybe related: https://blender.stackexchange.com/a/169820/31447

Hey and ty for the welcome @brockmann, This is an old 2.7 addon (Created by Lluis Garca https://www.lluisgarcia.es/ue-tools-addon/ ) for exporting to EU4, im not so python savvy and have tryd to contact him but seems he has no plans to update, so have took it on myself to attemp to update it although im really only looking for the Exporting tools and after a week of fixing errors and bugs have been thinking it may be alot less hastle to create a new scrip from scratch^^
Thank you for the link (will be taking notes from it)

also This is the idea i have/looking to accomplish -  https://www.dropbox.com/s/oxeg3fibd3ang8o/Capture.PNG?dl=0
Iv been going over as many resources i can find online and examples ect but still getting to grips with python... If you have any ideas on how to create such a script that would be greatly appreciated

Check out the answer I've posted, all in there. To get such interface you would have to declare the properties like use_selection_setting, axis_forward_setting in your export_helper class and they will appear in the properties area of the file browser, done. Or check out the templates that come with blender as mentioned (text editor > templates > python)... Had a look at the original script and I still think this is crappy IMHO.

Will do thanks for your help


text:
Confusion while Hard Surface modeling the Spaceship
I just want to know, What is the ideal approach to model marked area of spaceship based on the respective Model sheet. When I model it as single object it requires a lot of time for Topology.

This artist has used many techniques.
You have done a good job seeing the segments.
A combination of the suggested techniques may work for you.  Here are some ways you could model segments like this in Blender.
A. Checker select, inset, simple deform with a "twist"
Create a cylinder with quite a few subdivisions
Select the edge loops and press F3 to search for checker select, and then inset some of the loops with the I quick key.  Size them down.

Then, apply the twist modifier.

B.Array, Curve modifier, and Boolean
create some square curves with rounded sides and lay them out so they are one row of your pattern.

Add a solidifier modifier to these

Add a bezier circle and a cylinder with exactly the same origin points. The bezier circle will be the guide.
Add an array with "fit curve" selected, choosing the bezier circle as the curve. Choose either relative or constant offset and position everything according to the design.
You need a curve modifier as well, with the bezier circle as object.

You can boolean quite a bit of detail into the engine at this point.  You may have to do more than one boolean to get something you are pleased with and combine it with the other segments you have created.

Of course, there are more techniques involved in the other sections to research.

Thanks for the suggestion. These tips gonna help me to do much more faster

I would model the elements separate. There are a number of ways you can approach. One way would be to use spin.
Select your object, go into edit mode.
change your view to above the object.
select the vertices and move them off center of the origin. Spin will use origin as the pivot point.

with the vertices selected press alt E, and choose spin.

you can adjust with the menu at lower left part of screen. You might also look into arrays being controlled by empties. Good luck!

The real thing seems to have been constructed from separate parts, so I suggest you follow this approach in your model...

Thanks for your help.


text:
Combining low sample renders has more noise than one large render
I am trying to create a script, that would allow me to merge multiple images, rendered with different seeds and different sample amounts into one image with a higher sample amount.
The script is using blender compositor nodes.
At start it seemed to work, but upon closer inspection, some brighter parts of the rendered image are noisier than one image rendered with the same sample amount, as the combined image.
Below i'm attaching two renders from the Blender classroom scene, the first one is rendered with 1000 samples, and the second is a merge of 300, 300, 200, 100 and 100 samples.
https://i.sstatic.net/x3qz9.jpg
https://i.sstatic.net/OGNk5.jpg
At first glance, the images are similar, but the difference can be spotted if you zoom in at the top of the board, where it is lit up.
Also, below i'm attaching the node setup, that my script generated. The number in the name of the files shows with how many samples it was rendered.
https://i.sstatic.net/VI3qI.jpg
My question is, is there some "magic" that blender does to make those large samples renders look better, and if yes, can i mimic it somehow in compositing? Or do i have to tweak some render settings when rendering those images for merging.
The images were rendered with direct clamping set to 0, and indirect to 10.
Also it was rendered in blender 3.0.0, with Cycles X.

I don't know, it seems logical to me that rendering higher samples yields better results. Otherwise I bet this kind of optimization would already be done internally and it wouldn't make sense to hack the compositor in that way. Are you adapting this workflow from another pipeline where this yields better results ?

I'm not really trying to get better results than the natural workflow, my goal is to render a single image on multiple pc-s. I did base my algorithm on this posts:
https://blender.stackexchange.com/a/21809/101111
https://blender.stackexchange.com/questions/3720/creating-renders-from-image-stacking-using-different-sampling-levels?rq=1
And mostly i'm curious if it's possible to reach the same level of quality with this method.

And if not possible to reach the same level, then if they are some ways to improve it at least a little bit.

Oh, alright ! Makes sense. :) Maybe you should see the comment chain on this other Q&A https://blender.stackexchange.com/q/243558/86891 as a matter of fact you may be pleased to see the feature is planned for Blender 3.1 which you can already download and test https://developer.blender.org/rBc63e735f6b601e662fbb1ed5d7a71293552d6720

Wow, thank you so much. I just tested that feature, the merged render is identical to that rendered on just one machine, down to one pixel.
Seems that rendering with different seeds messes with areas of high noise, as the noise has a different pattern each time.

Hello and welcome. Instead of having users go through links and external sites please use the builtin tools to embed images in your post. See How to upload an image to a post? or GIFs

Sorry for that, i posted those images as a link, because of the 2MiB size limit, and i didn't want to loose any quality, due to not wanting to lose any of that noise pattern that i wanted to show. Well, it seems that it got lost anyway due to imgur converting them to jpeg.


text:
Mac freezes, rainbow wheel, etc
I installed Blender in a 2011 Mac High Sierra for my son to learn it.
It had been running fine but when he began adding colors, the Mac started to freeze with the rainbow wheel (of death). It takes a good minute for the Mac to react again.
However, the color in the figure is not what was chosen. My son chose yellow and here you have all green with super strange green effect in the figurine's arms (photo).
Can you please help out?

It looks like it might be related to graphics drivers. Try updating them.

Please provide all the relevant information about the problem. Share full unclipped screenshots with all the interface visible as well as the .blend file. tell us about what is done before the problem occurs and if it repeats with other scenes or other Blender versions.


text:
When using snap to face, vertices on other side of mesh go to random positions and mesh becomes a crumpled mess
I'm new to blender and trying to follow this tutorial, but the snap to face tool ends up making the mesh all crumpled and vertices go to random positions for no reason. Is there any way to fix this?

Any chance you could post a screenshot of what you're seeing?

If you want help, you'll need to add a screenshot of your whole viewport :). My guess is Proportional editing set to Random


text:
How to have the same material applied on multiple objects, but control the material parameters for each object individually?
I am making a modular road system where I want to apply an asphalt  material with white road markings on many different roads (objects).
Now I want to be able to apply the same asphalt material to all these  objects and then control for each object separately: the location of certain  individual white road markings/ if they are full or dashed/ visible or not/  etc.
This way I can make more complex configurations like crossroads etc.
One way to solve this would be to make a different material for each  object and use NodeGroups to make it easier. The problem is that I  need many different combinations and that it would result in too many  different materials to manage in a practical way.
I think the solution would ideally be controllable from within geometry nodes.
I attached the Blender file:

Have you looked into node groups? It will allow you to have the same node group in several materials, and if you need to make some changes it will be replicated in the different materials

"...too many different materials to manage in a practical way..." Well, if you have many configurations, you will have many different things of some sort in your scene. What does it matter what those are? What's difficult about managing many materials?

The thing is: with such a system I would have to setup a new material for each new object that I create. I'm trying to find a solution that works like Geometry Nodes, where you can use the same modifier for many different objects and have different results depending on the input parameters that you set.

You can use the Martynas' answer, but without custom properties, by switching the Attribute node to Geometry type, then reading a custom attribute just like the u, and v attributes. Then you can save them inside geometry nodes:

The data is duplicated for each vertex, so for many attributes and dense geometries it could add up to something worth optimizing, e.g. this way:

Hi Markus, this is awesome! :-) Just what I was looking for. Many thanks!
I did a bit of testing with this system. I would probably use maybe 20 of these 'store named attribute' nodes in a row, like so: https://imgur.com/a/mKhHgux
Do you think this would be the most effective method? Would it have an influence on performance like this?

@PieterLéon You will be fine :)

Thanks a lot Markus! Is there a way I can treat you on a virtual (Paypal) drink? :-)

@PieterLéon I have a paypal, but unfortunately I drink neither coffee nor alcohol

Well to be honest, I also don't drink alcohol. :-) I know how it is to have limited choices as a consequence here in Belgium. Is there another drink you like maybe? :-)

@PieterLéon I mostly drink tap water, though even that costs money + filters. Since you're so persistent, you can take a look at my profile bio :)

@MarkusvondBroady Yes, those filters costs money. :-) I bought your edge sharpness tool on your GumRoad for 5 dollar :-)

@PieterLéon thanks, I temporarily discontinued adding stuff to the shop, because it's taking more time than I expected and I feel like the products get outdated rather quickly (e.g. the custom sockets is outdated in B3.6)

You can control what happens in a material with custom properties of an object:

This way different objects with different custom properties can look different with the same material.
You can use Python to quickly create custom properties:
import bpy

for o in bpy.context.selected_objects:
    o["SomeBoolProperty"] = True
    o["SomeIntProperty"] = 1
    o["SomeStringProp"] = "Something something"
    o["SomeColor"] = (1,0.2,0.5,1)
    o.id_properties_ui("SomeColor").update(subtype = 'COLOR')

Setting properties of the custom properties is a bit tricky(at least for me personally). I cannot find documentation for it. Anyway, the properties of custom properties seem to be accessible with object.id_properties_ui() and you update them with update() that has following description :

Python Console also gives some helpful error messages:

So apparently subtype can be

'NONE', 'FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'BYTE_STRING',
'PASSWORD', 'PIXEL', 'UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE',
'TIME', 'TIME_ABSOLUTE', 'DISTANCE', 'DISTANCE_CAMERA', 'POWER',
'TEMPERATURE', 'COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY',
'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ',
'XYZ_LENGTH', 'COLOR_GAMMA', 'COORDINATES', 'LAYER', 'LAYER_MEMBER'

I think 'COLOR' is the most useful here.

Hi Martynas,
It is indeed something like this that I am looking for. Thanks!
Does this mean I have to create new custom properties for each new object that I create?
Would there also be a possibility to control something like this through Geometry Nodes without having to change anything to the properties of  each individual object?

Geometry Nodes are more for geometry, it might be useful to work with objects instead of geometry because you might want to re-use object data for repeating elements, but make them look different. You can use Python for creating custom properties quickly if you have a lot of objects.

I updated the answer with an example of how to use Python if needed to avoid tedious work of making properties for every single object.

I don't think wrapping int literal in int() makes sense, after all it's evaluated first before being assigned. type(1) is type(int(1)). float(1) makes more sense to get a float, though 1. is more convenient.

@MarkusvonBroady You are right.

Hi Martynas, thank you very much for your answer! I would probably go with the solution Markus gave below, but maybe this could also come in handy at some point.

Thanks again for giving this solution again Martynas. Is there a way I can treat you on a virtual (Paypal) drink? :-)


text:
In what circumstances should I use the Geometry to Instance node?
I have a question about the Geometry to Instance node.
I read in the online Blender manual that this node can be much faster than the join geometry node when the inputs are large geometries.
Here is the link (it in the 'tip' text): Geometry to Instance Node
Now I'm wondering: if it can be so much faster, in which cases exactly would you use the regular "Join Geometry" node and why?
Why not just always just use the "Geometry to Instance Node" instead?

The Join Geometry node joins the specified objects and outputs a single object.
If you use this node with two or more meshes, their indices are changed and all elements of all domains are treated as one object.
For example, if you have two cubes that have eight points with indices 0-7, you will end up with one object with 16 points, with all points renumbered from 0-15. For this reason, additional computing power is necessary.
So this node behaves like Join.
Of course you can join any geometry with Join Geometry. You can also mix instances with meshes and curves, for example, if you want to output all your objects to the Group Output.
Geometry to Instances, on the other hand, only creates a reference to an existing object, so that the elements it contains (points, edges, faces, etc.) always remain unchanged.
This also speeds up any further processing, because the mesh does not have to be recalculated each time.
However, you cannot edit the contained elements unless you use the Realize Instances node, which converts your instance back into an editable mesh.
So you can't say exactly when you should use which node, because it simply depends on your particular use case.
But basically:

Use Join Geometry whenever you want to combine several objects and process them as one object (for example, if you want to change all points of all joined objects afterwards).
Use Geometry to Instances if your objects do not require any further manipulation other than their transformation.

Thanks a lot Stephan for this very clarifying answer! This is useful. Now the 'realize instances" node also makes sense suddenly.
They could actually put your answer in the Blender manual. :-)


text:
Traffic animation with cars along a curve
I would like to take this earlier question a step further by animating the traffic line.
I've added nodes to the NodeTree to achieve this animation, as shown in the attached image.

While the traffic line moves, I've encountered two challenges:

When I use a collection of cars, the instances (cars) constantly change on the spot
The animation sequence occasionally exhibits a slight 'jump'. It's not a smooth, seamless loop.

To illustrate the issue, I've created a video on YouTube
The Blender file is in attachment.

The problem arises in this case because after moving the points you merge them again with Merge by Distance. This also changes the indices, which leads to this erratic behavior during instantiation.
However, by capturing the index with Capture Attribute before merging the points and using this as Instance Index, you stabilize the indices and the erratic behaviour disappears:

That works! Thanks! :-)
I timed that about every 10 seconds the points on the curve seem to be redistributed/ a jump of some sort occurs.
Do you know where this comes from?

@PieterLéon The jump that occurs every ~10 seconds is due to the fact that this setup is time-based and is controlled by the Scene Time node. Since the number of defined frames of your timeline is limited to 250 frames, your counter starts again at 0 after 10.416 seconds (250 Frames/24fps), which causes the jump. In this case, you would therefore have to increase the end frames (frame range) accordingly.

Ah, it's that simple. I clearly don't know much about animation. Thanks again Stephan! :-) A coffee is coming your way. And best wishes for the new year!


text:
How can the pillars of a looped bridge be stopped of touching the road underneath?
In a previous question (Link to Question) I asked about letting the pillars of a bridge automatically touch the ground. This was solved by @Chris
Now I am wondering if there is a way to avoid that the pillars hit the road underneath, when the same road (curve) goes on top of itself in a loop, as illustrated in the image below?
The Blender file is also in attachment below.

Here is my proposal:
I made another raycast to the street and deleted the instances according to hit or not:

result:

This works beautifully! :D Thank you very much Chris. This is awesome. I could make some kind of roller-coaster with this system. :-)

Glad i could help. You are one of the "seldom" people here who write good questions, provide enough informations (and not too much) and (for me) the best: you provide the blend file so that we can ourselves try whether our solution works. I know there are a lot of "theoretical" people here who love to answer without blend file, the problem is just: they can never be 100% sure that their provided solution works because it is almost always the case that is a certain amount of guessing and therefore their answer might be a waste of time or worse: just wrong

I didn't know that. That's nice to hear, thanks. I'm very thankful for the help.


text:
Camera Inactive After click render button
I have encountered a weird issue with the blender. Here is my scene view before rendering. As you can see the camera is set as the active camera. However, after I click the render button the camera is inactive and it renders a random angle as there is no active camera.

Once check that there is no other camara in render scene. check in the hidden folder u might get the solution. if the problem gets continue then upload the blend file I'll take look on it.

Thanks for replying! I double-checked and there is no second camera. Here is link to my blend file. Thank you again for the help! https://drive.google.com/drive/folders/1xXnWfUDs9FHh54-R76dvClv7gWhbWMIP


text:
How i copy keyframe value from node material property to another node material property
so i have this 2 material in the same object with Value as input

i already input keyframe on the eye R on timeline

are there a way to copy the value from keyframe eye R to eye L ?
inserting it manually seems taking so much time and tiring
thank in advance

Make sure, the timeline is at frame 1, then just copy your keyframes by dragging a box around it and press CTRL-C, then click on your other shader nodetree and press CTRL-V.

thanks you so much. it worked.

you are welcome!

ah i need to select node value below the node group before paste it


text:
Rendered an animation, accidentally skipped frames, re-rendered but it’s now blank?
I rendered an animation and it was not the right resolution and I skipped frames. So, I decided to re-render it but it’s skips through the render frames very  quickly and it’s completely blank the whole time. How do I get it to render normally so I can save the animations?
I’m very new to blender and I’m on iMac.

I should have also said that I fixed the resolution and included all frames before I re-rendered

share the file so people can have a look and find out what is the problem

@Paul Is the Overwrite option disabled in the Output settings? In this case rendering will skip all frames that you've rendered before if you didn't change the name for the output files, no matter if you change resolution or any other render settings.


text:
MacBook M1 | Blender Python; (have 'x86_64', need 'arm64e')
I'm trying to import FreeCad inside Pyhton in Blender with the following code:
import sys

FREECADPATH = '/Applications/FreeCAD.app/Contents/Resources/lib/'

sys.path.append(FREECADPATH)

import FreeCAD

The code works in python outside of Blender. Inside Blender I get the following Error:
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: dlopen(/Applications/FreeCAD.app/Contents/Resources/lib/FreeCAD.so,
 0x0002): tried: '/Applications/FreeCAD.app/Contents/Resources/lib/FreeCAD.so'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

I believe the problem is with Blender. How could I solve that?
Blender Version 3.1.2 (3.1.2 2022-04-01)

When running outside of Blender, you are probably running python with Rosetta.
The Blender Version for M1 has M1 compiled binaries and requires that the libraries will be too.

@HeziShahmoon I have this issue on a macbook pro m1 after pip3 install cqparts and trying to use the lib. How do we get it to install the correct architecture?

You should run the Blender's pip by the following command:
/Applications/Blender.app/Contents/Resources/3.4/python/bin/python3.10 -m pip


text:
Why am I getting weird shadows on my Donut?
I get weird shadows. It was worse before, but I went into sculpt and smoothed the surfaces out, but these ones will not go away D:
Btw this is only a problem in Cycles, but no Eevee

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Looks like there are holes in your icing mesh or the icing mesh is overlapping itself or the donut mesh.  Maybe add your blend file to your question?  (How to add a blend file)


text:
Crashing when Denoising (2.79)
Hi i am a gfx creator :)
when I am trying to denoise as soon as my tile goes transparent it just closes on me! and it happens everytime. when i dont denoise it doesnt close then it ends up noisy and grainy! :(
Just so you dont ask for info:
Processor: Intel(R) Celeron(R) CPU N2840 @ 2.16GHz 2.16Gz
Intalled memory: 8.00 GB (2.88 GB usable)
System type: 32-bit Operating system, x64-based processor
I have windows

Denoising uses a lot of memory. https://blender.stackexchange.com/questions/89868/why-does-denoising-take-up-so-much-memory.

Why are you using a 32 bit OS? You will not be able to do much with that!


text:
error passing a property to a function (name not defined)
I am fairly new to python scripting, so getting into blender is a uphill battle at the moment. I want to pass a property into the REDO panel that, when checked, tells the operator to take effect only to the active object. But I keep getting an error message saying that the property is not defined (it is my understanding that it should be, because of the self argument in the function).
Any help is very much appreciated!
    "name": "Snap Origin to selected",
    "author": "Juan",
    "version": (1, 0),
    "blender": (2, 90, 0),
    #"location": "View3D > Mesh > Snap > Snap Origin to selected",
    "description": "snaps the origin of the object to a selection",
    "category": "Mesh",
}

import bpy

class MESH_OT_snapOrigin(bpy.types.Operator):
    """It has to begin with a selected element in edit mode"""
    bl_idname = "mesh.snap_origin_to_selected"
    bl_label = "Snap Origin to selected"
    bl_options = {'REGISTER', 'UNDO'}

    only_active: bpy.props.BoolProperty(
        name="set only active",
        description="set only the origin of the active object",
        default=False,
    )

    @classmethod
    def poll(cls, context):
        return context.area.type == 'VIEW_3D'

    def execute(self, context):
        bpy.ops.view3d.snap_cursor_to_selected()
        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
        if only_active.value is True:
           bpy.ops.objects.active.origin_set(type='ORIGIN_CURSOR', center='MEDIAN')
        else:
           bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='MEDIAN')
        # bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='MEDIAN')
        print("updated!")
        return {'FINISHED'}

# Registration

def set_origin_button(self, context):
    self.layout.operator(
        MESH_OT_snapOrigin.bl_idname,
        text="snap origin to selected",
        icon='PIVOT_CURSOR')

def register():
    bpy.utils.register_class(MESH_OT_snapOrigin)
    bpy.types.VIEW3D_MT_edit_mesh.append(set_origin_button)

def unregister():
    bpy.utils.unregister_class(MESH_OT_snapOrigin)
    bpy.types.VIEW3D_MT_edit_mesh.remove(set_origin_button)

I also don't know if bpy.ops.objects.active.origin_set(type='ORIGIN_CURSOR', center='MEDIAN') is going to work, given that I get an error before that, just so you know...it is probably also wrong.

You would have to use self.only_active to access the property and there is no need for a comparison with True you can simply write if self.only_active. Does that answer your question?

yes, thanks a lot! The comparison part I had it like you say in the beggining, but trying to find the error I just add it at some point...just to make sure.

ok, so...I just had to add self. before the property for the function to recognize it (and lose the .value, since it is a boolean, but that's a different error). Like so:
if self.only_active is True:
I still don't know how to get the active object. The whole context part is particularly confusing to me. But I guess I'll get it eventually.


text:
how to control an rgb node's color through a custom property
I have a couple of objects that are procedurally textured and colored. I want to make versions of it, and adjust the base color (defined by a rgb node) on everyone of them in one step.
So, I know how to create a custom property with color as a property value, but I do not know how to epecify the parameters in the driver editor when in the rgb node to make it work (as you can tell, I'm new to drivers in blender).

Thanks!

You can do it like any other custom property, but you have to set a different driver for each channel.
Expand the color wheel by clicking on the custom property color field, set it to R,G,B and right click on the first channel, choose Copy as new driver.
Then expand the RGB node color wheel by clicking on the color field, set it to R,G,B and right click in the first channel, choose Paste driver.
Now repeat that for the Green, Blue, and Alpha channel and the two colors will be synched.

Oh, you're absolutely right! I was trying to do it in one go with the whole color, but this way it works perfectly. Thanks a lot!


text:
What are the advantages of using asset bundles in Blender?
On the page about the Asset Browser in the Blender manual, the last chapter discusses asset bundles. Blender 4.2 - Manual - Asset Browser
It explains that asset bundles are blend-files that do not reference any other files, and their names end in _bundle.blend.
I understand that, but I'm not clear on the advantages of using these "Asset Bundles."
Why would you choose to do it that way instead of simply marking all the data you want to add to the Asset Library as "asset" and then saving the asset library path?
Does anyone know?

When you receive a new asset file, what you usually need to do is copy/cut that file, navigate to your library, create necessary folders if needed, and paste the file.
As the documentation explains, when you have a _bundle.blend file, the Asset Browser will show this button when you open it :

Which will open the file browser to the selected library directory. So it cuts down the need to copy/paste and navigating to the library first. It's not a massive difference on paper, but it's a simple way to make it a bit faster for people who might have many libraries in many places or in a location too cumbersome to reach by hand.

Ok, that clarifies it. Thank you very much for that @Lauloque !


text:
How to make 2 gaps in a curve which can change position independently?
I want to create two gaps in a curve, with the ability to independently control the position and width of each gap.
In the attached Blender file, I’ve come up with a setup using three Trim Curve nodes. The first two Trim Curve nodes are used to create a large gap in the middle, and the third one is meant to ‘fill’ the gap I just created.
The issue with this approach is that when the first gap overlaps or extends beyond the second gap, it no longer works as expected.
Does anyone have a better solution for this?

I don't know how precisely you want to control this, and what your goal is, but you could limit the values with the Clamp node.

My goal is for the user to be able to activate one gap, then activate the other gap later, without needing to adjust the 'position' and 'width' settings of the first one. I considered using a clamp node so that they don't cross each other, but that would make the settings of one gap always dependent on the other (maybe I'm wrong)

The puzzle can be solved if the following criteria are met:
The first curve is given the lower value of as the end point:

Starting point of the second gap.
The starting point of the first gap, or the end point of the second gap, if the starting point of the first gap is greater than the end point of the second gap.

The third curve receives the higher value of as the starting point:

End point of the first gap.
End point of the second gap, or starting point of the first gap, if the starting point of the first gap is greater than the end point of the second gap.

The starting point of the middle curve is either:

The end point of the first gap.
The end point of the second gap, if the start point of the first gap is greater than the start point of the second gap.

The middle curve has as its end point either:

The start point of the second gap.
The starting point of the first gap if the starting point of the first gap is greater than the starting point of the second gap.

Translated into geometry nodes, this could look something like this:

(Blender 4.2.0+)

Haha, wow this is amazing. I'm looking forward to the day I can figure this out by myself. I have to admit I'm not able for the moment. Big thanks again Stephan. A drink is coming your way!


text:
I want the offset in a brick texture node as an input - I found a solution that almost works
The standard Brick Texture node doesn't have an input socket for the offset.
I found a solution here.
However, when I change the row height of the bricks in that setup, everything gets messed up.
How can I modify the setup so that I can still adjust all the other parameters of the Brick Texture?
Blender file in attachment here:

It is not only the Row Height which makes problems in this setup. If you change the Brick Width, the Offset will be broken too.
In the following example I have changed the Brick Width to 0.7, while the Offset is at 0.5 which should result in the alternating rows being offset half of the width - but they are not:

So as you see, the Row Height setting can not be used as you already discovered and the same goes for the Brick Width. The issue is caused by the fact that the mathematical operations there use fixed values in some parts which should actually be relative to Brick Width and Row Height:

Instead of leaving the fixed values there you could now add two Value nodes to the shader: one for the Row Height and one for the Brick Width.
The Row Height value needs to be multiplied by 2 for the first unused input socket in the upper Divide node, then you can plug it directly into the next unused socket in the other Divide node and into the Brick Texture's Row Height input. The other Value node you plug into the last unused input socket in the Multiply node and into the Brick Width input of the Brick Texture. Now you can change Brick Width and Row Height with those values.

The whole nodetree setup seems very slow to me. Probably there are ways to build this more efficient by using a completely different method, but I was just focusing on repairing the issue in this specific setup. Here is the file with the modified nodetree:

Wow, thank you very much! This works. :-) I can see that it is a bit slower then the regular brick texture, but for me it reacts quite fast still. I wish there was a way to test the speed of a node setup in the shader nodes.


text:
How can I determine the brightness of my materials so that it will work for most people?
I am working on a procedural road system that will also be used by other people.
Currently, I am searching for a method to ensure that the materials I create, such as asphalt and concrete, possess the appropriate default brightness. This way, they can seamlessly integrate with other assets like buildings and trees without encountering any issues.
When I utilize the default HDRI environments provided within Blender for rendering the viewport, I notice significant variations in brightness among them, despite setting the strength to 1 each time.
I created a color checker using 11 standard Principled BSDF shaders in the images below. The only modification I made was adjusting the color values.

In reality, most people's screens are not calibrated, and there are numerous external factors that can affect the viewing experience. However, I am still pondering the following:
Is it possible for me to create a standard light setup or scene that serves as a baseline for setting up all my materials with the appropriate brightness? Additionally, what steps should I take regarding the color management options?

"In reality, most people's screens are not calibrated" - I don't see how it's relevant to your problem. Let's present some extreme case, someone's monitor is wrongly calibrated so that he doesn't recognize colors brighter than 50% LED power. Half of colors are too bright. Why would you want to create an add-on to display properly for that user? Not only it is not your responsibility to deal with display problems of your user, what if the user intentionally has set up a screen this way?

Moreover, it's extremely niche to use Blender as the "end-user-tool", as in, I don't see people using Blender as a powerpoint, or a game engine (that is, the game runs Blender and Python scripts are responsible for the game logic), though if you target Blender Game Engine, it's a good idea to tag it in your question. Of course if your target audience are people using Blender as this "end-user-tool", I'm not saying it's wrong, but mentioning it explicitly (and maybe explaining in more detail) would clarify the question a lot.

@MarkusvonBroady I agree with you that the monitor calibration is not significant in relation to the question. The purpose of what I'm creating in Blender is not to develop a game. Instead, it is primarily intended for rendering illustrations of cityscapes in Blender. My concern lies in the scenario where I import assets that were made by other individuals at a later stage. If, for instance, my road system appears significantly darker compared to the imported assets, it would require me to adjust the brightness of the materials to achieve a cohesive look.

This adjustment process could potentially be time-consuming and labor-intensive, especially if it needs to be done repeatedly.
Therefore, I am searching for a method to give my materials a brightness that will work for most situations. It doesn't have to be precisely accurate or perfect.

If the colors of your assets is the same as the colors of other assets, everything will be fine, because you will render both in the same light and under same color management. If the colors are different, then they should be different, because color is just albedo property of a material meaning how much light it absorbs. For photorealistic workflow, you research what the albedo should be for a material. For NPR you need to standardize colors, or allow your setups, e.g. materials, geonode trees to have easily changeable colors. There is no standard color for anything in NPR.

@MarkusvonBroady After giving it some thought, what you're saying actually makes a lot of sense! :-) It seems like placing it next to other assets is indeed the best approach. Thanks once again, Markus!


text:
AttributeError: 'Object' object has no attribute 'origin_set'
I'm writing a script to create a cubical object out of several joined planes. After joining the meshes into one object (shadow_catcher), I need to set its origin to center of mass, so I call the following commands:

bpy.ops.object = bpy.data.objects["shadow_catcher"]
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')

However, I get the following error:
AttributeError: 'Object' object has no attribute 'origin_set'

Strangely, this operation does work using the GUI. I have been searching for a solution for hours but alas no luck.. Any help would be greatly appreciated!

In your first line, you need set the active object, not bpy.ops.object. You also need to select the object.
bpy.context.view_layer.objects.active = bpy.data.objects["shadow_catcher"]
bpy.data.objects["shadow_catcher"].select_set(True)
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')

Works! Thank you


text:
Enable Shadow Catcher Pass in View Layer with Python
I am writing a script for compositing, which requires that the Render Layers node has the Shadow Catcher output (see image below).

This can be done with the GUI by going into the View Layer and toggling on the Shadow Catcher Pass, as such:

Unfortunately, I cannot find a way to do this using script. In fact, the ViewLayer class doesn't seem to have a property for this, but does have it for other passes (e.g. use_pass_combined).
Any help would be appreciated!

This parameter is actually contained in the bpy.types.ViewLayer.cycles property.
If you enable python tooltips and hover over the field you'll see this.

Notice the second line which states CyclesRenderLayerSettings.use_pass_shadow_catcher. A quick search in the docs gives us the only place where this class is used.
The docs don't explain what's inside it but you can always try print(dir(bpy.context.view_layer.cycles)) to get an insight into what you can call exactly from this object.
['__annotations__', '__dict__', '__doc__', '__module__', '__weakref__', 'bl_rna', 'denoising_store_passes', 'name', 'pass_debug_sample_count', 'register', 'rna_type', 'unregister', 'use_denoising', 'use_pass_shadow_catcher', 'use_pass_volume_direct', 'use_pass_volume_indirect']
This gives us :
import bpy

bpy.context.view_layer.cycles.use_pass_shadow_catcher = True

Perfect! Thanks for the detailed answer.


text:
is this related to mirror function? are there any solutions for this problem?
I would like to know if someone had the same error before, i think its related to mirroring, any ideas?

did you check "merge" and increase the value a bit?

Also make sure "Clipping" is enabled

Also move the mirror modifier before the subdivision surface modifier.

Also check if you don't have inner faces