1
$\begingroup$

the white part should have the volume in blue and the black part in red but it doesn't work I leave you an image that explains the problem better

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ It's going to depend on the texture coordinate you use. Typically I'd expect an image texture to describe a surface, but you can project it over an axis if you want. Long story short: An image really doesn't have anything to say about a volume. It doesn't have any depth. $\endgroup$ Commented Jul 27, 2022 at 19:00

1 Answer 1

1
$\begingroup$

As was mentioned, because you're dealing with volumes, you need to use 3D Textures! :)

You can get these by using procedural textures with the type set to 3D. To get that squiggly shape, for example, you could do something like this:

enter image description here

Then, to get that circular shape, you could do something like this:

enter image description here

You could then add them together to get something like this:

enter image description here

If you only want the shape to appear on the front of the cube, you can use a noise texture to create a mask for the added textures:

enter image description here

You can then multiply the mask with the result of the added textures. This isn't perfect, but you can play with the settings to get what you want:

enter image description here

Finally, you can adjust the result with a color ramp and then plug that into the factor of the mix shader to get what you'd like:

enter image description here

Procedural shading is tricky at first, but it's really powerful! Best of luck!

$\endgroup$

You must log in to answer this question.

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