Forum: Poser - OFFICIAL


Subject: Nodes for Dummies

RobynsVeil opened this issue on Jan 24, 2009 · 490 posts


RobynsVeil posted Fri, 06 March 2009 at 7:09 AM

It's Friday night here in Oz. They let me off early from recovery. A little. Good job they did: don't know I could stay away from working on this shader much longer.

At first, I was doing pretty well. I had some lights that seemed to bring out the best in the bump map. Here's how I see bump:
**
s.Bump = Sub(ImageMap(Background = Turbulence(.05,.05,.05,8,0,.5,.15)).labelled("Bump Map"),.5) * .03

** where s is actually the PoserSurface. So, I'm plugging in a turbulence node right into the background channel of the bump map. To do what? Create a bit more bump? Stir it up a bit?

All this reminds me of when I finally started coding in VB... actually coding. At first, I knew what I wanted to do, and went in search of other, more knowledgeable people's code to do it with. Hey, I'm a nurse. I didn't have the time or resources for formal computer programming training. Surprisingly, in this way I learnt the functions and when to use them, to the point where I could sit down and just write code and have it all work. Do it enough, and you get a feel for it.
Now, it's boiling down to determining 1. what do I want to do 2. what do I use to accomplish it with 3. which nodes go with what?

Not that I don't have plenty of great examples. I'm actually using Bill's Vr2 - no, you won't recognise it here, Bill:
and I'm pretty sure I haven't arranged nodes groups by functionality, but at this point: who cares! The meat of the shader is in putting together these statements:

**s.Bump = Sub(ImageMap(Background = Turbulence(.05,.05,.05,8,0,.5,.15)).labelled("Bump Map"),.5) * .03
**
not the resulting set of nodes.

Still, I want to get the relationships of the functions (nodes) right. Up to now, Bill's been giving it away. He basically gave me the ingredients on that little shader up there. He understands what needs to happen and when... and I have realized that at this point, I don't. I've been playing with that shader, trying to add features from that Vr2 shader like AO. Not obvious.

Here are my assumptions about scripting for Python, as applied to Matmatic:
-- code is interpreted (or processed, whatever) sequentially, line by line ... so it's important where you put what. Can't reference something that hasn't been created / initialized / dealt with yet. Just like any other programming language. Functions are processed when they are called, including UDFs.
-- You can create bogus shaders with code. Even if you've got the math right. It can happen unless you understand the relationship of materials to light

The more tricky part of shaders still needs to be discovered: what goes with what. At this point in time I'm looking at AO. Picked up that in Pr2 it's got a close relationship with the diffuse node. And in most discussions on Node Cult and here, the relationship between the AO node and the diffuse node appears strong, but I'm not sure about how the association works. Diffuse has something to do with light and colour and ambient occlusion has to do with light and shadow. Usually lights are involved with creating shadows, but from what I've read Poser has shortcomings (not sure what they are or if I'd understand them if they were explained to me) with regard to creating believable ambient occlusion under all light settings.

So, I'm trying different combinations. VSS and Matmatic make it very easy to quickly see results.

Oh, and I still have nostril glow. Even after killing all lights and:
Adding a light.
Selecting the light properties.
Checking the "Infinite" option.
Shadows at Depth map - tried Ray-trace as well... same result
Editing the Shadow Min Bias: setting it to .1
Switching to the light parameters.
Setting the shadow map size to 1000.
Setting the xrotate to -20
yrotate to 10
zrotate to 0

...and Rendering with Cast Shadows and Raytracing on, raytrace bounces 1, irrad. caching 50, pixel samples 2, min shading rate 1, min displ. bounds .008, use displacement maps on.

Might have been my shader? Now, I hadn't introduced any AO at this point - it's that shader from 9 messages or so ago.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks