Forum: Poser - OFFICIAL


Subject: Bagginsbill or other guru - shader question

JoEtzold opened this issue on Dec 08, 2008 · 35 posts


bagginsbill posted Wed, 10 December 2008 at 5:52 PM

You may be curious about what's going on with the Fractal_Sum node. This has nothing to do with this clothing item. I just needed some interesting curve to demonstrat bending the strip, so I used this node to make a curve. For the real thing, we'd need a specific curve, not a random one.

Anyway, I exploited here an interesting undocumented feature of the Fractal_Sum node. (A few others do this same thing.)

The FS node creates a 3-dimensional pattern that is superimposed on your model. This pattern, based on random numbers arranged with varying frequency, is normally sampled by the shader for each point of your geometry. Whatever value actually exists at that point in the 3d noise function is used by the shader.

Normally all you can do to alter the geometric layout of the pattern is mess with the scale parameters. The coordinates of your object are transformed using these scales to look up a value in the 3d noise. The coordinates come from your model, not the final transformed world coordinates.

But! I found that if you plug any node into those scale parameters - any node at all - they no longer use the model coordinates. Instead, they strictly use the value that is plugged in!

So what I did here was to plug in a math node into the Y_Scale and Z_Scale. This effectively freezes those axes. The pattern then transforms from being 3-dimensional to 1-dimensional. If you were to plug a math node into only one of those 3 parameters, then you would get a 2-dimensional pattern.

Now the remaining parameter, the X_Scale, I plugged in the V coordinate from my UV map. Thus the noise pattern is entirely varying only along the V dimension. Any change in U, X, Y, or Z is not involved in generating the pattern. Only the V coordinate causes any variation. Thus, I made a node that produces random values vertically, but constant values horizontally.

Neat huh?


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)