Geometry Nodes

That’s not a bug. You can quickly change the material of geometry by using an attribute fill node. Just set the attribute to material_index and the number to the slot number the material is in.

I also like using the attribute randomize node to randomize the material.

EDIT:
Wait a second. You are right. It does not work to assign a material index attribute to faces that were not created manually. Is that a bug? Or am I missing something?

1 Like

Hi Blender fellows!

Can someone help me with a little problem in the geometry nodes?
Ihm working on an Arrow made out of small spheres. The geometry nodes come in quite handy here.
My problem is, I want to behave my arrow in a way, where I can see through the spheres it is made of,
but in the same time the arrow itself should look/behave like a solid object.
So I only want to distribute the object points, where faces are actually visible for the camera, while at the same time be able to see the background through the arrow…
See the attached image to know what I try to explain.

Would be great if someone could help me, thanks!!

2 Likes

Would taking your original arrow and giving it a holdout material work? Then transparent film and compositing your background in?

Are you asking for like a “Backface Culling” of the faces that will have Points Distributed on them?

Yes, kinda. I want the “culled” Backfaces to have no points ditributed to them, depending on the camera angle.
As the scene will have a camera animation at the end, this has to be dynamic. Depending what faces or part of corresponding faces is visible at the current time/frame of the animation.

I think this setup does, what you want:

Using the Attribute Compare node gives you a hard cutoff for the ‘backfaces’, but I found, that using the Attribute Map Range node looks better when animating as makes it less jarring, when a face “flips” from being front-facing to back-facing.

5 Likes

Yeah, cool! Thanks! That looks exactly like I tried to explain.
Thank You!!

1 Like

hmmm, I can’t find that vector rotate node…?

maybe because it’s new in 3.0… because I´m using 2.9

The vector rotate node is in 2.93.
2.93 is close to stable, but if you need it really soon, you can always download an experimental daily build.

ah, okay, thnx!

1 Like

Hey guys! Here’s my new challenge. I instanced a card (simple polygon) on points. I need these cards to always face the camera but only be rotating in the z axis. Also, I would like to change the shader at every 30 degree angles. So from z rot 0 to 29, shader 1, from 30 to 59, shader 2 etc.

4 Likes

Weird alien paneling


It’s cool, but it relies on the solidify and bevel modifiers to look good. Since switches aren’t here yet, I have to manually switch to the union when I apply or render. The texture is a simple musgrave.

1 Like

Are you trying to achieve a doom-like 3d object?

This should do what you want.

The only thing left is the materials. For some reason, you cannot change the material on instances. To get the result you want, I would use the camera info shader node to factor a mix between whatever shaders you are using. (in one material)
Good luck!

3 Likes

Thanks but if I do that, the cards with match the camera rotation but I need the cards to be oriented to the camera. I found the way to do it. Shader is next.

4 Likes

You can change materials index with attribute fill, this with a little vector math maybe?

Camera info shader? Care to elaborate? :slight_smile:

1 Like

Here:
Screenshot (86)
https://docs.blender.org/manual/en/latest/render/shader_nodes/input/camera_data.html
Sorry, it’s actually called camera data (quite inconsistently) I thought you might be able to use the view vector to mix your textures?

Might be hard to get an exact number of degrees though.

But wait, you have the camera’s angle from your geometry nodes tree. Could you use that to assign an attribute and have that effect your shader?

1 Like

FINALLY! I’ve been (halfheartedly) trying to figure out how to do this for awhile now. Thanks! :smiley:

Edit: I spoke a bit too soon. I tried it out on my object, and…nothing. Now, I’m not exactly the most swooft and adept with geometry nodes, so it’s obvious I’m missing some important step.

Here’s a breakdown of my scene. Leaf Distribute is basically a blobby shape surrounding the tree that I want to want to distribute the leaf planes across per face (hence the name). Leaves are, of course, the leaf alpha that’s to be distributed. Here’s a shot of my scene. What exactly am I doing wrong?

edit 2: Nevermind. I got it. I’m dum. Thanks again.

4 Likes

I’m curious, are you doing a burning fire circle with stock flame videos? Can’t wait to see what you’re cooking up next.

1 Like