FaeMoon opened this issue on Mar 09, 2010 ยท 40 posts
bagginsbill posted Thu, 11 March 2010 at 3:49 PM
Quote - > Quote - Can you make it thicker at the top or bottom?
Well, yes... with some node knitting, using the P-Node to control DepthCue colour.
This shader applies DepthCue from a given minimum height upwards - the opposite of a ground fog, I suppose. It's okay for proof of concept, but not very convincing.
For some reason I'm getting darkening of the original (non-DepthCued) render at low heights and greater distances from the camera. I'm clamping the DepthCue colour to prevent it going negative below the minimum height, so i don't really understand why it's doing this.
More work needed... but not now.
The fog is a blender. The fog color is value 2. The unfogged render color is value 1. The blending value is the linear distance from the camera, scaled according to the start and end settings.
So - at maximum the color is 0% actual render, and 100% black.
You were thinking that the fog color is added. It isn't. It's blended.
The blending equation is:
(1-f) * Value_1 + f * Value_2
where f in this case is Clamp((d - start) / (end - start)).
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)