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

Thread: Making Nodes and Transparency work together...

  1. #1

    Making Nodes and Transparency work together...

    If it's not me to blame, then I'll torch someone pretty soon. At least I'll consider it. 3 1/2 month of begging for bug fixes.

    I do have a glass object (simple box object, 5mm thick) and an object beneath it. The lights pitch angle is 90° (distant light), so it is shining exactly from top of the scene. If I turn on 100% transparency and IOR 1.54 it looks o.k., double sided enabled. The object beneath it is bright and receives the rays from the lightsource.

    If I choose nodes instead of the classic texturing menu, the object remains black, never mind what kind of setup I use in nodes. Refraction node in diffuse shading like always: No light passing my glass object so the object beneath lies in total shadow. If I disable "cast shadow" for the glass it works, but as glass has a density to it, it cast a shadow. Worked for years, but now the nodes f... it up.

    Reflections on the object beneath the glass show up, so the glass works for the diffuse and specular light like a sunblocker. Not very nice, at least not for 100% transparent glass.

    Can anybody confirm this bug? If yes, I start to collect some wood for a nice fire. Unless I'll get this s... fixed in the next few days.

    Cheers
    Thomas

  2. #2
    Super Member SplineGod's Avatar
    Join Date
    Feb 2003
    Location
    Hastings, New Zealand
    Posts
    7,731
    Are you using air polys ?
    If not you can use the Spot info node and logic nodes to give the other side of your polys a different IOR.

  3. #3
    Red Mage Celshader's Avatar
    Join Date
    Feb 2003
    Location
    Burbank, California
    Posts
    1,817

    Question

    Quote Originally Posted by Thomas M.
    If it's not me to blame, then I'll torch someone pretty soon. At least I'll consider it. 3 1/2 month of begging for bug fixes.

    I do have a glass object (simple box object, 5mm thick) and an object beneath it. The lights pitch angle is 90° (distant light), so it is shining exactly from top of the scene. If I turn on 100% transparency and IOR 1.54 it looks o.k., double sided enabled. The object beneath it is bright and receives the rays from the lightsource.

    If I choose nodes instead of the classic texturing menu, the object remains black, never mind what kind of setup I use in nodes. Refraction node in diffuse shading like always: No light passing my glass object so the object beneath lies in total shadow. If I disable "cast shadow" for the glass it works, but as glass has a density to it, it cast a shadow. Worked for years, but now the nodes f... it up.

    Reflections on the object beneath the glass show up, so the glass works for the diffuse and specular light like a sunblocker. Not very nice, at least not for 100% transparent glass.

    Can anybody confirm this bug? If yes, I start to collect some wood for a nice fire. Unless I'll get this s... fixed in the next few days.

    Cheers
    Thomas
    I have a few questions...

    What is your Ray Recursion Limit value? If it's set too low, the ray will return the value of the backdrop (which is black by default).

    Also, can you post screengrabs of the Nodes that you are using and examples of both the "good" and "bad" renders?
    Jen's 3D -- LightWave stuff.
    Jen's 2D -- my comic book.

    Python is my smashing board. LightWave is my S.M.A.K.

  4. #4
    I'll post the scene a.s.a.p.

    Ray rec is at 12, all raytracing options enabled, air polys via logic nodes and spot info. Objects are part of the same object, but on different layers.

    As I said, if I disable "cast shadows" the object is bright. Enable this option and there is total darkness. Only reflection or luminosity is shining through the glass.

    Thanks so far.

  5. #5
    O.k., here's the scene.

    Please place a HDRI or other image in the background, so that you can judge the transparency of the material. Switching the "Cast shadow" button for object layer 1 (Glass) shows the difference. As the material is pretty much transparent at the viewing angle, the light falloff should only be minimal. Unfortunately it's devastating. Turning up diffuse for layer 2 doesn't make a difference (1000% and above). No light passing through.

    Unchecking the node button for glass and setting transparency up to 100% and IOR to 1.54 (or whatever) brings us back on track.

    If this isn't a bug I'll eat my shorts.

    Cheers
    Thomas

    P.S.: Thanks for any feedback.
    Attached Files Attached Files

  6. #6
    Triglycerous Gluteous Dave Jerrard's Avatar
    Join Date
    Apr 2005
    Location
    Burbank
    Posts
    1,061
    Quote Originally Posted by Thomas M.
    If I choose nodes instead of the classic texturing menu, the object remains black, never mind what kind of setup I use in nodes. Refraction node in diffuse shading like always:
    My guess is this is the problem. The refraction node should be connected to the Refraction Shading input, NOT the Diffuse Shading. No nodes connected to the Diffuse Shading input will affect the surface's transparency. Even though it might look transparent, it's not, and you'll get solid shadows. The refraction you see on the surface is actually treated as a texture map in this case.

    The Refractions Node really should be plugged into the Refraction Shading input, which is controlled by the Tranparency channel. The Refraction Shading channel - or buffer - tells the surface what to refract. But it still needs to be told how much of this refraction is visible. It gets this info from the Transparency channel. If you leave Transparency set to 0, then the surface is not transparent. And a non-transparent surface will not refract any light going through because no light can go through it.

    No light passing my glass object so the object beneath lies in total shadow. If I disable "cast shadow" for the glass it works, but as glass has a density to it, it cast a shadow. Worked for years, but now the nodes f... it up.
    No they don't. They're doing their job. You just haven't told the surface it's transparent, so it's going to block all the light rather than transmit it.

    Reflections on the object beneath the glass show up, so the glass works for the diffuse and specular light like a sunblocker. Not very nice, at least not for 100% transparent glass.
    Reflections work because they're reflecting what they see on the inside surface of the glass. Remember, the Refractions node is essentially painting a refraction solution onto the glass object, not actually making it transparent. The specularity is blocked because that needs a direct line of sight to a light. Since you have a surface that's not actually transparent between the object and the light, the object is in shadow, so no light and no specular highlights.

    He Who Will Have Some Examples In A Bit.
    Last edited by Dave Jerrard; 10-24-2006 at 03:54 AM. Reason: Well, Chris from Shipping & Receiving wants to go solo! If we lose him, we'll lose our sex appeal. He's the only one with hair!
    - Any typos are the result of a creative, yet rebellious keyboard.

    ASUS KGPE-D16 MB
    2 AMD Opteron 6272 CPUs
    32GB Kingston KVR1333D3D4R9S RAM
    EVGA|01G-P3-1556-KR GTX550Ti video card

  7. #7
    That sounds interesting, but so far I never had any luck in using the Refraction Shading or Reflection Shading. All stays black. And so far I've never seen in any thread or any video or any tutorial (never mind the "manual") an example of how this stuff works.

    As far as I can tell, for LWers this is unknown territory.

    Any ideas?

    Cheers
    Thomas

    P.S.: By the way. If you are right, it fücks up my whole node understanding.

  8. #8
    Triglycerous Gluteous Dave Jerrard's Avatar
    Join Date
    Apr 2005
    Location
    Burbank
    Posts
    1,061
    Here's some examples. In this one, I have a Refraction Node plugged into the Diffuse Shading, using a Logic node to set the air surface, and a gradient to define some incidence angle reflectivity. There's a reflective orange box inside this ball, and the ball has an IOR of 2. There is no transparency.

    Click image for larger version. 

