Resources for lighting glass in 3D

tami_7956c1f21dtami_7956c1f21d Posts: 0
edited August 2012 in Carrara Discussion

Anyone know of a good tutorial or guidelines for lighting glass in 3D? I've set up a scene looking down into the end of a glass tube, and am having trouble getting it to look "glassy." I think I'm missing some major principles of lighting for glass. Do I need other things in the room for reflections? A background image? Specific lights? Any help or links would be greatly appreciated. Thank you so much in advance.

Post edited by tami_7956c1f21d on

Comments

  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    Is there an example image you can post that has some of the effects you would like to see in your rendered image? That might be the easiest way to start.


    For reflections, you will need objects to reflect. The assembly room uses a reflection map, but it's only an Open GL effect and has no bearing on the final rendered image. If you don't want other physical objects in the scene, you can use images or HDRIs in the background, under scene settings.


    There's also the shader to consider. Depending on what you want to do, you may need to set parameters for in-scattering, absorption, Fresnel, etc. which can be set under the Transparency channel in your shader. To set the Fresnel effect you'll also need to set up the Refraction channel. Look for Index of Refraction and try one of the glass presets. I'll try and post some screen shots to help you on the way.

  • tami_7956c1f21dtami_7956c1f21d Posts: 0
    edited December 1969

    Thanks. I'm trying to set up something that looks like you were standing inside one of these glass tubes (shown on red). The effect I want is something like this blue image, where it looks shiny and glassy, but with less contrast than in this stock photo. I started with straight tube, but then switched to a slightly curved one because it seemed to be easier to get the tube effect.

    Thick_Wall_Quartz_Glass_Tube.jpg
    499 x 372 - 22K
    stock-photo-train-moving-in-tunnel-abstract-view-7968100.jpg
    450 x 319 - 36K
  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    The streaks I think will need to be in the reflected image. I'm not sure how to stretch out a reflection like that, unless it's a refraction setting.


    Here's a couple examples. The first use the absorption and in-scattering functions in the transparency channel, a spherical image in the scene's background and the Skylight in the Render Room. I rendered from within the tube and from without.

    outside-tube-absorption.jpg
    640 x 480 - 196K
    inside-tube-5-percent-absorption.jpg
    640 x 480 - 138K
  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    Here's the same two angles without using absorption.

    outside-tube-no-absorption.jpg
    640 x 480 - 206K
    inside-tube-no-absorption.jpg
    640 x 480 - 176K
  • evilproducerevilproducer Posts: 9,040
    edited August 2012

    Here's the shader settings.

    Picture_5.png
    653 x 498 - 104K
    Picture_4.png
    447 x 502 - 62K
    Picture_3.png
    809 x 508 - 122K
    Picture_2.png
    622 x 595 - 124K
    Picture_1.png
    634 x 621 - 119K
    Post edited by evilproducer on
  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    Regarding the streaky reflections and/or refraction, I forgot about the different lighting models. You may want to set the shader up using an anistropic lighting model. Maybe in combination with the Fresnel settings you'll get what you want.

    Picture_7.png
    479 x 341 - 30K
    Picture_6.png
    575 x 449 - 93K
    outside-anistropic-tube.jpg
    640 x 480 - 194K
    anistropic-tube.jpg
    640 x 480 - 167K
  • tami_7956c1f21dtami_7956c1f21d Posts: 0
    edited December 1969

    Thanks! I think this last screenshot is getting close to what I want. Playing around with this right now. One question - what is a spherical image in the scene's background?

  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    A spherical image is one that can be wrapped around a sphere without distortion. Think of the Carrara universe as a giant invisible sphere. If you were to place an image in the Background in the Scene's settings, it would wrap around the universe. If it's a standard photograph it would appear distorted. A spherical render would appear normal. The cityscape in the samples I posted is a spherical render. The background has the advantage of being able to be reflected, used as a light source, etc. The disadvantage is that it cannot be seen until you do a spot render or render, and normal images are distorted as mentioned above. The best place to use a normal image is in the Scene's backdrop. The backdrop is not reflected and cannot be used as a light source.


    HDRI (High Dynamic Range Images) can be used as a light source when placed in the Background and the Skylight box is checked in the Render Room. You can also use standard images as light sources as well, it's just not lit with as great a range of colors, etc. You can also use flat colors, gradients, etc. When used as a light source, HDRIs and the like are considered IBL (Image Based Lighting). Brighter areas of the image give off more light, and darker areas less light. The light is more of a diffuse light with soft shadows. If you want the light of an HDRI, but don't want the image visible, you can use an image or color in the Scene's Backdrop.


    Here's the spherical image I used. It's one I rendered using Carrara's spherical camera, and I've made it available without restrictions here:
    http://www.sharecg.com/v/51297/view/6/Texture/Dystopia-Spherical-background-image-map
    There's also a night version.

  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    DAZ's site (and several other) was acting up on me last night and I couldn't upload a screen shot of how to set the background image.

    Picture_2.png
    246 x 544 - 63K
    Picture_1.png
    250 x 848 - 33K
  • tami_7956c1f21dtami_7956c1f21d Posts: 0
    edited December 1969

    Thank you so much. I am familiar with setting background images, but not of the spherical variety. I really appreciate your help!

  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    How's the shader coming?

Sign In or Register to comment.