3
$\begingroup$

I have a 3D-model of the human body and now want to "highlight" certain parts of it. Is there a way to take a sphere for example and use it as a mask, to change the intersecting geometry of the body and the sphere to an emissive material?

$\endgroup$
1

2 Answers 2

5
$\begingroup$

It's probably a more limited way, but it's also possible to use Light Path node and transparent shader on the other object to mix based on transparent depth. It might get messy if you need other transparent shaders in the scene(you could then use Transmission Depth and Refraction BSDF with IOR set to 1 as well), but you could have any shape of volume.

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you as well, also a nice solution! $\endgroup$
    – enats
    Commented Jun 7, 2023 at 13:47
7
$\begingroup$

One way would be to have a sphere with an emissive material on it and disable Ray Visibility for Camera and Shadow. This way the emissive sphere would highlight the body wherever they are intersecting (but also the inside and every other object the sphere is intersecting):

using emissive sphere

Another and probably better way would be to place an empty in the scene (which shape does not really matter, I've taken a sphere in this case) and in the material of the body you reference this empty in a Texture Coordinate node. With a Vector Math node you calculate the distance from the empty's origin and with a Math node set to Less Than you control the influence radius. Below a certain distance, the Math node outputs 1, above 0 - this value I use as Emission Strength in a Principled BSDF node which is my material on the object. Of course you can use the value in all kinds of nodes as a mix factor:

using distance to empty

Just to give you an idea what else you can do with this value, here I've used it to drive the Base Color, the Metallic value, the Roughness and the Transmission in a single Principled BSDF node:

multiple use cases

$\endgroup$
1
  • 1
    $\begingroup$ Thanks a lot, nice solution! $\endgroup$
    – enats
    Commented Jun 7, 2023 at 13:47

You must log in to answer this question.

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