Name:	Node-Refraction-1.png 
Views:	376 
Size:	302.5 KB 
ID:	38162

    As you can see, the shadow of the ball is solid black, and you also can't see any light hitting the box inside the ball. The box is still reflective, but that's because it's reflecting what visible on the inside of the ball, which is the Refraction Node's output. Now, for a crystal ball like this, a dark shadow is actually pretty accurate, as this kinda simulate the caustics that would normally happen. But if you were to apply caustics to the scene, the ball would not cast any, again, because it actually has no transparency.

    Now in this image, I've connected an incidence angle gradient to the Transparency channel. Now the shadow is very transparent and you can see the light affecting the box, showing the orange color.

    Click image for larger version. 

Name:	Node-Refraction-2.png 
Views:	317 
Size:	326.5 KB 
ID:	38163

    But the Transparency value is not affecting the amount of refraction seen in either image. This is because the Refractions Node is plugged into the Diffuse Shading, rather than where it should be - the Refraction Shading input.

    Here I just moved the Refractions Node's connection from the Diffuse Shading to the Refraction Shading input. Nothing else has changed.

    Click image for larger version. 

Name:	Node-Refraction-3.png 
Views:	311 
Size:	322.6 KB 
ID:	38164

    About the only visible difference is the darker edge on the ball - it's more accurate now - and the color change, due to the color of the ball being magenta and the Diffuse level being set to 100%. Previously, the brightness was being incorrectly boosted because the refraction was being treated as diffuse shading. The ball's color was also being overridden by the refraction colors being fed into the Diffuse Shading, which actually overrides the Color, Diffuse and Luminosity channels.

    In this last image, I removed the gradient from the Transparency channel again. Notice that there's no longer any visible refraction. The ball appears to be an opaque, magenta ball - which it is now.

    Click image for larger version. 

