Forum: Poser - OFFICIAL


Subject: Bagginsbill or other guru - shader question

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


bagginsbill posted Tue, 09 December 2008 at 4:37 PM

> Quote - Is it done in Poser's shader system or in a "full-grown" app like 3DSMax or C4D or only renderer specific ?

Those are all in Poser, using Poser procedural materials (lots of nodes, many were over 100). I develop complex shaders using a tool I wrote called matmatic. With matmatic, we describe the nodes we want and how to connect them using simple Python scripts and standard mathematical expressions.

For example, in matmatic I can make a nice swirly glass with built-in gamma correction like this:

gamma = 2.2
glassColor = Clouds(GRAY2 ** gamma, Color(.3, .5, 1) ** gamma)
reflection = Reflect() ** gamma
fakeFresnel = Blend(.04, 1, EdgeBlend(0, 1, 1) ** 4)
specular = Glossy(WHITE, 1, .001)
diffuse = Diffuse(glassColor, .8 * (1 - specular) * (1 - fakeFresnel))
combinedEffects = Blend(diffuse, reflection, fakeFresnel) + specular
output = combinedEffects ** (1 / gamma)
Surface(1,0,1,0, Alternate_Diffuse = output)

This generates a shader with 14 nodes. A render of it is attached.

This is not too hard by hand, but when you get over 25 it is difficult. Over 50 nodes, and it is extremely difficult. Over 100 nodes by hand is close to impossible.

But more than that, the scripts let me define re-usable material effects, which I can combine and swap easily. For example, I have a true Fresnel reflection shader network that is over 20 nodes all by itself. Yet I can use that with one line of script.

Quote - If Poser how will this influence rendertime? Do you have a mt5 so I could test a bit ?

Sure - I've done performance tests. Some procedural nodes are cheap, others are not. It depends on what you're trying to do. The woven cloth shaders use so many nodes that they are indeed expensive, even if most of them are simple arithmetic. Sometimes I "bake" the procedural texture into an image and just use that.

I'll find some links for you. You should learn to use matmatic and the Loom script I provide to do those cloth patterns., Then you can download hundreds of cloth patterns and make them use any colors you want.
 


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)