Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Shader Nodes

  1. #1
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185

    Shader Nodes

    I tried plugging OrenNayar into Diffuse Shading, but then found that the Color input didn't work. Plugging a color into the shader, then the shader into Color does work. I'm trying to understand the use of shader nodes.

    How would you use Diffuse Shading?

    Thanks

  2. #2
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    Ok, I need to be more clear. I understand that Diffuse Shaders can for example be used with normal maps. What I don't understand is what receives priority over what.

    In the Surface Editor'sShaders tab, I set up and activated an IFW2 Organic - Dirt shader, assuming that it would underlie any further work on the surface I want to do, as in adding color. If , with this shader active, I use the Surface Editor's Basic tab to add Color, the color is visible. But if, with this same shader active I use Nodes to add Color, the color doesn't show up. (it colors the sphere inside the Node Editor, but not the sphere on the Surface Editor) If I de-activate the shader, the Color created in the Node Editor does show.

    If I was to create a normal map and plug it into the Node Editor's Diffuse Shading input, how is this gonna fit into a system of priorities that already has me confused?

  3. #3
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    Things plugged into the inputs in the Node Editor override things plugged into the Surface Editor (with the exception of Bump which adds to it)

    The Shading inputs override the base inputs up top... (Diffuse Shading is Color + Luminosity + Diffuse)

    The Material input overrides just about everything else.

    It looks like you found another priority issue with the Shader Tab.... maybe it depends on the shader being used or how you had things connected in the Node Editor?

    As for normal maps, typically, if you want to use it as a normal map, it'd get plugged into the Normal input on Surface (via the normal map node). If you're just trying to a flat shaded, normal map to use with another app, I'd plug it into the Diffuse Shading and render it separately. I can think of a workflow to save it out separately in one pass, but that gets into multipass rendering and possibly DP Filter, and that might take a little more time than I want to spend since I don't know if that's what you're asking about in the first place.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  4. #4
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    Thanks dw, I really didn't think it through enough before posting this. Going in, I thought the Node Editor would work with any content of the Shader Tab unless a nodal shader was added. I see from what you say that it ain't necessarily so.. I'm not considering multipass rendering yet, I think I need to understand more of the fundamentals first. My recent deep dive into nodal displacement maps, texturing, and now shading has me confronting walls of my limitations at nearly every turn. At 64, it seems that my memory is filled to near capacity with life and other pursuits. LW is like learning a new language; it really helps (obviously!) if one can remember from week-to-week, all the details, syntax, and so on. I just don't learn as quickly as I used to.

    I'm now going through the Content folders that NewTek has provided from LW 9 to today. I don't see anything specifically illustrating the use of shaders within a node network, but I'll load the scenes that seem fitting and see what I can figure out.

  5. #5
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    There's an old presentation from Newtek that kind of introduced some of the concepts of the node editor. It's a bit complicated at points, but it helps clarify the terminology a bit.

    ftp://ftp.newtek.com/pub/LightWave/L..._Quicktime.mov (75.3MB)
    ftp://ftp.newtek.com/pub/LightWave/L...Intro_Divx.avi (25.1MB)

    The term "shader" is probably confusing because it's used in a few places in different ways.

    I have not used the shader tab much in recent years, and did not run into the situation you described, but I mostly just use Fast Fresnel from there and I hadn't noticed it not working with nodes, but that's not to say that it did.

    When I'm away from an app/process/feature for a long time, a lot of times I forget the workflow. I sometimes have to rewatch some of my own tutorials just to relearn something if it wasn't something I've done a lot.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  6. #6
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    Thanks, but for some reason, that Quicktime won't play on my Mac, I get audio only. Anyway, I understand what shaders represent well enough to get started with them. What I'm looking for are specific examples of shader use when coupled with procedurals. Or even examples of nodal trees with no shaders at all! Just seeing the various ways nodes are hooked up helps a lot in understanding the possibilities of their use.

    In a LW tutorial from v9, 'Intro To Shaders', the narrator makes the distinction between shaders as a feature of LW, as opposed to the techniques of using texturing methods to control the shaders. It's those texturing methods I need to understand. For example, I have the RHN Nodes series in which he includes scenes with very complex surfaces. By deconstructing the nodal setups in these scenes I'm able to see some uses, and draw my own conclusions. Naturally, a tutorial would be nice, but learning by example is very enlightening, if more difficult to work out. We've got all kinds of helpful threads here in the Forums, how about someone starting one where people offer various scenes that have been surfaced nodally? I believe that would be very helpful for many. I know I'm not the only one struggling with this.

  7. #7
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    Hmm... most of the time I'm not using nodes to alter the shading (as defined in that video... i.e. simulating the lighting of an object and applying value), except possibly to plug a lambert shader into a gradient node for cel shading effects. I usually just use the normal (lambert) shader that comes with LW and leave the "Diffuse Shading" input empty. Most of the surfacing I do is rather simple that way. I do use procedural textures to change/control/alter textures (i.e. the pattern applied to the shaded model). I think I've done some complex looking surfaces, but it's not something I've dived deep into. Most of the time with nodal surfacing and compositing (in something like Nuke... which I haven't used yet BTW) you start with something and just keep adding bit by bit experimenting until you get what you want. It ends up looking crazy complex, and it may be, but you only do it one piece at a time.

    For example, say you want to use one gray scale image for both the specular and diffuse, you add the image node and plug it into both. Okay, that doesn't look right. The spec maybe should be inverted, so you add a math>scalar>invert node (or one of several other options). Okay that's better, but it's too much spec. To fix that let's add a multiply node and multiply it by .5 (a.k.a. 50%) to half it. That's looking good, but it'd be great if we could break up the surface a bit. Let's add a turbulence procedural node. Let's plug the turbulence node into the multiply node we added. okay... that's too pronounced and we're back to too much spec in some areas... well we can change the BG and FB color values in the turbulence node to give us a range for the spec to live within... etc. etc.

    It's just a process of working on one bit at a time.

    At least that's been my approach. Like I mentioned in another thread, I learned a bit of the general nodal workflow by using some node based compositing apps and some of the concepts carried over into LightWave. I haven't mastered it all, and I'm mostly useless trying to set up math driven things (trig, calc, geometry, etc), but I still can have fun with it.

    I asking for examples is valid. You think of nodes as ingredients to a recipe. Some can stand alone and do something productive for you (like fruit). Others need to be used in conjunction with others (baking soda). Sometimes asking how to use a node is like asking how to use an egg. It depends on what you want the end product to be.

    It's not a perfect analogy, but analogies never are.
    Last edited by dwburman; 01-28-2014 at 09:28 PM.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  8. #8
    Super Member spherical's Avatar
    Join Date
    Dec 2004
    Location
    San Juan Island
    Posts
    4,686
    Quote Originally Posted by dwburman View Post
    For example, say you want to use one gray scale image for both the specular and diffuse, you add the image node and plug it into both. Okay, that doesn't look right. The spec maybe should be inverted, so you add a math>scalar>invert node (or one of several other options). Okay that's better, but it's too much spec. To fix that let's add a multiply node and multiply it by .5 (a.k.a. 50%) to half it. That's looking good, but it'd be great if we could break up the surface a bit. Let's add a turbulence procedural node. Let's plug the turbulence node into the multiply node we added. okay... that's too pronounced and we're back to too much spec in some areas... well we can change the BG and FB color values in the turbulence node to give us a range for the spec to live within... etc. etc.
    Thanks for this! Not that I have devoted much time to diving into nodes and watching the available videos, etc., to learn what each type does and why (there are so many and their names aren't always that descriptive, let alone intuitive), but your descriptive sequence lit a light bulb that probably won't go out. I use nodes quite a bit but not the esoteric variety yet; where modifiers are placed in between to arrive at a complex, refined result.
    Blown Glass · Carbon Fiber + Imagination

    Spherical Magic | We Build Cool Stuff!

    "When a man loves cats, I am his friend and comrade, without further introduction." - Mark Twain

  9. #9
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    Glad it helps!

    There are so many different ways to do some things that the mind boggles sometimes. For instance, instead of using math>scalar>invert, you could use a gradient with two keys to invert/remap the values... You could use the remap node from db&w tools... you could try multiplying the value by -1 (not sure if that would work, but I think it's worked for me in some cases)

    Also, instead of tweaking the FG and BG color of the turbulence node, if you want specific values, you could add a constants>scalar node for each and enter the specific value... it's a bit easier than trying to figure out how to map 0 - 255 to a specific fractional value... of course you could also just take the alpha out of the turbulence node and remap the values with a gradient... well, I think you get the point... The combinations are nearly limitless (and often animatable).

    Oh, and since a lot of times you're only working on a small piece of the puzzle at a time, it's a good idea to rename nodes to explain why you used them and also take advantage of the comment line at the bottom of the window. If you have to open the node flow up later, you might not remember how and why you did something.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  10. #10
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    Maybe ur getting a lil lost in terms... folk do tend to use things somewhat interchangably...

    Technically... a shader is a program/algorithm which simply computes the result of a light ray interacting with a "spot" on a surface. As such, different shaders are really just different "calculations", the result being that one can make a surface appear smooth, another rougher, etc, etc. Because of this... you "model" the different properties of different surfaces in different ways. Diffuse shaders are designed to simulate a surfaces regular diffuse properties (generally, its colour, and how sharp or smoothly shadows creep over its surface). You then also have reflection shaders, which model surface attributes related to "mirror" reflection... then of course there are shaders (like tanslucency or SSS) which model for light transmission through a surface, specular shaders (which are a computationally cheap and fast method of faking rough mirror reflection), and so on, and so on.

    Shaders are then put together to form whats classically called a material... So you want gold?? That then requires a diffuse shader (to simulate the look of the materials diffuse reflection) and a reflection shader (to simulate its mirror reflection).

    Also, ofc, realise that nothing renders for a surface unless that surface has at least one shader upon it... In LW, by default, diffuse uses a lambert shader, and reflection... phong I think, been so long. Using shader nodes allows you to just swap out the default shader for a given surface attribute, for another one who's properties/appearance are better suited to the kind of material you're trying to simulate overall.

    Check again in the RHN Nodes section, the shaders video... that should give you a good refresh of the different shader nodes available, and the looks they produce.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  11. #11
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    Yes, I've been creating recipes for nodal surfaces in much the same way you describe. Funny how kitchen activities are good metaphors for many things!

    An example of an imaginative nodal setup was supplied by bazsa73 in response to my question about combining displacement maps. This helped me in a way I don't believe I could have helped myself.

    http://forums.newtek.com/showthread....27#post1364127

    Yesterday I remembered that IFW2 textures comes with some scenes that can be deconstructed, so I've been doing that, and it helps.

    What you said about nothing rendering unless the surface has at least one shader on it never occurred to me. I mean, I 'knew' that by default LW used the Lambert shader, but when it comes to understanding this stuff, there's knowing, then there's knowing, eh?

  12. #12
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    I created a simple, two object scene. Here are some examples of what I'm seeing:

    The first F9 render is with LW's default Distant light, the ground & sphere object colors are 200 200 200. (See Layout_default)

    The second render is after installing Sunsky, and lowering the SK_Sky Light Intensity to 50%. (see SK_Sky_default) Everything is at Sunsky's default settings for Paris, March 23, 2012 at noon. A brown color is already apparent.

    When Sunsky is installed, Light Properties' Current Light is set to SK_Sky. I changed Current Light to SK_Sun. Close to the bottom of the panel is a color gadget that is set at 255 210 154. This seems to be the same color that is appearing in the render.
    I changed the Color System on the Conversion tab to CIE, which gave the sphere render a slight green cast. The BG appears to be close to white, now. (See SK_Sky_CIE)

    But when I lowered the Brightness in the Sun Editing tab to 70%, the background and the sphere are seen to be completely green. (see SK_Sun_CIE_brite70) Now the color gadget shows 128 127 103, a green color that seems to match the render. I then set Sunsky_Env to Ground: Matte, and turned off the Sunsky environment, but neither had any effect on the render.

    I don't know, maybe it's the Mac..

    Greg
    ---
    8-core Mac Pro (2010); OS 10.8.5; LW 11.6.1
    Click image for larger version. 

Name:	Layout_default.png 
Views:	53 
Size:	8.5 KB 
ID:	119864Click image for larger version. 

Name:	SK_SKY__default.png 
Views:	54 
Size:	443.9 KB 
ID:	119863Click image for larger version. 

Name:	SK_SUN_CIE.png 
Views:	52 
Size:	436.5 KB 
ID:	119862Click image for larger version. 

Name:	SK_Sun_CIE_brite70.png 
Views:	51 
Size:	421.7 KB 
ID:	119861

  13. #13
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    You're right RebelHill, I needed to look at the RHN shaders video again. That's how it is with good videos, every time I watch I see something new, based on how much my experience has taught me to see. I've finally realized the great value of using false colors when experimenting, it makes it so much easier to recognize what's going on. I'm trying to simulate soils; frozen, swampy, and normal. Every time I'm outdoors I stare at the ground trying to figure out what the properties are that make me believe a surface has depth. Indigenous people probably have words for such things.

    BTW, I discovered that after creating a surface with nodes, I can go to the Shaders tab and add an IFW2 shader with Alpha activated, and it lies nicely right on top of the nodal surface, showing up, and revealing the surface beneath. Now I've just got to find a combination that produces the snow-on-the-ground effect I want. 'Slope' won't help me because the ground is mostly flat. You wouldn't think it would be so difficult to create little discrete patches of snow, spread randomly, that don't cover too much of the ground. But I'm having a heck of a time getting the effect I want.

    (I'm losing it. I put the Sunsky post above, here instead of where it belongs. I don't see how to delete it..)
    Last edited by greg.reyna; 02-03-2014 at 11:23 PM.

  14. #14
    Super Member spherical's Avatar
    Join Date
    Dec 2004
    Location
    San Juan Island
    Posts
    4,686
    Quote Originally Posted by greg.reyna View Post
    BTW, I discovered that after creating a surface with nodes, I can go to the Shaders tab and add an IFW2 shader with Alpha activated, and it lies nicely right on top of the nodal surface, showing up, and revealing the surface beneath.
    This sounds interesting but I'm not grokking it. Can you elaborate or provide a few screen grabs?
    Blown Glass · Carbon Fiber + Imagination

    Spherical Magic | We Build Cool Stuff!

    "When a man loves cats, I am his friend and comrade, without further introduction." - Mark Twain

  15. #15
    Festina Lente
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    185
    Sorry, my contributions to this thread are pretty tangled. I'm at a threshold in my understanding of this stuff--and obviously, my confusion shows!

    I'd been trying different combinations of plugging nodal Color outputs into various shading inputs, for example Diffuse Shading. Say I plug a Minnaert shader node into Diffuse Shading, and its effect shows up on the surface of a sphere in VPR. After doing that, a Turbulence node, for example, plugged into the Color input of the surface has no effect. If I unplug the shader from Diffuse Shading, the Turbulence effect appears on the surface. So to get both effects to appear on the surface together, I plugged the Turbulence node into the Minnaert shader's Color input, then plug the shader node's Color output into the Surface's Color input. Now all is well, and VPR displays both effects. This confuses me since I don't see the usefulness of the Diffuse Shading nodal input, or for that matter, any of the other Shading inputs. But then I have to admit that I haven't yet thoroughly explored all of the possibilities.

    Anyway, I discovered that a shader can be used to partially overlay a surface created in the Node Editor.

    Say the Turbulence colors are blue for the BG, and yellow for the FG. What I want to do now is to add tiny red dots over the existing texture. I close the Node Editor window, and go to the Shaders tab of the Surface Editor. I'm gonna use IFW2 shaders because of their added functionality. I load IFW2 Skins - Dino Skin. I open the Option panel. On the Color tab, I see that the first two colors are green, and red. I un-check (deactivate) the first, green color. Below that area I set Blend 1 to 10%, and Blend 2 to 100%. Then I go to the Alpha tab and set Alpha 1 to 100%. Voila! The green color has been rendered invisible, and tiny red dots appear over the surface created in the Node Editor.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •