How to angle a volume inside a cube?

Hello,

I have this volume material which is contained inside a cube:

How could I go about making it so the volume follows the angle of the sphere beneath it?

Here’s the blend file:
roundedvolume_test.blend (1.5 MB)

Appreciate any help,
Thanks.

Hi,

Well, you can just adjust the edges of your Box Volume, that’s it.

Something like this below:

The more loop cuts you’ll add, the more smooth edges you’ll get in result.

Or, just add a Subdivision Modifier and you’ll get the most perfect result:

You’re gonna end up with something like this one:

Anyway, here’s your blend file:
roundedvolume_test.blend (1.5 MB)

Hi, that’ll deform the cube, however, I need the volumetric to follow the shape of the deformed cube without messing the effect itself.

Maybe 1.

Subdivide the cube a couple of times → using geometry nodes to get the nearest box vertice → get its normal → calculate that angle and use it to deform the volume

Or 2.

Using Volume to Mesh, but I’m struggling with configuring it correctly.

edit: The colors should bend based on the angle instead of being paralel to each other:

Here’s the mat used:

easiest way is to use a spherical gradient and set the object in the texture coordinate node to the sphere ure trying to match.


[edit: the material has an error, please look below for a version that works for an object with another radius than 1]

I’m unable to replicate that effect, do you still have the blend file?

sadly no, wich part gives you trouble?

I think it has something to do with inner and outer radius values

i seem to have made an error, the divide did not need a connection to the inner radius, sry about that.
I made some adjustments to the Material to make it a bit more clear. An important thing to keep in mind is that the values for the radius get scaled by the scale of the object the texture coordinate node is pointing to, so you might have to play with the values a bit.

CurvedGradient.blend (105.2 KB)

1 Like