1
$\begingroup$

Wow I think I'm stepping into some serious dark magic with this, but:

I'm struggling to give this shape, essentially an extended pill, a gradient material. The issue is pretty visually apparent, the spheres that round off the pill shape aren't being included in the material.

enter image description here

This is my geometry node set up. As a note, this is all being applied to a cube, whose geometry is just being discarded. The spheres are created as instances at the endpoints of a curve. So far, I've gotten color to work with only the linear portion.

enter image description here

What baffles me is that any of the material works at all. From the geometry nodes set up, the color data is associated with a curve, not a mesh. Yet, the shader (below) takes that data and applies it, successfully, to part of the mesh. How Blender is deriving a mesh's color from data associated with a spline is beyond me. But, the material color for the spheres isn't being similarly derived, and that's my issue.

So, can anyone elucidate this at all? Maybe I have to approach it from a totally different angle. From what I've looked up already, this feels like arcane stuff. Any help would be appreciated!

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

The problem is that you're feeding the geometry that contains the captured data only to the Curve to Mesh node. The Distribute Points on Faces node is using the geometry with no captured data.

To make it work correctly, you just need to use the geometry output of the Capture Attribute node for the input of the Distribute Points on Faces node. That way the generated instances will have the captured data from the point they were generated on, that data will then be distributed to vertices when realizing instances.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .