Forum: Poser - OFFICIAL


Subject: Mirrored Sunglasses Shader?

Latexluv opened this issue on Aug 18, 2010 · 39 posts


bagginsbill posted Fri, 20 August 2010 at 5:45 AM

Actually, it's all those nodes so you have a bunch of parameters and combine a bunch of things that never get used all at once. Any one effect is nothing. If I built separate shaders, one for mirror, one for plain glass, one for smoky glass, one for orange glass, and then additional variations of each with a gradient on transmission, and then additional variations on each that had some diffuse in them, and then additional variations on each ...

Well then I'd have a couple thousand different materials, but each one would be less than 10 nodes.

The complexity of this shader comes only because I want one shader that can do a thousand effects. If you're willing to have a thousand shaders that each do one effect, then they can be simple indeed.

Most of it is simple math. People don't realize how trivial this is. Nodes are just not a good way of looking at anything that involves arithmetic.

For example, the ability to have the transmission gradient be modulated positive, negative, or not at all by the gradient requires 5 additional nodes. Any version that did not have the flexibility would be 0, 1, or 2 nodes for that aspect.

Here is how that part is done:
transMod = PM2(0, "Transmission Gradient")
antiGradient = 1 - gradient
transGradient = Blend(1, gradient, transMod)
transGradient = Blend(transGradient, antiGradient, -1 * transMod)
transmission *= transGradient

And the complexity is not real. It's just that looking at a program visually is astonishingly difficult.

This shader looks like spaghetti. Imagine, though, a diagram with not 100 nodes and all those wires, but rather one with 100,000 nodes. That is what you'd see if you visualized a typical program, such as notepad or winzip. If you were to visualize bigger programs, like Photoshop or Microsoft Word, you'd be looking at a million nodes.

Visual software is what the nodes are, and while that's cool for experimenting and learning, it's really not cool for serious development unless complexity management features are included. I'm actually a specialist in that area, dealing with complexity in a visual programming environment.


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)