Forum: Poser - OFFICIAL


Subject: Ockham, Bagginsbill, I need help with snow shader.

Helgard opened this issue on Jun 13, 2008 ยท 57 posts


bagginsbill posted Sat, 14 June 2008 at 8:28 AM

Hi people - just got back from a work trip. Sorry I did not participate till now.

Helgard,

You said "In the snow shader, I am using the alternate diffuse, so it doesn't replace the texture underneath." What does that mean?

The Alternate_Diffuse input is a pass-through channel - it sends whatever you put in there to the render, added to all the other stuff the root node is processing. You are not covering up the original shader, you are just overwhelming the final rendered pixel with whiteness. While that works for a simplistic snow shader that results in RGB 255, 255, 255 all the time (because of clipping) it is not a technique that will work for realism shaders.

Photographs of snow-covered buildings do not yield RGB 255, 255, 255 all the time. As soon as you make the snow shader produce shades of gray, the underlying texture will be mixed in. Similarly, if you were to try this technique for rust, dirt, scratches, and so on, you'd find that you have to do a lot more than plug something into Alternate_Diffuse.

Finally, you'd really screw up one of my complex shaders, which are entirely hanging off the Alternate_Diffuse input already!

You actually need to take over the whole shader for areas where the snow is 100% opaque, but not 100% white. This requires some analysis of the existing shader and then a number of blends to mix the snow shader with it.

My matmatic utility can do this - the function is called Mix. It will mix two shaders into one shader. However, matmatic is "write only" - meaning it doesn't let you read an existing shader, modify it, then write it. It simply writes it. Also, matmatic does not operate in-scene, but rather just produces files.

My new Versatile Shader System (VSS), does do in-scene material editing, does read existing shaders, and can "mix" shaders. In VSS, these are called "effects shaders", as opposed to "template shaders". A template shader might be "concrete" or "skin", while an effect shader might be "snow" or "lipstick." - in other words, effect shaders are mostly for layering on another virtual material on part of the prop or figure.

I have not shown these to anybody yet. But the point I'm making is this is a little bit tricky to do in the general case, and writing scripts for special cases is fine, but doesn't scale. However, you can get away with it for snow - leaving realism out of it, of course.


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)