Mon, Dec 23, 7:46 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 22 10:18 pm)



Subject: node chains - where can you plug in?


santicor ( ) posted Wed, 11 March 2009 at 3:33 PM · edited Fri, 25 October 2024 at 3:59 AM

HI

if you have a fairly complex  set of nodes set up in a shader,  and now you want to  ADD  a couple of nodes for added effects,  is there a hard and fast rule for where you can plug in?

to be more specific I will give an example -
let's say I have a Baggins- recommended GC shader with BLINN spec set up, and in this shader the DIFFUSE and ALTERNATE DIFFUSE are both occupied  with connections to nodes.

NOw I want to add  a fresnel , or a mask, or whatever,   which would also need to be connected to either the DIFFUSE or ALTERNATE DIFFUSE as well.

Can i have a double connection to the DIFFUSE or ALTERNATE DIFFUSE?  or are you required to  find some exact proper spot at the end of the preexisting node chains and plug in at the end?




______________________

"When you have to shoot ...

SHOOT.

Don't talk "

 

   - Tuco

 

Santicor's Gallery:

 http://www.renderosity.com/homepage.php?page=3&userid=580115

 


Adom ( ) posted Wed, 11 March 2009 at 3:43 PM

Pls don't take my answer seriously:) but what if you use math node - multiply as a connector?
Pls don't comment that:)


Latexluv ( ) posted Wed, 11 March 2009 at 5:07 PM

I'm not a node expert by any means, but it is possible to disconnect the first node coming out of Alternate diffuse, connect a blender node into Alternate diffuse, connect the node chain to the first channel of the blender and the stuff you want to add to the second channel of the blender. But it depends on what you want to add. I hope that bagginsbill sees your thread. He would be the best to answer this question.

"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate

Weapons of choice:

Poser Pro 2012, SR2, Paintshop Pro 8

 

 


bagginsbill ( ) posted Wed, 11 March 2009 at 5:14 PM

It depends on the effect. This is a pretty complex subject. The basic answer is, if you're combining two shader subtrees and you want to combine them by adding, then you Color_Math:Add them and connect the adder to the Alternate_Diffuse. If you want to muliply the effects, you Color_Math:Mul them and connect the multiplier to the Alternate_Diffuse. If you want to blend them, you Blender them and connect the Blender to the Altnerate_Diffuse.

However, the effects you mentioned would not go at the end of the existing tree of nodes, but rather in the beginning or the middle or both. And if you're talking about one of my GC shaders, this gets even more complicated.

Fresnel effects require that you calculate the amount of Fresnel reflection; call that FR.  You'd then want to Blend the Diffuse node with a Reflect node, using FR as the Blending value. The Blender would connect to whatever the Diffuse node used to connect to. Probably that would be a Color_Math:Add node that is adding the Diffuse with the Blinn. Those two added together go to a Color_Math:Pow node that does the final gamma correction.

A mask effect almost always involves a Blender at the point where you want to mask two different things. You find the thing that is all by itself, and move that into a Blender node, and connect the Blender to where that thing used to be. Then you set or connect the second value of the Blender node, and finally connect the Mask to the Blender's Blending input to choose between the original thing and the new, masked thing.

Until you understand the math behind what you're doing, disconnecting and inserting and reconnecting nodes is going to be a mystery. This is why RobynsVeil has followed my advice in the "Nodes for Dummies" thread. She no longer cares about the nodes and wires. All she cares about is the math. It took her a couple weeks to get the hang of matmatic, but now she's making intermediate-level materials (15 to 30 nodes) without ever going into the material room.


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)


bagginsbill ( ) posted Wed, 11 March 2009 at 5:22 PM · edited Wed, 11 March 2009 at 5:23 PM

In matmatic, a basic GC shader with Diffuse and Blinn effects that uses a color map would look like this:

gamma = 2.2
clr = ImageMap("").labelled("Color Map")
s = Surface(clr, 0, 1, 0)
clr = clr ** gamma
s.Alternate_Diffuse = (Diffuse(clr, .8) + Blinn()) ** (1 / gamma)

One that does basic Fresnel reflection (involving a cheap and bad approximation instead of the real Fresnel effect calculation) would change that last line to this:

fe = EdgeBlend(.04, 1, .07)
s.Alternate_Diffuse = (Blend(Diffuse(clr, .8), Reflect(), fe) + Blinn()) ** (1 / gamma)

Of course if I gave you the matmatic function for the actual Fresnel effect (which requires 14 nodes all by itself) you'd just say this:

fe = TrueFresnel(1.33)

That's the beauty of matmatic - complicated multi-node things become as simple to use as the built-in nodes.


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)


santicor ( ) posted Wed, 11 March 2009 at 5:55 PM

*Fresnel effects require that you calculate the amount of Fresnel reflection; call that FR.  You'd then want to Blend the Diffuse node with a Reflect node, using FR as the Blending value. The Blender would connect to whatever the Diffuse node used to connect to. Probably that would be a Color_Math:Add node that is adding the Diffuse with the Blinn. Those two added together go to a Color_Math:Pow node that does the final gamma correction

*Mr. Bill,  I keyed in on the statement above.....and YES  reading the statement above  and going now  to hook up  the nodes  is  a case of my  taking the quick sollution of copying a  specific recipe for a specific situation ,  and this is backwards of me. This is not learning the math.  However I am beginning to get some kind of picture from the rest of your content of your 2 posts, and whil;e you can bet I will fire up my  scene in  a few moments, and just rush to the singular sollution for a singular problem,  I will go thru "Nodes for Dummies  again, and then again

Thank you 




______________________

"When you have to shoot ...

SHOOT.

Don't talk "

 

   - Tuco

 

Santicor's Gallery:

 http://www.renderosity.com/homepage.php?page=3&userid=580115

 


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.