Digital Art Zone

 
     
Resources for lighting glass in 3D
Posted: 30 August 2012 10:05 AM   [ Ignore ]
New Member
Total Posts:  12
Joined  0

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.

Profile
 
 
Posted: 30 August 2012 10:38 AM   [ Ignore ]   [ # 1 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

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.

 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 30 August 2012 10:47 AM   [ Ignore ]   [ # 2 ]
New Member
Total Posts:  12
Joined  0

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.

Image Attachments
stock-photo-train-moving-in-tunnel-abstract-view-7968100.jpgThick_Wall_Quartz_Glass_Tube.jpg
Profile
 
 
Posted: 30 August 2012 11:04 AM   [ Ignore ]   [ # 3 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

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.

Image Attachments
inside-tube-5-percent-absorption.jpgoutside-tube-absorption.jpg
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 30 August 2012 11:06 AM   [ Ignore ]   [ # 4 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

Here’s the same two angles without using absorption.

Image Attachments
inside-tube-no-absorption.jpgoutside-tube-no-absorption.jpg
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 30 August 2012 11:14 AM   [ Ignore ]   [ # 5 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

Here’s the shader settings.

Image Attachments
Picture_1.pngPicture_2.pngPicture_3.pngPicture_4.pngPicture_5.png
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 30 August 2012 11:23 AM   [ Ignore ]   [ # 6 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

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.

Image Attachments
anistropic-tube.jpgoutside-anistropic-tube.jpgPicture_6.pngPicture_7.png
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 30 August 2012 11:29 AM   [ Ignore ]   [ # 7 ]
New Member
Total Posts:  12
Joined  0

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?

Profile
 
 
Posted: 30 August 2012 04:22 PM   [ Ignore ]   [ # 8 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

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.

 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 31 August 2012 06:04 PM   [ Ignore ]   [ # 9 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

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.

Image Attachments
Picture_1.pngPicture_2.png
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 06 September 2012 10:23 AM   [ Ignore ]   [ # 10 ]
New Member
Total Posts:  12
Joined  0

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

Profile
 
 
Posted: 06 September 2012 02:05 PM   [ Ignore ]   [ # 11 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5244
Joined  2006-08-27

How’s the shader coming?

 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile