text:
How do I render the implicit function z^2 + (x-y-1)(z) + y = 0 in Blender?
Is it possible to render the following equation in Blender to make a 3d visual?
$$z^2 + (x-y-1)(z) + y = 0$$

I sincerely hope you don't have a hundred more equations you want to render and ask a question for each of them :D

Yeah no it's because I'm new to blender and I wanted to use the software to create a visual for a project. I tried plotting the explicit function and it worked but I wanted to create a visual of better quality, and so I thought an implicit equation may be better.

You cannot plot an Implicit function in Blender. You will need another software to do that. You can plot an Implicit function using Volume Cube. However, your equation is not implicit because there is a way to convert it into an Explicit function. Implicit means that there is no way to convert it into explicit form. Here's a solution using Geometry Nodes that shows the graph for your original equation $z^2+(x−y−1)(z)+y=0$ using an explicit function that was derived from that original equation in my solution in the other answer:
$$z = \frac{1}{2}(y-x+1)\pm \frac{1}{2}\sqrt{\left(x−y−1\right)^{2} - 4y}$$

Take note that the jagged edges between the upper and lower graph are the exact representation of the boundary between real and imaginary (complex) numbers.

The equation $z^2 + (x-y-1)(z) + y = 0$ has the form of a Quadratic Equation so you can derive an explicit equation in the form $z=z(x,y)$
$$Az^2+Bz+C=0$$
where:
$$A=1$$
$$B=(x-y-1)$$
$$C=y$$

and $z$ can be explicitly defined as:
$$z=\frac{-B\pm\sqrt{B^2-4AC}}{2A}$$
substituting we get:
$$z = \frac{-(x−y−1)\pm \sqrt{\left(x−y−1\right)^{2} - 4(1)(y)}}{2(1)}$$
$$z = \frac{1}{2}(y-x+1)\pm \frac{1}{2}\sqrt{x^2 - 2xy - 2x + y^2 + 2y + 1 - 4y}$$
There are two (2) solutions:
z = (y-x+1)*0.5 + ((x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y)**(0.5))*0.5
z = (y-x+1)*0.5 - ((x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y)**(0.5))*0.5

Take note that we have an imaginary component, where, $x^2 - 2xy - 2x + y^2 + 2y + 1$ has to be greater than $4y$ or else we have a negative value in the square root function ($\sqrt{value}=value^{0.5}$) which would result to an imaginary number and cannot be visualized so we have to add a check to ignore these points. We can easily plot that in python without any problems:
import bpy

def get_object(name):
    objects = bpy.context.scene.objects
    if name in objects:
        return objects[name]
    m = bpy.data.meshes.new(name + "-mesh")
    o = bpy.data.objects.new(name, m)
    #o.modifiers.new(name, 'SKIN')
    bpy.context.collection.objects.link(o)
    return o

# ==================================================================================================
# Equation:
# Descritpion: plot z = (y-x+1)*0.5 +/- ((x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y)**(0.5))*0.5
# ==================================================================================================

def get_range(start, end, step = 2):
    return [x * 0.1 for x in range(start * 10, end * 10, step)]

def get_graph_z_real(x, y):
    return x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y

def get_graph_z(x, y, real, sign = 1):
    return (y-x+1)*0.5 + (real**0.5)*0.5 * sign

def create_verts(verts, sign):
    for py in get_range(-5, 5, 2):
        for px in get_range(-5, 5, 2):
            real = get_graph_z_real(px, py)
            if real < 0:
                continue
            pz = get_graph_z(px, py, real, sign)
            verts.append([px, py, pz])

def draw_graph():
    verts = []

    create_verts(verts, 1)
    create_verts(verts, -1)

    o = get_object("graph")
    m = o.data
    m.clear_geometry()
    m.from_pydata(verts, (), ())

draw_graph()

And then you can use the method described in How can I convert a complex point cloud to mesh to convert it to a mesh.
We can also use the Z Math Surface but unfortunately there we have to add an if/else check and evaluate the square root part to zero or some other value for the imaginary component which will add an additional unwanted region in the 3d surface:
z = (y-x+1)*0.5 + ((x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y if x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 > 4*y else 0)**(0.5))*0.5
z = (y-x+1)*0.5 - ((x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 - 4*y if x**2 - 2*x*y - 2*x + y**2 + 2*y + 1 > 4*y else 0)**(0.5))*0.5

First make sure to have Extra Objects addon enabled in menu Edit > Preferences > Add-ons:

Then add the surface function under object menu Add > Math Function > Z Math Surface to plot the 2 solutions.

If I didn't make any mistake in my calculation then the graph should look like this. Notice that the imaginary part is plotted with the square root part evaluated to zero. Anyway you get the idea :)

You can also use Volume Cube node.

There's a small mistake in the above screenshot: Instead of X it should be Z into the Math (Power) node. Thanks StefLAncien for spotting the mistake. Here's the correct output:

@StefLAncien I was wondering why it looked different. Now I have it correct thanks for the correction! https://snipboard.io/2NiEP5.jpg

@StefLAncien thanks for ur answer additional things to learn +1. I also updated my post.

(Using Blender 3.6.8)
Analysis
Let $f(x,y,z)$ be the function of $\mathbb{R}^3$ defined by:
$$
f(x,y,z) = z^2 + (x-y-1)z + y
$$
$f(x,y,z)=0$ can be interpreted as the following quadratic equation in $(x,z)$:
$$
(0) \times x^2 + (1) \times xz + (1) \times z^2 + (-y-1) \times z + (0) \times x + (y) = 0
$$
The graph of such an equation is always a conic section. Its discriminant being greater than 0, this equation represents a hyperbola, parametrized by $y$, the remaining coordinate. Consequently (see the Mathematics subsection thereafter), it can be converted to canonical form in transformed variables $(X,Y,Z)$ as:
$$
F(X,Y,Z) = X Z + Y = 0 \Longleftrightarrow X Z = -Y
$$
with:
$$
\left\{
\begin{array}{rcl}
X & = & x-y+z-1 \\
Y & = & y \\
Z & = & z
\end{array}
\right.
$$

The figure above illustrates with planes and cylinders the transformed coordinate system $(X,Y,Z)$. It shows how the surface of interest is divided in four parts of hyperbola shape, according the sign of $Y$ which is determining if the sign of $X$ and $Z$ is the same. (NB: A Boolean modifier is used to keep only points in a cube spanning $[-5,5]^3$)
Approach
The proposed approach is to mesh the surface of interest in the $(X,Y,Z)$ coordinate system, then to transform it to the $(x,y,z)$ coordinate system. Sampling the $(X,Z)$ plane yields $Y=-XZ$ without singularities, like division by zero or square root of negative number.
GeometryNodes modifier

Bottom graph: $(X,Y,Z)$ grid generation
1. A 101x101 points Grid spanning 20x20 $m^2$ is generated, then rotated by 90 degrees around the X axis to discretize the $(X,0,Z)$ plane.
2. After recovery of $X$ and $Z$ coordinates through a Separate XYZ node, the vector $(0,-XZ,0)$ is computed and assembled with a Combine XYZ node.
3. It is used to offset grid points to coordinates $(X,-XZ,Z)$ with a Set Position node.
4. Eventually, $(x,y,z)$ coordinates are computed from $(X,Y,Z)$ by the XYZ to xyz group node.
Top graph: $(X,Y,Z)$ to $(x,y,z)$ conversion
$(x,y,z)$ are defined as (see the Mathematics subsection thereafter):
$$
\left[
\begin{array}{r}
x \\
y \\
z
\end{array}
\right] =
\left[
\begin{array}{rrr}
1 & 1 & -1 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{array}
\right]
\left[
\begin{array}{r}
X \\
Y \\
Z
\end{array}
\right] +
\left[
\begin{array}{r}
1 \\
0 \\
0
\end{array}
\right]
$$
5. The product of the lines of the matrix with the Position vector is computed using Dot Product vector math nodes.
6. The offset of the origin is computed using an Add vector math nodes.
7. Eventually, $(x,y,z)$ coordinates are substituted to $(X,Y,Z)$ by a Set Position node.
Mathematics
Canonical form
The expression of $f(x,y,z)$ is simple enough to write:
$$
\begin{array}{rcl}
f(x,y,z) & = & z^2 + (x-y-1)z + y \\
\mbox{} & = & (x-y+z-1)z + y
\end{array}
$$
Let the coordinates $(X,Y,Z)$ and the function $F$ be defined as:
$$
\left\{
\begin{array}{rcl}
X & = & x-y+z-1 \\
Y & = & y \\
Z & = & z
\end{array}
\right. \\
F(X,Y,Z)=XZ+Y
$$
Consequently, $f(x,y,z) = F(X,Y,Z)$.
Change-of-basis matrix
In linear algebra formalism, the above expression of $(X,Y,Z)$ as a function of $(x,y,z)$ is written:
$$
\left[
\begin{array}{r}
X \\
Y \\
Z \\
1
\end{array}
\right] =
\left[
\begin{array}{rrrr}
1 & -1 & 1 & -1 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{array}
\right]
\left[
\begin{array}{r}
x \\
y \\
z \\
1
\end{array}
\right]
$$
The change-of-basis matrix from $(X,Y,Z)$ to $(x,y,z)$ is calculated by inverting the previous matrix. It is written:
$$
\left[
\begin{array}{r}
x \\
y \\
z \\
1
\end{array}
\right] =
\left[
\begin{array}{rrrr}
1 & 1 & -1 & 1 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{array}
\right]
\left[
\begin{array}{r}
X \\
Y \\
Z \\
1
\end{array}
\right]
$$
Resources
Blender file:


text:
Raycast on Geometry generated by Geo Nodes?
My problem arises when I attempt to use the raycast node on geometry created in the same node setup.

I would expect the result to be effectively a hemisphere of instances on the top of the cube, although this does not work. Am I using the raycast node wrong, or is this a limitation of the node?

Thank you!

You're projecting the geometry onto itself, so each vertex hits itself after moving a distance of exactly 0 unit. You can try to offset either the target geometry or the base geometry along the Z axis to get the effect you desire (I think ?)

If your question was solved, please be so kind and mark the answer that contributed to the solution as "Accepted Answer". This will make it easier for others to see which way leads to the solution, and the question will no longer appear as unsolved. Thank you! Here you can find more information: What should I do when someone answers my question?. If you still didn't get a solution to your question, please be kind enough to address it.

@Gorgious is right.. add a tiny epsilon to the Source Position in the direction of the ray, and the ray won't hit the point it's fired from before hitting/missing anything else:

It's actually absurd that a raycast in a certain direction counts the own starting position as a hit, isn't it? However +1

Hi @quellenform ! I'm  not sure it's as absurd as it looks? If casting a ray on to self then there has to be an epsilon somewhere. I'd rather decide what it should be, than have Blender give it a hidden value I know nothing about. And I agree, using ray-cast for this job is expensive and unreliable. I was thinking of saying so, too, but assumed OP was asking 'in abstract'.

But a ray on itself would mean a length of zero. With this, Raycast is actually led ad absurdum. That's what I meant, that there should be an option to define an epsilon in advance, or a switch that ignores the own position. ...or once again I imagine it to be much too simple :D

@quellenform OK,  I see .. a 'Disallow 0 length ray' switch, or better and more general than that, a 'Min'  as well as a 'Max' on ray-length. That would be useful, minimal, and clean, IMO. (BTW It's the same in OSL, and .bpy.).. It wouldn't get rid of the 'Source Positition', though.. you might want to sidestep and fire in another direction.

@RobinBetts' answer is definitely the correct one, so his answer should be the "accepted answer" to your question, but your concern I would rather solve as follows:

Why?
Because Raycast doesn't always give reliable results. Try it out. Scale the UV sphere and see for yourself what happens.

source: Stack Exchange

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

sort: votes


text:
Why does the shadow in my scene look like this?
I have been practicing Blender and I've been a fan of Dedouze so I'm trying to make an animation similar to his. However, after trying out his demo file and applying it to my scene, the shadows look different like they're not hitting a solid object and there are lines on the shadow. Can you guys help me on this?

It's not clear if this screenshot is yours or is it the sample? Anyhow there is nothing to compare so I can't tell what the problem is. Either add another screenshot of your work or if this is your work, then another of the work you are trying to follow. What is useful is attaching a blend file as well https://blend-exchange.com

Try going into the properties for your light(s) and under Shadow (expand the menu) enable "Contact Shadows".

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


text:
Is there any way to turn NLA (Non Linear Animations) into "normal" (Timeline) keyframes?
I've been working on a project in which I aim to animate the displacement of a material.
My problem is that anytime I add a keyframe for ANY parameter of the material nothing appears on the timeline.
Instead, it appears in the NLA which I'm not familiar with. It is also too early for me to learn how to use it.
I've looked online but couldn't find any solution for this.
I am a beginner so maybe there are some things that I don't understand.
I tried animating the position of my object and it works as you would expect with the keyframes on the timeline.
Maybe this is how it's supposed to work, in this case sorry for the useless question !

If you've enabled the Only Show Selected option of the Dope Sheet, you need to make sure that you've selected the node in the Shader Editor, otherwise you won't see the keyframes

Oh my god thank you so much ! I have no idea how or when i activated that option but that did the trick !
Have a good day ! <3

You've enabled the Only Show Selected option of the Dope Sheet, you need to make sure that you've selected the node in the Shader Editor, otherwise you won't see the keyframes:


text:
How to trigger an event by reseclecting nodes in the shader workspace PYTHON
All I need is actually just a script or something that acts as an event through which other operators can be triggered. The event should be triggered when a user selects a new node in the shader workspace, for example, i.e. the selection is changed.
I suspect that a script has to work constantly in the background to capture this event, but what does this script have to look like and how can it run without freezing Blender?
I love seeing your advice and thanks for the help!

This is pretty hacky but you can run a timer that scans for open Node Editors and checks if the active material or node name has changed from the last time the timer ran. Not sure if there's a better way.
import bpy

LastNodeState = None

# Called when active node changes
def notify_node_changed():
    owner, node = LastNodeState
    print(f"node changed! now '{node}' in '{owner}'")

# Gets an open node editor space
def get_node_editor_space():
    if not bpy.context or not bpy.context.screen:
        return None

    for area in bpy.context.screen.areas:
        if area.type == 'NODE_EDITOR':
            for space in area.spaces:
                if space.type == 'NODE_EDITOR':
                    return space

    return None

def poll_for_changed_active_node():
    space_data = get_node_editor_space()
    if not space_data or not space_data.node_tree:
        return

    active_node = space_data.node_tree.nodes.active
    if not active_node:
        return

    global LastNodeState
    node_state = (space_data.id.name, active_node.name)
    if node_state == LastNodeState:
        return
    LastNodeState = node_state

    notify_node_changed()

def timer():
    poll_for_changed_active_node()
    return 1.5  # poll every 1.5 seconds

bpy.app.timers.register(timer)


text:
Save an image of an area by it's index
General Question: Is there a way to capture a raw image, so no overlay or gizmo, of an area within Blender only by its index?
I would need a script that writes the pixels of the area to an image within Blender without using any modal operators.
The following link already addressed the question, however it utilizes a modal operator that I don't really need. In my case, the script should be executed once and then an image of the currently active viewport should be created and if it already exists it should be overwritten. Copy framebuffer of 3D View into custom frame buffer.
The viewport render option won't work as it does not function in cycles and rendered view mode.
But how could I achieve something like this? Any help is really appreciated and responses in the form of code lines are very welcome as well!
Thank you for your time and effort!

"The following link already addressed ..." - What following link?


text:
Weird Mesh/Texture issue
I decided to make a quick animation for fun. But after a long time posing, I got to the rendering part. I got all my settings the same that I use normally. Only issue, is this is the first time I used this rig.
But I textured it correctly from what I know. The weapon textured fine, just not the rig.
My nodes
Glove nodes
Skin nodes
Arm (Jacket) nodes
The Mesh itself in the outline
Skin
Glove
Arm (Jacket)
The skin looks perfectly fine in render, but the Gloves and Arms have the issue.
I've looked for fixes, so far nothing has worked.
I normally render in Cycles, but I did Eevee here since it was faster.
Viewport
Render
Reached Link limit; Otherwise, I would link to the docs
RIG - MW19 Rig, deserted from the "AnimKave Repository (updated)" doc
With the Textures from MW:19 Rig, MyDude.
WEAPON - AUG A3 9MM, GrimReaper101 from the "Unofficial AnimKav Weapons Repository" doc
Textures included in download.

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

From answer https://blender.stackexchange.com/a/6859/125754
Turns out there's a button to disable from render.


text:
why is my liquid simulation baked like this?

The liquid simulation looks like particles in the right image how do i make it look like the image on the left

You need to activate this single thing in your fluid domain:

This will give all those particles mesh around them, you need then adjust your settings to fit in your scene


text:
Cloth simulation: explicit "natural"/starting shape
To quote the docs

Normally cloth uses the state of the object in the first frame to compute the natural rest shape of the cloth, and keeps that constant throughout the simulation.

Is it possible to specify this "natural rest shape" explicitly?
My use case is the following: I'd like to simulate "tightening" shoelaces to have them follow a natural position without manually modelling all the collisions. Initial results are promising.
I've loosely modeled the path of the shoelace using a curve and curve modifier:

I hook the ends of the lace to an empty and move that using keyframes. After simulation I get a result which is close to what I want, however there are some weird twists where the shoelace previously went through the eyelets.

It seems like the simplest solution to this problem would be if it were possible to specify the base, straight, shoelace as the "natural shape" of the mesh. However, I'm not seeing any obvious appropriate option... am I missing something or is there some workaround?

And yes, I looped the the back middle eyelet the wrong way around - sorry about that :-)

Maybe straighten the curve on frame 1, set pinning to 1.0 for all verts on frames 1 and 2, maybe via vertex weight edit modifier, and then let it run?  Not sure if there's a way to set explicit rest shape, but you can define the rest shape from frame 1 and then override on frame 2.

just set the beziercurve to minimum instead of z-up - i think that's getting closer to what you want

OK, well, it turns out the exact option I was expecting does actually already exist.
https://docs.blender.org/manual/en/3.4/physics/cloth/settings/shape.html

Rest Shape Key
Allows starting the cloth simulation using a specific shape key as the rest state, instead of the shape that results from evaluating shape keys and preceding modifiers in the regular way. This option is mutually exclusive with Dynamic Mesh.
This can be used to start the simulation with the cloth in a pre-draped state without applying that shape as a plastic deformation that relaxes all springs as a side effect.

The reason I didn't find it is that it only shows up if the selected object already has shape keys.

Ran into a crash related to the subdivision modifier while using this feature. I've created a bug https://developer.blender.org/T103972

setting beziercurve to minimum gives this result:


text:
Copy framebuffer of 3D View into image
General Question: How can I copy the frame buffer of the currently active viewport to an image within Blender?
The following link already addressed the question, however it utilizes a modal operator that I don't really need. In my case, the script should be executed once and then an image of the currently active viewport should be created and if it already exists it should be overwritten.
Copy framebuffer of 3D View into custom frame buffer
But how could I achieve something like this? Any help is really appreciated and responses in the form of code lines are very welcome as well!
Thank you for your time and effort!

So like, Viewport Render?

yea basically an image of the active viewport without any overlays, gizmo and background colors

That’s Viewport Render. Like that’s a thing. See https://docs.blender.org/api/current/bpy.ops.render.html#bpy.ops.render.render

I tried this but it wont work in cycles and if the viewport is set to rendered view unfortunatly

Do you need it to be Cycles?

Yes it must be independend of the mode the user is using like in the frame buffer question I lonked above

Maybe try doing https://docs.blender.org/api/current/bpy.ops.view3d.html#bpy.ops.view3d.camera_to_view and then rendering normally?


text:
Mirror modifier does not work when I'm sculpting a mirrored object
I'm having a sculpt mirroring issue, which was earlier discussed and solved in the forum, here (How to apply sculpting to mirrored object). However the solution which was suggested there, does not help in my case. Perhaps some of you have met similar issues and may know the solution for it?

So what is happening, I’m having a beginner sculpting lesson, where I blocked out the basic shape. The workflow was like I created an object for the left shoulder for example, then mirrored it on the X axis, so the right shoulder was created. I applied this mirror modifier, then put on subdivision surface modifier on the objects, to add some faces for sculpting. Subdivision surface modifer was applied as well. Now I started sculpting, but when I use the brush on a source object, it doesn't apply the effects on the mirrored objects, those remain unchanged.
In the previous post, it was suggested to use the "Symmetrize" option in the menu, and set the symmetry axis on -X >> X. I have done these steps, but to me they did not work at all.
I'm using version 2.92 and the mirror effect on the body blocks, I use in this scene, work properly other than that (when moving objects in Object mode, etc.).
Has anyone met similar issues perhaps? Thank you in advance, if you can help.

Once you've done a Mesh > Symmetrize in Edit mode to make sure that your model is perfectly symmetrical (you need to make sure that the origin of the object is at the center of the wanted symmetry, if it's not the case you need to move it), switch to Sculpt mode and enable the mirror option on the top right of the window:

Thank you MoonBoots for the reply.. The mirrored objects were created by mirorring the source on a third object, which is symmetrical (its origin is in X=0; Y=0). As I looked up the topic it should result the same effect as if the source objects' origin would be in zero point in the 3D World. I will check it if it may help..    Mirror option is enabled in Sculpt mode, however it hasn't changed the mirror effect. Thank you again!


text:
Edit armature without changing pose(s)
I've started posing a rigged character, and realized during that the roll values on some of the bones weren't properly mirrored. This causes the "mirror X" option to not work: a closed fist on one hand leads to fingers twisted in all directions on the other.
Is it possible to change to roll values while keeping the pose as-is, so as not to lose any work?

You can't make changes to the rig and have no repercussions on the already made animation data.
But you can use the Copy Global Transform addon:

This allows you to copy and paste poses in world space. So what you can do is:

Copy your pose
Change the roll
paste your pose

The result will be the same as before the roll change. Though, it's annoying to do on multiple poses. There might be ways to automate this using python.


text:
How to search through multiple Blender files and filter objects by collection?
This is similar to this question except I need to also filter my objects by collection.
I have a large group of Blend files. I need to go through each one and check if all the objects (and their children) in a collection called "room" match a specific naming scheme. The objects outside the "room" collection have to be ignored. If any of these objects don't match the naming scheme, I need to flag that blend file at the end for review.
I'm not sure what the best way to go about this is, but the closest example I found was that question linked above. However, because there's no documentation for blendfile, I can't figure out how to filter objects by collection before listing their names. I'm open to using BAT or BPY, but as far as I can tell BPY isn't suited to bulk tasks like this.


text:
How do I make an emission object invisible when the emission is off?
I'm trying to animate flashing text around an object but I do not want to see the text when the emission is off.
It's just an emission node to material output with key frames on emission strength.
How would I make the text invisible while keeping it's animated emission?

It depends on the render engine, what node you are using, and how easily you can transfer the existing keyframes. If the keyframes can be transferred easily, I would try using a mix shader node with transparency as the other shader, and animating it’s factor instead. Otherwise, you may be able to emit light from a fully transparent Principled BSDF material.

EEVEE solution:
Node setup:
By changing the threshold and the value you can determine the pulsing speed/duration.

Important:
Change the blend mode to this:

CYCLES:
For cycles it works the same, just add this compositing setup:

Thanks Chris, this was an excellent breakdown.

You are welcome


text:
Why my entire edge selection suddenly stop?
When I select the entire edge suddenly the selection stop in that point as show in the picture.
Cant figure why!!! What I can do?
There's no ngon, no double faces, no double vertex......
Thanks for any help.

did u try fixing the normals?

Edge is selected if participates in a "4-way cross road". the selection continues by picking the edge with smallest edge angle to the previous one (like a car crossing straight ahead". In you case the edge comes to a 3-way cross-road and that is why the selections stops there (it could go equally in any direction, not just the one you think about). It always has to be a 4-way connection.

oh thanks a lot!

It meets a pole here, it doesn't know which edge it is supposed to select next:

thank you so much!


text:
rotation and scaling is not working in edit mode in blender 3.2.2
Can anyone please tell me why it's not working?

What do you want? You want to scale a point? It's not possible, it is 1-dimetional object. Instead, you can change the point radius:

With the hotkey Alt + S

Yes, Alt+s is worked

The same applies to rotating. You can only rotate if you have more than one point selected.


text:
Duplicated collection won't stop moving with the original collection
I'm really sorry if the answer to my problem is obvious, but I just can't seem to find a solution on my own.
I have duplicated a collection of meshes and I want to be able to move them individually into their respective positions. I select all of the meshes within one collection and select their vertices:

I then attempt to move one of the collections as a whole, assuming it would work because I've already selected the relevant vertices. When I do, both the original collection that I duplicated from and the duplicate itself move together:

Is there any way to stop the two collections moving together? I just find it odd, since 'Piston 2' itself is a duplicate, but doesn't move with its original.
Huge thanks in advance for any help.

Looks like you linked duplicate, so the mesh data is the same for the objects in both collections. Notice in the outliner the green icons are highlighted when you select the objects of the other collection in edit mode. You can make them single users. Object > Relations > Make Single User > Object & data.

@Gorgious That worked perfectly. I was banging my head against a wall trying to find a fix, thank you ever so much. :)


text:
Save image projections on the same object in the same 'static' texture
I have a scene with a big mesh and a small camera that I use to project an image on it (using the UV project modifier). I want to project this image on the object for different positions and orientations of the camera/projector and save all the projections in a permanent texture of the object. Is there a simple way to do it? (I'm using Blender 2.9)
Thanks!

Hello, it's not clear what you're trying to do, if you're trying to project a texture on the surface of your object, maybe try the Stencil option of the Draw brush?

Do you mean you want to combine the projections into one image texture?

@Robin Betts yes indeed. I'm projecting the same image with the same camera, therefore ideally the texture would update regularly with the new projections

@moonboots I'm projecting an image on an object already, and I want the object's texture to "memorize it" and do this with other future projections of the same image with the same camera


text:
Texture Baking issue - Not using correct UVs
I have been having this maddening issue lately which I cannot for the life of me seem to fix. Essentially I have a small environment with several objects that I have projected a bunch of painted texture onto from the camera view. I now wish to bake all of these separate images onto a single texture sheet, so I am baking them one by one onto a new image texture. I have one UV channel with the projected UVs and another to use for the baked atlas sheet.
All of the objects seem to work fine apart from one which keeps returning this strange error. When I bake, it keeps the UVs from the projected UV channel with some of the new UVs but not others. Any idea what could be happening here? Yes, I have "clear image" checked and I am making sure to have the correct image selected in the shader editor.

Have you used a UV map node for the Image Texture that you are going to bake? If not, which UV is enabled for rendering in the UV list (camera icon) on the Object Data Properties tab? I'm not sure if the selected list entry there is relevant for baking and would use a UV Map node. This makes it clear which UV map is being used.

Yeah I did try that as well- still didn't fix the issue and still wouldn't explain why I didn't have to do that for the other objects... The projected uv map is enabled with the camera icon while the baked UV map is highlighted on data properties. Again, the setup that worked for all the other objects in the scene.

In the end I figured out a workaround. I had to select all of the faces in the object, separate selection, and the new object that was created baked correctly. Still no idea what was causing this problem in the first place but hopefully this will be useful for someone.


text:
How to show local axis of objects/gizmo when animating?
During animation gizmo axes isn't being shown. It is only shown when an object is clicked. Is there a way to always keep the gizmo axes shown?

Not that I know but I don't know why it's not the case


text:
How can I plug this .tga mask node into a gltf 2.0 file?

Until then the Blender documentation gives instructions for applying the metal texture, roughness, opacity and normal map to glTF files. I've been googling it a lot and I didn't find anything right.
What this file does or is supposed to do is provide transparency with mirrors and glass.

Is the "mask" really an alpha channel? You could try plugging it into the Alpha input of Principled BSDF, but you also need to set the material's blend mode to Alpha Blend for that to have any effect.  However, if you're looking to make glass, like a car windshield, you might consider using a separate material with "transmission" turned on.  [Also, for glTF you can't multiply AO with the base color like you're doing here, check the docs on how to apply AO correctly.]

Hey, thanks for giving me an answer. You gave the right example, it is the glass of a car although it is also similar to another case of a magnifying glass.
The material (normal color) connected to the Alpha of BSDF of Alpha Blend in Evee gave result although on the place that it did not have to give it, as if it were upside down.

I was checking and there is a way to connect an AO node. Is it something similar to this?


text:
How to get rid of pixel/fireflies things in cycles?
I've been trying to learn how to use the Cycles engine but when ever I set the viewport to shading I get loads of bright pixels in the render and I've messed around in the settings but couldn't find a way to fix it.

There are few things that can be used to decrease the noise in the final Render.
First go into the view layer properties tab, Passes->Data->Include->Denoising Data(tick this one).
Now go in the compositing tab and create a denoise node and connect it between the Render Layer Node and Composite Node like the pic below. Then render it, you'll get a clear Output.

Thanks a lot for this!! It solved the problem :)

Instead of taking such a tedious way in the compositor, simply turn on denoising in the render settings @Maia. Note that this is only available in newer versions of blender like 2.93 or 3.0 to the latest.

The "loads of bright pixels in the render" are just ordinary noise, but are probably not fireflies. "Fireflies" refer to a specific kind of noise, which are caused by samples converging to unlikely results, thus leading to pixels being signigicantly brighter than they should. Certain microfacet distribution models such as Multiscatter GGX are known to cause fireflies, while others like Beckman or GGX are less affected. This is also why you should only switch to Multiscatter GGX when dealing with high roughness shaders.
So as long as you aren't using shaders or microfacet distribution models that are likely to cause fireflies what you are seeing probably aren't.
As for how to fix it, there are two simple ways to do that.
The first is using AI Denoising such as OpenImageDenoise or OptiX.
The second is by experimenting with the Clamping values under Render Properties->Light Paths->Clamping.

Thank you, I leant a lot from this :))

The quickest and best option to doing this is simply this:


text:
Armature Issue: Mesh doesn't follow bone
I've attempted to create and rig a character from Baymax today and I've run into an issue where my rig doesn't follow the bones. Attached is a complete view of all of the bones, the weight paint for that bone, a video of me moving the bone, and the Blend file. The expected outcome is that each bone should be able to move the designated part of the mesh completely and not deform or shrink. I am also intending this for use on the Roblox platform.
Thank you so much for your help!

Video
Blend file

hello, please share your file: https://blend-exchange.com/

You do have an Armature Deform modifier on the mesh with the armature set as the target, right?

To add to Chris' answer, you can parent With Empty Groups, and assign the vertices to the vertex groups they are supposed to be part of

select your mesh, shift-select your armature -> press CTRL-P -> with automatic weights. Problem solved.
If you want that one bone just moves one part, you have first, to separate your meshes to this "single" moving parts. Then select e.g. the arm-mesh, shift select the armature, change to pose mode, choose your arm-bone and then CTRL-P -> Bone. Repeat these steps for all single meshes + corresponding bones.

Mesh doesn't follow bone because vertices are assigned into a more vertex groups ...
Like this part is assigned at the same time to the Bone, Bone.001, and Bone.002 ... it means each vertex position is influenced by average of those three weights.