Name:	Node-Refraction-4.png 
Views:	238 
Size:	263.9 KB 
ID:	38165


    He Who Thinks He Has More Examples Coming Up.
    Last edited by Dave Jerrard; 10-24-2006 at 05:38 AM. Reason: I feel I'd be more productive if my phone dialed out.
    - Any typos are the result of a creative, yet rebellious keyboard.

    ASUS KGPE-D16 MB
    2 AMD Opteron 6272 CPUs
    32GB Kingston KVR1333D3D4R9S RAM
    EVGA|01G-P3-1556-KR GTX550Ti video card

  9. #9
    Triglycerous Gluteous Dave Jerrard's Avatar
    Join Date
    Apr 2005
    Location
    Burbank
    Posts
    1,061
    Quote Originally Posted by Thomas M.
    That sounds interesting, but so far I never had any luck in using the Refraction Shading or Reflection Shading. All stays black. And so far I've never seen in any thread or any video or any tutorial (never mind the "manual") an example of how this stuff works.
    The bsics for using the four shading inputs at the bottom are...

    Diffuse, Translucency and Subsurface Scattering nodes plug into the Diffuse Shading input,
    Specular nodes go to the Specular Shading input,
    Reflections nodes go to Reflection Shading and,
    Refraction nodes go to Refraction Shading.

    Now you can mix them up if you want, since you can get interesting effects, like a transparent object with a solid shadow... But generally, follow the list above.

    The Occlusion node is a special case and isn't tied to any shading input - it's more of a control for other nodes. But it can be fed into these if all you want is an occlusion buffer.

    Since you're saying that everything stays black, my guess is you'r enot setting anything in the Reflection or Transparency channels, either in the Surface Editor or in the Node Editor. It should be noted that the Reflections nodes work in a similar fashion to the Refraction Nodes. The Reflection Shading input is controlled by the Reflection channel. All the Reflection Shading does is define what the reflections look like. The Reflection Channel defines how much of the Reflection Shading we see.

    So to recap, Transparency controls how much of the Refraction Shading is visible and Reflection controls the amount of the Reflection Shading that is visible.

    Diffuse Shading overrides the Color, Diffuse and Luminosity channels since these are all aspects of the internal shading model in Lightwave, which is the Lambert shading model. To use a different shading model, like Oren-Nayar or Minnaert, you need to feed the color and diffuse values into that shader, which is then fed into the Diffuse Shading. Feeding a color directly into Diffuse Shading makes the surface that color, regardless of lighting, essentially making it a luminous surface

    Specular Shading also overrides the Specularity and Glossiness channels. Each Specular node has its own controls for these.


    P.S.: By the way. If you are right, it fücks up my whole node understanding.
    Only with the shading inputs. You can do nodal surfacing using the all the other inputs just like you did before with the Surface Editor and texture layers - these work the same way. It's the four red dots at the bottom that require special handling, and that's because they add some greater texturing power. They actually get in and override the internal shading system that LightWave uses, much like shader plugins like BRDF, Natural Shaders or G2 do. The shaders tend to group multiple aspects of a surface together, or even use new settings (like Minnaert's Darkening value, or Anisotropic's U and V amounts). You don't need to use them if you don't want to. You can do glass the old way, or you can use the node versions of those same channels, or you can use the shading inputs. The nice things about Nodes is that you can mix & match most things quite freely.

    He Who Usually Uses The Transparency And Reflections Channels In The Surface Editor With Nodes.
    Last edited by Dave Jerrard; 10-24-2006 at 06:06 AM. Reason: Bink, Bink, Bink, Bink, Bink...
    - Any typos are the result of a creative, yet rebellious keyboard.

    ASUS KGPE-D16 MB
    2 AMD Opteron 6272 CPUs
    32GB Kingston KVR1333D3D4R9S RAM
    EVGA|01G-P3-1556-KR GTX550Ti video card

  10. #10
    Dave, that's some great stuff. Thanks for all the explanations and the examples.

    May I just ask you for one favour. If you look at my glass surface, you probably see how I used to deal with nodes and I guess my way is great, except from that it doesn't work correctly. Wished though.

    Can you translate my approach to your understanding of how it works and post the node? Probably that would help me to get the written word settle in my brain.

    Thanks very much anyway.

    Cheers
    Thomas

  11. #11
    I guess I'm not getting it yet. Played around a bit, but I'm still confused.

    Diffuse Shading and Specular Shading work great so far. I don't need any setting in Diffuse nor Specular to get everything done. This way I can mix shaders and everything nicely.

    Now you are telling me that in order to make Reflection Shading and Refraction Shading work, I need to have settings in Transparency and Reflection. If it is so, how can I achieve multi-layered reflection materials with diffuse and refraction properties? So far I thought it's either Standard texturing, Nodal texturing with green input dots or Nodal with red dots.

    What would I need two inputs for reflection for? I guess your logic is pretty o.k., but I don't see the general idea yet. So far (using my logic, wrong one?) I could mix many reflection layers with diffuse layers. Using your system I wouldn't know how to do so.

    Probably you can post a node tree from your set up (perfect glass).

    Also I'd love if a NT guy could jump in, as the manual and other documentation lack any information of how to deal with this stuff. Also in all the forums nobody as far as I believe really understood how to work with the Reflection and Refraction Shading.

    Don't let Nodal become another mistery like IKBooster. A video or tutorial would be more than welcome and needed.

    Cheers
    Thomas

  12. #12
    P.S.: My nodal tree approach looks much more convenient than the one described by Dave. What's the advantage of all four Shading inputs?

  13. #13
    Triglycerous Gluteous Dave Jerrard's Avatar
    Join Date
    Apr 2005
    Location
    Burbank
    Posts
    1,061
    Quote Originally Posted by Thomas M.
    Dave, that's some great stuff. Thanks for all the explanations and the examples.

    May I just ask you for one favour. If you look at my glass surface, you probably see how I used to deal with nodes and I guess my way is great, except from that it doesn't work correctly. Wished though.

    Can you translate my approach to your understanding of how it works and post the node? Probably that would help me to get the written word settle in my brain.

    Thanks very much anyway.

    Cheers
    Thomas
    I didn't even notice the file you posted earlier. I just grabbed it and I'll take a look.


    He Who Only Got Into Nodes Because Of The Shaders.
    Last edited by Dave Jerrard; 10-24-2006 at 03:42 PM. Reason: If the noise is bink then I can explain...
    - Any typos are the result of a creative, yet rebellious keyboard.

    ASUS KGPE-D16 MB
    2 AMD Opteron 6272 CPUs
    32GB Kingston KVR1333D3D4R9S RAM
    EVGA|01G-P3-1556-KR GTX550Ti video card

  14. #14
    if you use the reflection shading, you still have to set a scaler in the original reflection input...If you didn't know that already?

  15. #15
    Triglycerous Gluteous Dave Jerrard's Avatar
    Join Date
    Apr 2005
    Location
    Burbank
    Posts
    1,061
    Ok, let's pick that node map apart...

    The first thing I see that's not right is you have a logic node applied to the Transparency channel, setting different transparency values for front and back faces.
    Click image for larger version. 

