232bird opened this issue on Aug 06, 2011 ยท 5 posts
bagginsbill posted Sat, 06 August 2011 at 7:41 AM
You want to modulate based on height above ground? But you're using the V coordinate of the texture mapping. I don't know that the "fog" of atmosphere even has a V coordinate.
You want to use the P node, not the V node. P is position. The X, Y, Z coordinate returned is first multiplied with the values in the parameters of the node. So if you set them up as 0, 1, 0, it will discard the X and Z coordinates. You can then just use the number coming out.
Technically the P node is a coordinate, not a color, but it will be handled like a color. This means if you plug it into a Math node where a number goes, the "color" will be collapsed to a gray level by averaging the R, G, and B. If you use the 0, 1, 0 values, then the resulting numerical value is (0 + Y + 0) / 3 or Y/3. Note also that Y is in tenths of an inch - an odd unit.
So I usually set it up as 0, .3, 0 and then the averaged output is exactly in inches. Of course you could use .3/12 instead of .3 and you'd get feet. If you're into metric, .3*2.54 would be centimeters, and .3 * .0254 would be meters.
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)