Should be assigned only to Bone.002
You can fix that by setting to other Bones > Vertex Weight > zero, than press icon next to a number (Copy to Selected).
Or delete all Data Properties > Vertex Groups and with plus button create new groups. Just select appropriate vertices add group click Assign and name the group my bone name.
Like that you don't have to separate mesh into solo objects.


text:
Flatten the mesh
I was trying to combine a drawing I found on the Internet, a face and a body.
Once joined however I encountered problems, vertices are not the same number so I tried to connect them but the result is as follows
How can I resolve this?
I add the file (the original and my version), Maybe it is better to do a new join. Let me what do you think.

The bad shading comes from bad split normals (which are the normals that determine the shading), go into the Object Data panel > Geometry Data > click on Clear Custom Split Normals Data:

Then activate the Auto Merge and the Snap to Vertex options and simplify the topology:

If you want to remove the Sharp Edges (the blue edges), select all and press CtrlE > Clear Sharp.


text:
Python - How to prevent Undo from unloading image data blocks
I am working on an add-on which has a complex user interface and an integrated asset manager (Think blender kit interface). As such I want to load a large number of small thumbnail images into blender on launch, or alternatively when a modal operator is first called. Unfortunately any images from bpy.data.images I load in using app handlers (see below) or using the modal operator are removed by Blender's undo function when the appropriate undo step is removed.
Does anyone know how to prevent Blender from removing images when Undo is called? Currently I'm simply checking to see if Blender has removed the images and reloading them if it has, but this is not exactly efficient.
bl_info = {
    "name": "ImageLoad",
    "author": "Richard Rose",
    "description": "",
    "blender": (2, 90, 0),
    "version": (0, 0, 1),
    "location": "",
    "warning": "",
    "category": "Generic"
}

import os
import bpy
from bpy.app.handlers import persistent

def image_load_init_on_activation(dummy):
    bpy.app.handlers.depsgraph_update_pre.remove(image_load_init_on_activation)
    load_images()

@persistent
def image_load_init_on_load(dummy):
    load_images()

def load_images():
    addon_path = os.path.dirname(os.path.realpath(__file__))
    image_path = os.path.join(
        addon_path,
        "assets",
        "test_image.png")

    if os.path.exists(image_path):
        img = bpy.data.images.load(image_path, check_existing=True)
        img.use_fake_user = True  # does nothing

bpy.app.handlers.depsgraph_update_pre.append(image_load_init_on_activation)
bpy.app.handlers.load_post.append(image_load_init_on_load)

def register():
    pass

def unregister():
    pass


