Visualization
About built-in and 3rd party, classic and real-time rendering solutions, settings, workflows, etc.

Shader recognises distance from camera

derekjackson
Enthusiast
Hi, does anyone know if any of the shaders can change their output based on distance from the camera? So achieving something like Fog in the scene, but through the surface rather than the render settings.

I'm messing around with stylised render settings and it'd be useful to fade stuff in the background...
4 REPLIES 4
Erwin Edel
Rockstar
Similar to the 'air perspective' from the sketch render then, I assume?

I would actually suggest 'distance fog' in the cinerender detailed settings. I know you explicitly said it had to be a surface setting, but this does exactly what you describe. You can untick 'affect background' to keep your environment background clear.

Just did a quick test with a white colour and fairly high distance from the camera you can wash out the colours that are far from the camera. Try playing with the strength setting too.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
derekjackson
Enthusiast
Thanks, but I'm potentially wanting to do more than just fade it out - might be useful to use as a mask to apply a different effect or something...
Lingwisyer
Guru
You are wanting a zdepth layer? I do not recall there being an option for that in Cinerender... maybe make a wish?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
derekjackson
Enthusiast
Not a ZDepth - something in a shader. I know some of the shaders have options around which space they work in (texture / world / camera / etc), so wondered if there was one that used camera space and could respond to distance - I'm guessing not.