Name:	Logic-1.png 
Views:	307 
Size:	5.8 KB 
ID:	38195
    With this setting, True means the front face of the polygons and false is the back side. This tells the front faces to be 0% transparent. There's no transparency, so this makes the second logic node, which controls the Refraction Index, less than useful...
    Click image for larger version. 

Name:	Logic-2.png 
Views:	219 
Size:	5.9 KB 
ID:	38196
    A non-transparent surface can't refract light. And since you can't see into the surface, you'll never see the inner air surface (or backsides of polygons), unless those are facing outside of the objects.


    Next you have a Refraction Node and a Reflection Node going into a mixer, which is then plugged into the Diffuse Shading. These should't be mixing - they should go into their respective shading inputs. I'm not sure what the Air-to-glass gradient is really doing, but it's not what you think. If you want to have the mixer switch between FG & BG based on which side of the polygon you're looking at, then the easiest way is to just feed the Polygon Side info to the Opacity input on the Mixer, leaving the Blending Mode set to Normal. Polygon Side outputs either a 0 (backside) or a 1 (frontside), and this value, when fed into any green dots is treated as a percentage, where 1 = 100%. So, this gives the Mixer's Opacity input either a 0% or a 100% value. In the image below is your original settings (and my backdrop since your HDR Image wasn't included) on the left and my result of just replacing the gradient with the Polygon Side info.

    Click image for larger version. 

Name:	Render-1.png 
Views:	317 
Size:	107.0 KB 
ID:	38197

    Now since you mixed two different types of shader here, the results are going to be wrong - Reflection should go to reflection and refraction to refraction. So let's fix this up a bit. Here's a couple versions that do the same thing. The first is a larger, more complex one, based on the nodes you had setup already. They're just reorganized a bit here.

    Click image for larger version. 

Name:	BigNodes.png 
Views:	432 
Size:	135.0 KB 
ID:	38198

    This second one does the same thing, but doesn' tuse as any nodes. Two shaders were removed because they weren't doing anything that wasn't already handled identically in the regular surface channels.

    Click image for larger version. 

Name:	LilNodes.png 
Views:	370 
Size:	76.5 KB 
ID:	38199

    Both of these render the exact same image. Since I've used up all my attachment slots, I'll post the object in another message so you can take a closer look at the nodes.

    He Who Didn't Think He'd Be Using Nodes Much, Until He Saw Those Shaders.
    Last edited by Dave Jerrard; 10-24-2006 at 05:53 PM. Reason: IT'S NOT BINK!
    - Any typos are the result of a creative, yet rebellious keyboard.

    ASUS KGPE-D16 MB
    2 AMD Opteron 6272 CPUs
    32GB Kingston KVR1333D3D4R9S RAM
    EVGA|01G-P3-1556-KR GTX550Ti video card

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
  •