text:
Using downloaded materials
I know this question seems like it's answered elsewhere however I'm having difficulty :
I have downloaded some blender material files and I have followed all instructions I can see such as :
Going to file, appending material to current project, going to a specific object panel, selecting the new material (let's say a brick one for this case.)
All it does is shade the object black.
I unchecked the "use nodes" button. However if I don't use th nodes the material stays a solid colour.
I have unchecked the "use nodes" and attempted to paint with the new material but it just appears one solid colour (yes I check in the rendered scene as well)
I'm missing something obvious I'm sure but I'm not seeing any other instructions anywhere or anything obvious.. Please help!

Material or texture?

Welcome the Blender SE. One of a number of problems could be the cause. You can upload a sample of your file for people to look at in order to get an accurate idea of the trouble: you can upload your scene file to http://blend-exchange.giantcowfilms.com/ .It could be as simple as using the wrong render engine or viewing it in a render mode unfamiliar to you.

Black shading could simply mean you are appending cycles materials into a blender internal scene or vice versa, or that a material output node is not connected to the rest of the node tree if you are using cycles, or the incorrect output is being used (surface output for volume shader for example). Without more clear information (images, simplified as much as possible sample file, ect as an edit to your question) people will have to guess in order to try and help you.

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


text:
Shading glitch in Blender
I imported this model from Maya, though the mesh is still "Weird" in Maya. I'm unaware of the issue. The hand mesh I used has this shading problem, it also messes up the AO bake I try to do. Though I'm using smooth shading the flat shading shows the problem I suppose. How can I fix this?
[][[]2

Possibly related https://blender.stackexchange.com/questions/52492/auto-smooth-shading-of-old-file/

As was imported  need to clear custom split normals that were likely added, otherwise auto-smooth.

Thank you @Timaroberts that fixed it! I'm happy that this annoying issue is fixed finally. Clearing custom split normals, is that something I should normally do when importing models?

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


text:
What lighting settings would be used to achieve colored and soft directional light
In reference to this video: https://www.youtube.com/watch?v=SbCJKfol-WQ and here's a screenshot of the result:

The person that made the video said they didn't use any materials, it's just Blenders default diffuse and that all the color comes from the lighting. What lighting would be used to achieve this white paper effect?

Looks like a simple sun lamp with a pink-ish color tone and a large radius


text:
how do I animate particle key properties?
Most properties can be animated by right clicking and selecting 'insert keyframe' but the keyed particle key properties (properties such as 'Time:' and 'Duration:') don't give that option when right-clicked. Right clicking the box containing the list of particle keys does give the option, but adding a keyframe for that doesn't seem to do anything. Is there any way to alter these particle key properties?

Blender lets us animate "almost" any value that we can adjust, there are some values that do not support being animated. These either don't make sense to animate or might cause issues if they are animated. Thse values will not have any keyframe options when right clicking on them, if you press I with the mouse over them you will get a warning message at the top of the window telling you it cannot be animated.
The number of particles, start and end of the particle emission are some of the values that we cannot animate. You will find others, like initial orientation and velocity, as well as physics type.
Some other values like render resolution and start/end frame also cannot be animated.


text:
How to show transforms of Child Of or Copy Transforms constraint
I am trying to find a way to make the transforms from a Child Of or Copy Transforms constraint visible.
Let's say the bone is in its default position and with the constraint activated changes to a position.
I need to keyframe any transforms out of the default position.
How could one accomplish this? Child Of and Copy Transforms constraints don't change the transforms.

I found the solution it was an answer in this question: Is there a way to convert a constraint to a keyframe?
You have to use Bake Action and then tick "Visual Keying" and probably also select the bone you want to bake the action for. This will make keyframes for any visual transforms.
Also in Pose Mode you can select bones and hit Ctrl+A and then use Apply Visual Transform.
I think you can insert keyframes for it with I -> Visual Transform too.


text:
How to clip Background Sky Texture to above Horizon
As the title says, I'm looking for a way to clip a Sky Texture Background to above the Horizon only, anything below it should be black.
I tried using the clip function of the mapping node but the result is something else. I also tried combining the sky texture with an rgb node with a mix shader and using the mapping node as Fac but didnt find a solution.
Please show me a working node setup.

you talking about cycles here?

You can use Generated texture coordinate with World to read Z axis on -1 to 1 range. Here -1 is straight under, 1 is straight up and 0 is the horizon. Taking it from there, you could simply use Math node to test for Greater than 0. Math node returns 0 for under 0 and 1 immeadiately above 0 so you can achieve a sharp mask.

For smoother options you could use Color Ramp node, it even conveniently ignores anything below 0 in the range.
EDIT: Here are couple setups for Color Ramp. First ColorRamp range from horizon to Zenith, horizon is on the left of the ColorRamp at value 0.0.

And here we have shifted the -1 to 1 range between 0 and 1 by adding 1 and multiplying by 0.5. Horizon is in the middle of the ColorRamp at value 0.5.

Thank you very much, your a genius! Btw I used it for the Fac of a Mix Shader that I mixed a RGB on black with, now it works as intended.

Ok, so I added the Color Ramp between the Separate XYZ and the Color/Fac and it works, the only problem is, it doesnt go below the horizon. Gotta figure out how to achieve that. The good thing is you get the easing.

@JohnMcDon I added some ColorRamp examples.

Thanks again, I already implemented the Add and the Multiply node to move the border and control the easing. I made a node group for this but it's rather meant to be used as a factor for a mix node. If you wanna check it out: https://blenderartists.org/forum/showthread.php?449053-Node-Group-Texture-Axis-Clipping-WIP&highlight=


text:
How to inset faces with scale in to the center of the face?

Is there any way to inset a face with a scale property to avoid the mesh from distorting?

The top image is a figure representing the face I am trying to inset.
The bottom image is a figure representing the distorted mesh after inset.

As seen from the following images the inset causes distortion in the mesh. Is there any way to avoid this, possibly by using a proportional property or scale setting to avoid unnecessary overlapping of the mesh?

Which command did you try? Inset with "I" ?

Yes I was insetting with the "I" command.

plz attach your file here https://blend-exchange.giantcowfilms.com/ for detail inspection


text:
Can I model a transparent prism in Blender
Prisms can split while light into coloured components. As Blender is not really a full simulation system for light, I’m guessing that effects of light splitting by prisms or such like can only be faked. Has anyone tried?

maybe related: https://blender.stackexchange.com/a/1603/19287


text:
Falling bricks building the walls of a house
I want to build a house animation from ground up to the roof.
Is there a way to automate falling bricks that are building the walls of a house? I thought about the buildup-modifier, but the modifier only builds up polygon per polygon.
Im using Blender 2.8.
Any help would be highly appreciated!

I would try using making a rigid body simulation, upside down so that the bricks are animated to fall down from your model. Then, once the animation is baked, flip it 180d so that it is oriented correctly. Finally, play the animation backwards. If you want it to be layer-by-layer, you would have to find a way to bake each layer individually (If your bricks are individual objects, just select each layer to animate and play them in the right order).


text:
Colorize bronchial tubes from wide to narrow
I want to colorize these stylised bronchial tubes in an animation from the top (wider tube) to the bottom (narrow tubes). Do you have an idea how to achive this? Maybe with animation nodes? How would you do it?
Ideas are very welcome, thank you in advance!

Have a look at the answers here, and the links out to @Pali's OSL scripts. 'Thickness Shader' might be a good search-term.

I would do a UV Unwrap > Project from View, align the UV islands (subtrees) along the Y(V)-axis, and use a UVWrap modifier with 2 Empties or a driver in the Mapping Node to animate it:

If you want to make it perfect you need to rotate and align every branch top-down. I did it only for the main branches:

Set the extrapolation mode for the Image Textexure node to Extended:

Use the UV Warp modifier or the Y value of the Mapping node to animate the color.

Very smart solution! Thank you @Blunder!


text:
subdivision problem
I started learning blender a month ago, I'm trying to make a jukebox but I got some problems
This is what I've done so far:

When I add subdivion:
Adding holding loops(?) helps but creates artifacts and a "nipple":
How can I fix that? obs: I used knife project and extrude to create the speaker, maybe thats the problem.


text:
Extracting prominent edges from model
I have a model of a vehicle, I can't show the entire vehicle for confidentiality reasons, but this is an example of one of the panels that makes up the car: Car model and Car model in edit mode.
My end goal is to create a 3D mesh which only contains prominent edges of the model. E.g. This image shows the prominent edges of the model. These edges are extracted from the rendered image of the model using Sobel edge detection.
I've tried extracting a depth map from blender along with the rendered image and finding the corresponding depth for each white pixel in the edge image shown above. However, since the edge image does not detect the true edges with 100% accuracy, the corresponding depth is sometimes taken from an adjacent pixel.
So I think I need to extract the edges directly from the model. Is there some way to automate this process? If not, what would be the best way to manually get the edges? Can I trace over the model or should I just manually select all the edges myself?
Thanks for your help!

Blender includes an edge and line based NPR engine called Freestyle. The settings allow you to use edge and outline detection or specifically mark which edges to use for line work.

I just had a quick look at the documentation for this and it says "FreeStyle rendering results do not have any Z depth information." Do you know if there is another way to get the depth information?

The render result can provide a z-depth pass. You can save it to an image or process it with python if you want.

Perfect, that should fit right into the pipeline I have now. Thanks a lot for your help!


text:
Deleting all groups with python API
Is there a way to delete all groups with the python API? What I want to do is delete all objects and groups in the current environment and then append groups from another file. I've figured out how to delete all the objects but can't figure out how to delete the groups.
Thanks in advance.

Delete all groups in blend file.
BlendDataGroups.remove(...)
import bpy

for g in bpy.data.groups:
    bpy.data.groups.remove(g)

remove all empty groups (no objects assigned) from blend file
empty_groups = [g for g in bpy.data.groups if not g.objects]
while empty_groups:
    bpy.data.groups.remove(empty_groups.pop())

Note: For my current version (2.79.4) there are some extra options all set to True by default to "force the issue" without having to unlink and unset users.
>>> bpy.data.groups.remove(
remove()
BlendDataGroups.remove(group, do_unlink=True, do_id_user=True, do_ui_user=True)
Remove a group from the current blendfile

See also.
Proper way to remove unused linked Group data-blocks


text:
IK Pole Target directing to wrong direction
I have no idea why the pole doesn't follow the target, instead, the pole avoid it, i've tried to ROLL the bone to 0 degree. The result still the same.

Can you be more specific about your goals and problems with this rig and show your IK settings?

Usually IK pole must've directing to the target, but this done the opposite.


text:
Splitting an Ico Sphere into chunks
I'm making a planet for my game using an Ico Sphere with a large number of subdivisions.
To be able to load and run it in Unity, I need to split it into more or less equal chunks (max. 65,534 verts).
Doing it by hand is obviously not an option.
Any idea how to do this without scripting?

You could use something like an Edge Split modifier to split all edges then Separate by Loose Parts

Won't it separate all individual faces?

You can mark desired edges as Sharp beforehand, or adjust the angle threshold


text:
Axis is crooked
The axis for all of my object manipulations seem crooked.

can you show us you UI without using a tool? You probably have Local or Normal Orientation enabled, but i can't tell from this image, since the tool information is replacing those icons/buttons.

This is a known bug. I have reported this many times. No fixes yet.
It happens after you applied deltas to animated keyframes. Then your axis will not respond to normals, world, local or anything else.
The only solution here is to extract faces of the mesh with P (part them) and then reconstruct them again by "Join" J
Then you will have your pivot point again in a fixed correlational position with the other joined elements.


text:
Interrupt script from gui button
I would like with python blender, a Gui with two buttons one to enter a forever loop, and an other to break the loop.  I'm afraid that when the loop runs the pause button will be unresponsive.
I already searched the forum ; I found that I can kill blender or Ctrl-c the console windows ; but this not what I want. In the first case i lost the data, in the second the python program is just broke (so i can't safely unpause the process.)
To optimize the process the user should be able interact with the scene and release the process again, If it wants to.
What do you think i can do to solve this ?
Thanks

Maybe I can run the GUI and the process on two separated threads ?

Look at the modal operator examples in scripts > templates > python For instance in this related example when the button toggle is pressed the modal timer runs till it is toggled.  As to threading, hard to know without knowing what the  other process is doing. Also possibly related


text:
Transparent Tinted Plastic with Chrome Finish Material
Does anyone know how to make this?
https://www.youtube.com/watch?v=Byra_SngQZw
I've tried using:
transparent with glossy and layer weight facing node,
glass with glossy and layer weight facing node,
glass with principled metallic and layer weight facing node,
and many other variations but I can't make it exactly like that.
I am willing to pay for your time using PayPal.
Thanks.

I think you might be very interested in this thread on Blender Artists.


text:
Unable to bring back images, they are listed in my scene collection, but when I turn the eye back on they don't show up,, even when I frame selected?
I am working on modeling fundamentals and have made several items, turned eye off as I finish and move on tot the next item.  But when I turn the eye back on to the items I created they do not show up., even when I click frame selected.  what am I doing wrong?  I'm still fairly knew at this...

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.

Hello and welcome. Please use the [edit] link at the
bottom of your question (https://i.sstatic.net/lXFuK.png) and add
more information on how you set up your project.
Add images that
might help us understand your scene and settings. See How to upload
an image to a post?.

Also please note that vernacular/imprecise terms like "eye" are not helpful to those who want to help you.  Perhaps hover over the eye and some help text will tell you the actual name of the button.  Best wishes to you.


text:
How to make Propeller Motion blur spin
I'm using a toon shader in blender for my animation project, and i'm trying to get a spinning propeller effect like this, but motion blur just isn't really getting the same effect, its just a blurry for some frames but for the most part it doesn't really look like its spinning really fast,
any ideas on how may i achieve something like this?

It doesn't seem like motion blur is really what you are after here. Seems more like stylized interpretation of it. So that's probably what you should be looking for - how to draw a stylized spinning propeller, not motion blur.

This might help - https://blender.stackexchange.com/questions/178537/how-to-get-more-speed-for-the-blade/179223#179223

Motion blur works relative to the frames you got. The issue with high speed motions like rotations and shakes, is that you just don't have enough frames to describe the motion to begin with.
A good example of that issue is in 2021's Dune: https://youtu.be/OHPkdMGI6D4?t=799

We're talking such a high frequency of motion that, [within a single frame], not only does [the wing] go down, it goes back up, and back down, and back up again.

One way to fix that issue is to use substeps (Eevee only), or render even more frames per second:

But you can only go so far before it costs you significantly more render time for diminishing returns.
The other, simpler way, is just to reduce the motion itself. Unless you really want absolute photorealism, you can do most propellers with about five revolutions per second. That's going from 0° to 1800°. Here's how it looks in 24fps with default Eevee motion blur:


text:
UV surface color via scripting?
I'm trying to make a parametric surface where the color depends on its coordinates.
Something like this figure

The biggest constrain that I have is the color function is quite complicated, so it has to go into a python script (and basically all tutorials are done through the graphic interface of blender)

I would use parametric equations using geometry nodes with shader nodes.  https://blender.stackexchange.com/questions/305963/solving-mathematical-xyz-equations-in-geometry-nodes

Another one would be https://blender.stackexchange.com/questions/212723/changing-the-angle-curvature-of-a-mesh-created-using-python-and-parametric-e


text:
How Can i make an object look less subdivided when it is not closer to camera?
I know there is some way to make an object look actually subdivided when it is closer to camera and when the camera goes far from the range the object looks less subdivided in blender?
Can someone help me remember that modifier or technique which works like that?

Look into Adaptive Subdivision

Just keep in mind that Adaptive Subdivision only works in Cycles and you need to enable the Experimental Features in the render settings

You can also control the Decimate or the Subdivision Surface modifer's resolution with a driver, based on the distance between the object and the camera.


text:
My cycles render gives the wall unusual black dots and glasses reflects the HDRI image?
When I render my images in cycles , the walls get an  unusual shading like black dots( are those noises?)  and also my glass reflects the Hdri image
How can i correct this?

for glass you can check out this: https://blender.stackexchange.com/questions/248852/how-do-i-remove-hdri-image-from-reflections-image-added

Yes, the "black spots" look indicative of over-aggressive de-noising in what would otherwise be a noisy area. Try increasing your sample count and if necessary, increase the number of diffuse bounces.


text:
how to change Rendering Tile in cycle?
I am using Blender 4.0 and  i saw the rendering tile in cycles hs changed. While I am  using older version there are lots of small number of tiles while rendering a image in cycle. But In 4.0 version there is something called 0/4 rendered tiles with one big tile as shown in pic .How Can i change to old setting which gives rendering tiles like 2.8 version?

Since Cycles X update, the tile size isn't supposed to matter so much, and cpu and gpu can work together on the same tile with no issues etc.

It looks like you're rendering a 4k image. The default tile size is 2048, so it will not be rendered in one tile. This setting exists for quite a long time now and is not new in 4.0, maybe you have not rendered in 4k before? Or in older versions you had the default options changed to either a larger tile size or disabled "Use Tiling"?

Does this answer your question? blank area on render

It appears that your tile size may have defaulted to Blender's current default tile size, 2048 pixels. To change this, in the Properties window, go to Render >  Performance > Memory > Tile Size (Use Tiling should be checked).

The number of render tiles is determined by the resolution size of each tile and how many will be needed to fill the pixel area of the render resolution. For example, if your render tiles are 100 pixels and you render a 2000x1000px image, it will need 200 render tiles. See below:
(render WxH divided by tile WxH: 2000x1000/100x100 = 200)
Hope this helps!

Your formula works in your example, but not in general, since render tiles are square and images probably not. For example, the original problem of the question: rendering a 4k image (3840×2160) with the default tile size of 2048. Your formula says you need (3840×2160)/2048² ≈ 1.98, so 2 full tiles. But you need 4. With $w$, $h$ the width and height of the image and $t$ the tile size, the formula is number of tiles = $\lceil w/t\rceil × \lceil h/t\rceil$.

True, good call on the updated formula. The example I gave was an easy one to illustrate the concept of pixel 'area' needing to be calculated by tiles. In your example with a 4k image, Blender will say it needs to render 4 tiles, but only one of them will be a full 2048. The other three will total the remaining image area, which will be less than 2048². What all of this means practically is that the time it takes to process that first tile will be much longer than the next 3, so to optimize your tiles for the best memory savings, you'll probably want a more even spread of smaller tiles.

That's correct, the other 3 tiles will render quicker. But with the introduction of Cycles X I didn't see a big improvement when decreasing the tile size to make them fit more evenly into the render size. Cycles X with modern GPUs simply renders faster with larger tiles, so if your hardware can handle it, it might even be better if you switched the tile size to 4096, then even 4k images are rendered in a single tile. For the default size of 1920×1080 a tile size of 2048 is sufficient for all renders with 100% or less (for example test renders etc.).

For illustrating the concept - I voted to close this question as a duplicate because this has already been explained here a few times...

Wonderful insight. Very valuable information.


text:
Cycles cant render because of openimage denois
I am using blender 3.4 version and I couldn't render my image in cycles . I enable the denoise button in render tab and when i finally render in cycles its showing as error "built without openimage denoise"
But when I disable the denoise buttons and render the image renders but the output is full of noise and blurry

Hello! Can you please provide a .blend file?

I don't think a blend file will help. It sounds you have downloaded a custom Blender version that was build without the OpenImage denoise. Have you downloaded Blender from the official site or do do you use Linux? Here is a similar question: https://blender.stackexchange.com/questions/178315/i-installed-blender-on-linux-and-by-default-openimagedenoise-is-not-enabled-ho

Yes I use Linux Debian 12


text:
Scale a ring curve while maintaining the ring width
I have these two circle curves in 2D mode. If we scale this object from it's center, it will shrink the the width of the ring.
Is there any way to rig this to make the ring smaller while maintaining the ring width?

I don't think it's possible, as Tim Levinsson said you can scale down then fatten with alt S but it's a manual and approximate solution

alt+s doesn't work on flat surfaces.

This needs more info. Do you want this for animation or editing? For animation i would go with "drivers" and set up a 1/scale relationship between curve and bevel object. For editing i would do the same with a script.

I figured it out.

Go to edit-mode, select the outer edge of the ring and make a hook.
Select the inner edge of the ring and make another hook.
Go to object-mode and select the empty for the inner hook. Make driver for scale x, y and z.
Open Drivers editor and edit the existing variable (or make a new one if it doesn't exist).
Change the driver variable type to Transform Channel.
Select outer empty as object.
Change type to X Scale
Change space to World Space.
If you want to maintain 0.1 tickness then in the expression type "var-0.1" without the quotes for the expression.
Hide the inner empty.

Now if you scale using the outer empty, the ring should keep it's thickness.
Here is the example scene:

Select the ring in edit mode and scale it with alt+s

alt+s doesn't work on flat surfaces.


text:
recalculate outside (normals) for all objects
due to a sketchup import half my objects are inside out
how can i make a script (novice) that selects all objects (one by one?), put them in edit mode, recalculate outside (cntl n) and back into object mode.

The easiest way to approach the building of a script if you are not keen on python coding would be to perform all the tasks you need, then copy the command that shows up in the info editor and paste in a loop that iterate through all the objects.

Here's a possible code:
import bpy

if bpy.context.selected_objects != []:
    for obj in bpy.context.selected_objects: #loop through all the selected objects
        if obj.type == 'MESH':
            bpy.context.scene.objects.active = obj
            bpy.ops.object.editmode_toggle() #enter edit mode
            bpy.ops.mesh.select_all(action='SELECT') #select all objects elements
            bpy.ops.mesh.normals_make_consistent(inside=False) #recalc normals
            bpy.ops.object.editmode_toggle() #exit edit mode

Here's the script in action:

TX!! exactly what i needed :-)

Replace scene with view_layer in newer versions of Blender ♀


text:
Blender is running slow
I have a 3gb RAM laptop that has a 512 Nvidia quadro fx graphics card but blender is slow (lagging) when i subdivide my sculpture to make it smooth.Does anyone know why ?

You might want to try using smooth shading rather than lots of subdivisons. Also, its slow because subdivisions require a lot of computer power.This is expected behavior so to speak.

The answer is actually pretty simple, subdividing creates more edges which causes it to need better hardware. Blender simply lags because your computer is not able to handle the smoothing.

You need extra RAM. On top of that, you'd need something to cool down your laptop, especially when it can overheat. In fact, overheating can lead to crashes. If you are getting more RAM, also get a cooling tray like DefenderPad.
https://youtu.be/L6FlK1VJetQ


text:
How to make a Copper/Rose Gold smudge material?
Help! How to make such material procedurally in cycles

Please read https://blender.meta.stackexchange.com/questions/2449/what-is-the-problem-with-posting-an-image-or-link-and-asking-how-do-i-do-this

Maybe change the title to  "How to make a Copper/Rose Gold smudge material" So its more useful to others in the future

Did you tried something that comes close? Add details about what you tried, for others to see your current approach.

I would just use a simple principled shade.
Slide the metallic and specular (forgot to change specular) close to 1.
Choose a rose gold color and use a texture in your roughness. I put two options, a procedural way (noise texture stretched with mapping node) but I think an actual texture image looks better.
Use an HDRI so you get more realistic reflections.

My attempt to make material like on the picture

My node setup

Please do not just post an image of your nodes, and be done. Your answer would be so much more helpful if you explained what each part was doing. Worse you have node groups in there that we can not see. Finally with no explanation, the unused nodes look useless.


text:
How to make sharpen node in cycles material editor?
Have anyone tried to make node (effect/filter) like in substance designer (Sharpen) in cycles?
Example:

The only way to reproduce exactly what SD is doing here would be to run a convolution matrix over the texture in Cycles, which, IMO would be a heroic, but uneconomical way to do it

Why developers haven't yet added filter nodes like this?
This would allow the creation of more complex procedural materials

@0xFFF because use cases are rare and very specialized, it would be hard to develop something that is useful to many people. These things are perfect example of additional community created value where the Blender itself only caters to making node environment flexible and robust enough to allow for complex setups.

it would actually be pretty useful to write a little OSL node to run a 2  or 3D convolution matrix of the user's choice over  2 or 3D  textures; I think it would significantly expand the range of procedural textures that could be cooked up reasonably quickly ..

I found some material on this topic. 5x5 Convolve for Cycles Nodes Materials
There is a 5x5 convolution matrix with a few kernels provided: Sharpen, Box Blur, Gaussian Blur, Edge Detect, and Emboss.
Download scene from Blendswap


text:
How to make corect sub d topology?
I want to make corners like on this picture.

Now I have result like this
and like this (not clean)
Now my lowpoly wireframe
Have any ideas how to make clean corners like on the referens?

Different geometry
It's hard to tell from a single photo the exact geometry of the reference object, but it seems to me that there is no hard edges running up from the vertex of the triangle you are pointing with the black arrows.
The side looks in my opinion flat above that point, while it had different heights after that. I sketched the shape considering the two quads in the bottom left part of the image as if they were displaced from the other surface.

Starting from this simple geometry, I then added a few loopcuts and tweaked the crease of some edge to control the curvature of the surface. Here's the final result:


text:
Why my particles do not appear on the top of the mesh?
So I was watching the Donut tutorial by Blender Guru and I added sprinkles as particles but it is not working as it did for him. My sprinkles spawn in the middle of the iceing and when I scale it, it does not change the position rather increases the size. I tried searching how to move particles but it is not helpful.
Blender File:

Hello and welcome. While files, images, and external videos or links may be helpful additions they should not be the only way to obtain information about your issue. Don't make understanding your question rely on downloading a file, watching a video or visiting an external site. Use the builtin tools to upload images or gifs, along with thoroughly explaining the problem in written form so it can be indexed and searched for thus helping future visitors with similar issues.

Because of the negative offset on the Solidify modifier, the normals are flipped. Select the icing, enter edit mode, select all, and then pick Mesh > Normals > Recalculate Inside from the menu at the top:

You will probably want to move the particle object back onto its origin point as well, as particle systems base their locations off an object's position relative to its origin.

Lastly, you will want to enable the rotation setting of the Hair Particle system to be able to randomize your sprinkles. Remember, you must adjust the "Phase" value away from default before the "Randomize Phase" will work.


text:
How to apply makeup on face with different principled bsdf shader?
I have made a human model with a color map, and I want to paint my makeup with different IOR and other values on different map so it won't mess with the skin detail. Is there any way to make a mask so that I can paint a makeup color map that also become a mask of a shader?

Sure, create a mask, add a second shader and use a mix shader node to add your makeup on top.

Drive a Mix Shader node’s Factor with the resulting Black And White texture.


text:
How to apply custom scale other than 1?
I want to keep the size of an object, but I need to make the scale of different objects uniform to keep the hair particle the same.
How to apply custom scale other than 1 without actually scaling the object?

Scale by 2 in Object Mode, go into Edit Mode and scale by 0.5? (or any other combinations scaling by x and then scaling by 1/x)

Just divide the object scale with target scale number, then apply scale to 1, then multiply the object scale with target number.


text:
Color Problem in Render
I've searched for countless hours for a fix to this problem.
The thing is:
1- I have a design with #F8F7FD on the Background and I'll need to put some 3D on top of that.
2- In blender, I have a scene and the floor material needs to be exactly on the same hex code to seamlessly blend in the design.
3- So in the Material, I've used the #F8F7FD hex and removed the specular and maxed out the roughness.
4- Using Filmic automatically makes the scene darker, the usage of a hdri affects the color on the floor and messes up the exact color that I need. The standard color management makes the color brighter. Using the #F8F7FD as the BG color lightens up the whole scene and messes up the floor texture.
Can someone help me on this?? Basically I just need to render in the exact color on the floor to seamlessly blend in the design.
P.S. Also tried using the floor as a shadow catcher but for some reason this happens to the shadows...

Have you tried using just the diffuse instead of principled BSDF ?

That's not really a problem it's just how path tracing works, cycles just tries to mimic real world physics. If you'd take a bright light and pointing it onto any colored (slightly reflecting) surface it won't be the same color as before. I'd suggest use cryptomattes and try to match the color in comp.

Hello and Welcome. Do you really need to render a Background? because you could render with transparent background and the put tha render on top of your design

Hey Emir, I tried and like you see in the image, the shadows get messed up for some reason

I need the geometry to be on a "floor with shadows casted on it" and integrated into the exact color on the design.

I'm not sure what your settings are, but with transparency should work, basically you need a plane with shadow catcher ON and transparency under render settings

Then you need to go to the compositing tab and use "Alpha over" node to connect your background image to your render.
Here is an example with the image background that you posted

Yeah I did that with the transparency and the shadow catcher but for some reason, in the render, the shadows gain noise and other shadows appear ( like in the picture above that ie uploaded ). I kinda solved it by using a hdri and a shadowcatcher and changing the color management to Standard, now I just have to figure how to tone down the shadows.


text:
Noise in the animation render
So I did a render for a small animation that I need to put on a website ( needs to be small in size to load fast ). I used 500 samples in cycles with Denoise in this render but it seems to get some pixelation on smooth surfaces and when I then export the PNG sequence from AE or Premiere it gets way worst! Any ideas?

Does this answer your question? How to avoid noisy renders in Cycles?

I already did all that , with the Denoise etc. I think the main problem is the pos production program that compresses the hell out of the animation. How do you guy usually export an animation after blender ( maintaining the high quality without ending up with a huge file ? )

Related: How to reduce the output video size?

Tried that already, I pixelates a lot and creates a lot of artefacts :/


text:
Sphere not following path correctly
So Im trying to make this sphere to follow this spiral, but when I parent them the ball starts to spiral but outside the path! any ideas?

did you apply scale/rotation? if this doesn't help, please provide blend file

Could you elaborate on what object you parented to which one ?

If the sphere isn't currently at 0, 0, 0, press alt + g. the current location is added as offset to parenting/follow path

Yeah I did apply all transforms to Both the small sphere and the spiral.

I think its parenting to the spirals origin point

hello, as Chris says, it would help if you could share the file: https://pasteall.org/blend/

https://pasteall.org/blend/e26aca237ccc4097b022169fa6736d27

change position of your sphere to 0,0,0

add object constraint "follow path" to your sphere, target: spiral

tap on "animate path" and press Space

result:

Thanks Cris! The problem was the position, I though that by applying the transforms on the sphere would work but no.

Thanks ! youre a legend !

thank you. you are welcome!


text:
dynamic paint in render mode breaks geometry

In Solid Mode the Dynamic paint works properly and the footprints are clearly visible. But in render mode the geometry gets collapsed . I have used displacement and noise textures fir the sand material .. Is this because of that or do i have to add more geometery to the sand

Most probably it is the displacement, as that actually changes geometry, and is not visible in solid viewport, only in cycles.
I guess displacement occurs after the dynamic paint, which leads to the displacement destroying the footprint shape.
Try changig the order of the modifier stack, having the dynamik paint after the displacement.
If that is not possible, try to apply the displacement before using the dynamic paint.
If you are using the displacement not in a modifier but in a displacement node:
The shader nodes always gets evaluated after the modifier stack.
But as long as the dispplcement occurs after the dynamik paint, it wll destroy your geometry. So you cannot make a node setup work with your desired dynamic paint effect. You need to change the evaluation order so that displacement occurs first, which means you have to move your displcement from the shader nodes to the displacement modfier, where you can put it before the dynamic paint.

For further suggestions i would need to  have the according .blend file

Sure But the thing is I did not use the displacement "modifier" to this , instead i applied displacement node

so ovviously the displacement shader node seems to get evaluated after the dynamik paint (which i would have expected the other way round). I think you have to rearrange your sccene in a way to make sure the dynamik paint is evaluated after the displacement, maybe by applying or baking the displcement into your scene before doing the dynamik painting.

@maddes8cht The shader nodes are always evaluated last before render, so all modifiers etc. are evaluated before them. For example it makes no sense to have texture coordinates, normals, bump nodes etc. be evaluated before the actual geometry they should be working on.

@GordonBrinkmann Ah, you are right. So yes, he has to change the setup so that displacement occurs first, before the dynamik paint. It will never work when displcement occurs after dynamik paint. To do that he might move the displacement into a modifier

Guys Thank you so much it worked .. Means a lot

Glad that it helped :)
Now, if the Answer was of value, then have a look here:
https://stackoverflow.com/help/someone-answers


text:
AMD rx580 not supporting Blender 2.93 GPU
I recently Bought the AMD Rx580 graphics card for my blender . But the latest Version of blender didnt support my graphics card since its using HIP.. So i tried to install the older version 2.93 to check whether OpenCL can support my graphics card or not for GPU rendering Cycles...But still it shows " No compatible GPUs is found" as shown in below image .. What should i do now.. Someone help me please

As mentioned in Blender 2.93's  Cycles GPU requirements documentation, your GPU should theoretically function, but you need to install specifically the "Pro" drivers from AMD, which should be this one for an RX 580. Try a clean installation of that driver if needed, reboot, and see how it goes. Otherwise, I would suggest trying to report a bug, but I doubt the devs will do anything for an unmaintained version.

see my answer bellow

Can You tell me Which specific drivers I should install? I tried Raedon ProRender Version 3.6, but when i try to enable the addon Blender automatically closes or crashes

ProRender isn't a driver, it's a render engine. Again, see my answer.

https://blender.stackexchange.com/questions/245136/my-vga-is-not-displayed-in-the-section-cycles-render-hip

As mentioned in Blender 2.93's  Cycles GPU requirements documentation:

OpenCL is supported for GPU rendering with AMD graphics cards. Blender supports GPU rendering on graphics cards with GCN generation 2 and above. To make sure your GPU is supported, see the list of GCN generations with the GCN generation and supported graphics cards.
On Windows and Linux, the latest Pro drivers should be installed from the AMD website.

Your GPU uses GCN4 (source), so it should theoretically function. But you need to install specifically the "Pro" drivers from AMD, which for your RX 580 should be there:
Radeon™ RX 580 Drivers & Support | AMD
Try a clean installation of that driver if needed: uninstall whatever AMD driver you have, reboot, install the new one, reboot, and only then open Blender to see how it goes.
Otherwise, I would suggest trying to report a bug using Blender's menu Help > Report A Bug, but I doubt the devs will do anything for an unmaintained version.

Thank You so much .. I installed the driver . Now what should I do?

again, see my answer ;)

Thank You so much I followed the steps and installed driver..but linux doesnt allowing to install it .."permission denied" is displayed .

BSE is only for questions about Blender (plus I don't know much about Linux). If you need help installing drivers on Linux I suggest you to ask that specific question on [SU], don't forget to mention precisely which Linux distro you are using as answer vary from that.

Okay Thank you for your time


text:
How to add objects into scene from file
I would like to know how to add an object into a scene just by dragging the file .. Is there any addon for this feature or something??

Please explain what you saw that seems there could be an addon or something? This would help understanding what you want. Are you talking about the Asset Browser? Or do you specifically want to drag a complete file into Blender? Well, for the latter, just drag a file from the Windows explorer into the viewport. You then have the choice to either open the file completely, link to something from that file or append something in the current scene. Since every file contains multiple data blocks, you cannot simply drag a file to open a single object without choosing it manually from all contents.

HELPS A LOT THANKS


text:
How to rectify "Use flow" keyframe when its not working?
I wanted to stop the fluid flow after certain key-frame but even though i inserted a key frame in "Use flow" check box by checking and unchecking it , the flow keeps on producing .Help me to stop the flow after certain key-frame

Sorry, this is a bit hard to understand. How many keyframes did you insert? You inserted "a keyframe" (= 1 keyframe?) "by checking and unchecking it"? So did you set the keyframe while Use Flow was checked or unchecked? And if both, on the same frame or different frames?

you have to have 2 keyframes: 1 unchecked, and one frame later checked

I had different keyframes For example Till  Keyframe 10 is checked and keyfrme 11 is unchecked . But still water keeps on flowing


text:
Why Does Principle Volume Doesnt produce darker shades of color?

EVen Smoke Simulation keeps appearing darker shade but i gave the exact hex code of the sand . But tornado and smoke sim appears to be darker shade


text:
How to create convex honeycomb thing?
I am new to Blender.
Created some thing earlier in Fusion360.

Now I need to create it in Blender. What is a right way to make it? (Not import to Blender but create it from scratch).
PS. Its not need to be 100% the same, some differences are allowed

show what did u try?

I'm in searching about cutting :) https://i.imgur.com/8OnUcZ3.png

You could give 2 Array modifiers to an hexagon, duplicate this hexagon with its modifiers and shift the duplication to have the hive:

Apply the modifiers, join the 2 objects, merge by distance to merge the adjacent vertices:

Create a circle, use it to cut the hive with the Knife Project tool:

Invert the selection and delete the edges:

Join the circle to the hive, in Edit mode extrude the circle, activate the Auto Merge and Split Edges & Faces option, then select all, press G and Enter, it will merge the 2 meshes:

Clean the topology (dissolve the useless vertices with some CtrlX, I haven't done it here), enable the Proportional Editing option, select the center and move up (to round you could also use the Warp modifier, or the Surface Deform modifier, or a Shrinkwrap, etc):

Extrude down to give it thickness, flatten on Z:

Thank you very much, instruction is clear, will try now.
If I want to make bottom side like 'dome', can I extrude first, then use step with Proportional Editing?
https://i.imgur.com/qKOvu33.png

oh ok in that case just extrude and you're good, don't flatten the extrusion

thanks! btw, what do you think about making 'dome' first (by revolving?) and then cutting out holes with a hexagonal cylinders array?

it would work as well but there's still the problem of how to cut the hive to make it circular


text:
How can i turn this "half pole" into a perfect cylinder
Im trying to make this type of lightpole

but i cant figure out on how i can turn this into a nice and round cylinder.
I can of course do it manually but it looks bad so is there any modifiers etc i cant use?

Create a torus, remove 3/4:

Cut off its half:

Fill:

Extrude horizontally and vertically, mirror (don't keep the inner face along the axis):


text:
Is it possible to merge several vertices at once?
I wanted to ask if it is possible to merge several vertices at once? like not having to select the two single vertices that I want to merge everytime and then merging them manually but rather select a bunch of vertices at one?
what I have:

what I want:

Make a selection including the vertices you want to merge, but not including other vertices which are close to one another that you don't want to merge, vertex menu CtrlV > 'Remove Doubles', adjust 'Merge Distance' in the toolbar.

While modelling you can use transform snapping to snap a vertex to the location of another vertex. Next to the snapping options is the auto-merge option. With this enabled vertices will merge as you snap them together.

When the snapping is disabled, you can hold ⎈ Ctrl while moving to enable it temporarily, this means you can move as you want and when you want to merge a vertex with another, hold ⎈ Ctrl to snap and it will also be merged, without holding ⎈ Ctrl no merging will happen.
If you snap and merge by accident you can use V to rip the vertex apart, ⎇ AltV will also fill in the hole made by the rip.


text:
Smoothing out hard edges on cycles material
I am working on creating a material, and have come to a small problem.
At some point in my shader I achive this result:

This is basically binary information, either black or white. For my case I am now trying to blur the transition between the black and white areas to achive a softer looking effect in the final result's displacement map. I want to be able to control how large the blur is (thinking of it as the thickness of an outline around the white spots).
I have already researched a fair bit on my own the past few days, but none of the examples I found seemed to apply to my case.


text:
Apply transformations does not work in automated process
I am facing a strange problem with Blender. I start Blender with a script as parameter which is supposed to apply all transformations to an imported fbx model. The import itself works fine.
Part of the code is following:
for o in bpy.context.scene.objects:
        print(o.name)
        o.select = True
        bpy.context.scene.objects.active = o
        bpy.ops.object.transform_apply(location = True, scale = True, rotation = True)
        o.select = False

When running the code like that, Blender does not apply the transformations. Instead it prints:
Warning: Objects have no data to transform

for every single  object.
The really starnge thing is, when I paste the exact same script snippet into the editor field and run it, Blender executes it like expected and applies the transformation.
I really tried to find a solution, but did not find one. Thank you in advance!

Also related in that you can run the operator once per scene by selecting the objects first.

What command line are you using? the order is important  Surely this can be done without a workaround such as the one suggested in your answer.

Make sure that you actually need to apply transformations. If you are writing an exporter, multiplying the object.matrix_world by the vertex position gives you the transformed value without altering the original mesh.
In case you still need to do it, do what batFINGER suggested.

Thank you for the answers. :-) I am working on a rendering pipeline and need the objects measurement for scaling and positioning purposes in the scene. The assets our client delivered have often many groups or parent/child relations, many different scalings, rotations, pivot positions in all layers and so on. I need also to reset the empties values, because their children inherit the transformations if a empty is a grouphead.

The answer from CoDEmanX to this question actually helped me solve my problem.
How to programmatically load a python script in Text Editor and launch it
I did exactly what is the topic of that post. I was not able to run the code from commandline argument script so I loaded it to the blender text editor and run it from there.
The code in the main function:
filename = os.getcwd() + "\\\src\\python\\blender\\render\\apply.py"
text = bpy.data.texts.load(filename)

for area in bpy.context.screen.areas:
    if area.type == 'TEXT_EDITOR':
        area.spaces[0].text = text # make loaded text file visible

        ctx = bpy.context.copy()
        ctx['edit_text'] = text # specify the text datablock to execute
        ctx['area'] = area # not actually needed...
        ctx['region'] = area.regions[-1] # ... just be nice

        bpy.ops.text.run_script(ctx)
        break

... and apply.py
import bpy

for o in bpy.context.scene.objects:
    o.select = True
    bpy.context.scene.objects.active = o
    bpy.ops.object.transform_apply(location=True, rotation=False, scale=True)

It also looks like as if initially a blend file with a Text Editor field has to be loaded to make that run.
Thanks again for your time and I hope I was also able to help solving future problems.


text:
Geometry node only distributed on specific area
Im trying to create a globe with some spheres coming out of it ( geometry node ) but I only want them to appear on land and not on the ocean. Any ideas on how to only distribute the point in the Continents?

Hello, could you add some information about the globe : Is it done using a mesh or a texture, uv coordinates or generated coordinates, etc ?

you can do this e.g. with a texture like this:

Nice! Thank you!!

You are welcome. If my answer helped you, please click on the checkmark left to my answer. Thank you!!


text:
Initialize totally empty background instance of Blender
I'm using Blender python api as one part of a larger pipeline, to convert between Collada versions (1.5 --> 1.4).  The simple script is this:
import bpy
import sys

argv = sys.argv

dae_in = argv[4]
dae_out = argv[5]

bpy.ops.wm.collada_import(filepath=dae_in)
bpy.ops.wm.collada_export(filepath=dae_out)

This little scriptlet is itself wrapped in a bigger subprocess call in a much longer script, farming it out to Blender's python instance to handle just this conversion piece.
It works fine but somewhat amusingly, even a background instance of blender appears to still load the default cube model into memory.
What is the command line option to get a background instance of blender without the cube?

Related https://blender.stackexchange.com/a/219252/15543

why don't you just delete the default cube with python!?

Hi Chris, that sounds GREAT.  Why don't you tell me how to do that with an example?

Put this at the head of your script.
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()


text:
Can anyone help me understand the difference in shading on these 2 models?
Can anyone help me understand the difference in shading on these 2 models and how I can get the rough one smooth like the smooth one? It's not just shading flat or smooth.
https://drive.google.com/drive/folders/1v-b0n7Qkr_4s5f15MP2WX5M1nn1l0x-V?usp=sharing

The left bush (the smooth one) has Custom Split Normal Data. You can delete it in Object Data Properties > Geometry Data. There is a button to remove it. Then the bush looks like the bush on the right side.
If you want to have the right bush look like the left one then add a Normal Edit modifier. Use type Radial (default) with Mix Mode set to Copy (default) and a Mix > Mix Factor of 0.950. In Object Data Properties > Normals the Auto Smooth checkbox must be enabled.

That was it, thank you!

3 mins too late for me :(


text:
Why is the vertex color interpolated differently in different cube faces?
I realise this might be a very simple and stupid question as I am just getting started with Blender.
I am trying to procedurally colour vertices to produce pseudo-colour maps.
I created this simple test with the default cube where I attempt to colour vertex 0 with red and the rest with black. I get the following result:

I understand that the colours are stored in the faces through the face loops, but I can't seem to understand why I would get a different interpolation behaviour in some faces (one is a triangular shape and the other two are rectangular shapes) and also why this interpolation is not linear. Is there a simple explanation for this? Are there alternative interpolations? Am I doing something wrong or missing something?
Here is the snippet of code I am using to produce this result (on 2.93.0):
import bpy
import bmesh

objectName = "Cube"
nodeId = 0
color = [1.0, 0.0, 0.0]

currentMesh = bpy.data.objects[objectName].data
currentBm = bmesh.new()
currentBm.from_mesh(currentMesh)
currentBm.faces.ensure_lookup_table()

if not currentBm.loops.layers.color:
    currentBm.loops.layers.color.new('Col')
colorLayer = currentBm.loops.layers.color[0]

for face in currentBm.faces:
    for loop in face.loops:
        currentVert = loop.vert
        index = currentVert.index
        if index == nodeId:
            loop[colorLayer] = (color[0], color[1], color[2], 1.0)
        else:
            loop[colorLayer] = (0.0, 0.0, 0.0, 1.0)

currentBm.to_mesh(currentMesh)
currentBm.free()

Thanks!

A quad is really drawn as two tris, and how it looks depends on which of the two diagonals you split it along. This article is about a emulator, but it explains the issue pretty well.

Thanks @scurest. It makes sense.

@scurest this would make a fine answer on its own


text:
How to enable double sided normals or double sided faces for rendering in python API?
How to enable double-sided normal rendering in the python API of blender?

Do you mean the Double Sided checkbox in Properties > Data > Normals?

thank for the response. Yes , I mean that only for imported meshes.

You can set Mesh.show_double_sided flag to True for all mesh objects:
import bpy

for obj in bpy.data.objects:
    if obj.type == 'MESH':
        obj.data.show_double_sided = True

Alternatively you can iterate through the mesh data blocks and set the flag:
import bpy

for mesh in bpy.data.meshes:
    mesh.show_double_sided = True


text:
Normal/Bump/Color created in Substance Painter doesn't appear correct in rendered model material
I created this

material in substance designer and generated the normal map, bump map, and color map and imported it into blender with a node setup like such

(note that I've tried both "Color" and "non-color data" with no difference between the two).
However, I end up with this in the render (zoomed in for detail):

Note that the handle part on the bottom left is lacking a material, and the entirety of the rest of the cup has the material applied. I've noticed that the noise shown is just an artefact of the default render I've set up.
As well, this is further strange because the material shown in the material viewer looks quite alright

Before you ask, yes I have quadruple checked that the material is applied.
Thank you very much for any help.

Does your mesh have UVs?

@JtheNinja Nope, that was the problem. Thanks man.

Turns out I hadn't created a UV unwrap of my model, and thus the texture/heightmap/normal map wasn't being applied.