I’m wanting to get the silhouette data for an object if that’s possible but in the material editor. The idea is to use that data to control the “edge” colour, transparency etc of my objects. Anyone know how to do this?
Facing ratio/fresnel works somewhat but of course only a simple shapes once you have complicated shapes then you will get colour changes in the middle and wherever the normals are facing vertical.
What are you trying to accomplish?
Number of different applications. Anything that can control the values towards the “edge”/sillohuette. At the end of the day a large part of it can be done in compositing using mattes (not transparency though) but im trying to get the result pre-comp. Also reduce the amount of compositing.
Here’s an example of the problem. Looks correct on left sphere. But on the dented sphere on right it doesn’t as that sphere has other contours on it. This is using the classic facing ratio method. I’m just wanting the silhouette.
another example of the issue (this one you cant really do in comp without deep-data or multiple layers).
In the shader nodes, I don’t think there is much you can do beyond the facing ratio.
may be using the new Bevel and AO nodes in latest build
you can change edges colors!
As SterlingRoth says, you can’t. Materials can’t access that data - maybe it should via the object info node or something? Add it as a suggestion.
How I would approach it:
- Make a material using a fully white emission shader strength 1, and use this as material override in Render Layers/Layer.
- Activate Freestyle using Contour only (try silhouette and border at will).
- Render out and the image, you’ll get a white image with black contours. You only need a few samples, so it should render quickly. Turn off colour management.
- Use this image as non colour data texture using window texture coordinate.