View Full Version : refraction of light problem

08-20-2003, 03:43 PM

I'm a relative newbie to lightwave and need a little help with light refraction problem. It seems I teach optics and am trying to illustrate light passing through a thin lens and being focused. While using a spotlight to pass through the lens object I notice that the light beam itself does not bend or come to a focal point at
a set distance as it should. I've tried this with a volumetric light source as well as a non volumetric source. Neither brings the parallel beam to a focus as it should. Any tutorials out there or help? I do have render options refraction turned on, as well as raytrace and background on the surfaces. Help!

Mitch Loftin

08-20-2003, 04:08 PM
To get the focus effect turn on set the refraction indexof the surface, enable ray trace refraction, and on the global illumination panel, my must enable caustics.

In order to get an accurite refraction, you have to take into account for the refractivity of the object, as well as the air between the viewer and the caustic focus... this can get a bit complicated, and there are a bunch of tutorials on this, or you can just pump the refractive index of the lens... I'd try starting at 2 or so.

08-20-2003, 08:55 PM
Thanks for taking the time. Any guidance as to where these tutorials might be found?

08-20-2003, 10:35 PM
Try the mother of all Lightwave... Flay.com... search for glass under the modeling or texturing tutorials...

Here's 2:

Jack Daniel's bottle (http://www.flay.com/LinksDetail.cfm?LinkID=450)

Southern Comfort bottle (http://www.flay.com/LinksDetail.cfm?LinkID=137)

08-20-2003, 10:39 PM
There is a refractive index chart in the manual, but as I said, unless you go for the more complex method, including the "air polys" it doesn't yield a good looking result. Like I said I usually just play with the value until I get the result I want to see.

The tutorials I speak of are in books, not online as far as I know. I think Dan Ablan had an example of this in his 6.0 book, and I know there was one in the I can't remember the title book... doooh! It's the one with the sword with the jewel in the hilt on the cover... Someone here will know the title. Come to think of it, I think that at least part of that tutorial was in newtek pro magazine.

08-22-2003, 08:04 AM
I've tried the lightwave 6 text and did not find anything that helped. Again what i am trying to get is a 3-d visualization- preferably volumetric- of the light beams after they have already passed through and lens to demonstrate how they come to various focal points behind the lens. Flay.com had great info on making A lens look like a lens, but not on the light after it exits the lens. Where are "air" polys discussed? Thanks again


08-22-2003, 08:51 AM
I don't think this can be done with the actual "cone" of a LW spotlight, as there is no physical light. (There is no spoon...)

Instead, why not fake it with a cylinder in front of the lens and a cone on the other side. Make these "light-beam" objects self-luminous and transparent with some noise, and you're done in 2 minutes.

Not only easy to create, but scads easier to change later.
And will render alot faster.

08-22-2003, 02:21 PM
Yes I can do that. It just seemed since lenses come in all shapes and sizes and so do therefore light beams resulting from them, that using volumetrics and lightwave's refracting calculation software that it should be able to generate the refracted volumetric for me and change it on the fly as the light source moved closer or the lens was changed. Otherwise I have to morph the resulting light beam to other shapes as I move the light source closer and farther away. In addition other lenses (myopia, hyperopia, astigmatism alone, astigmatism w/ myopia, astigmatism w/ hyperopia, mirrors,prisms, etc.,) create different results.



08-22-2003, 02:24 PM
You want to see the volumetric light and not the actual focused light?

Liquidpope is right that actual objects will render much fasted than rendering using volumetrics... I'd suggest using the edge transparency shader plug-in, with the edges set to opaque. Fiddle with the edge threshold until you get a satisfactory look. Also a bit of falloff will make it look a bit more real. Of course unless there is smoke, or some other medium in the air you wouldn't see the light...

08-22-2003, 02:50 PM
I can see how I might sound confused. I do want to see the light beams as they emerge from the back surface of the lens and come to a focus. Since I am teaching optics, following the path of the beams is important. Calculations taught involve at what distance will this light come to a focus and what does it look like as it is traversing through the ocular media of the eye(ie cornea, aqueous humor, lens and vitreous humor). Making a spectacle lens in air look real, and getting an object's image to project on a screen (or retina) I can do. Volumetrics, I thought might also give me the appearance of the convergeing beams as they change shape passing through each media. Otherwise using smoke, fog might be needed. That might make it look a little unnatural. I've tried different media behind my lenses and while I can get the volumetric beam to show up in these media, it does not bend or focus as it should after pasing through. Thanks again.


08-22-2003, 03:40 PM
raytraced rendering traces the rays from the cmera, back via refraction or reflection, to the object.
Not sure if it treats the light from the light source to the object in the same way. suppose it can't because light sources only show in renders by post process flare or by being at the start end of a volumetric light beam (which is also appled post process.)
Now if you turn on caustics, I think that you can get a 'real' effect with a lens or prism bending a light beam in clear air - hold a peice of paper in the beam and see.

but I'm afraid the volumetric post process just follows the original beam path, I suspect it's complex enough to work out the brightness sampling in a simple beam, never mind a kinky one.

I suspect that it is possible to write some code to do it, but it, like LW, would be a point sampling cheat not the real thing, and I suspect too, that the render times would be out of this world.

08-25-2003, 03:12 PM
Thanks. Unfortunately that does seem logical for the animators goal 99% of the time must be a photorealistic object and not ray traced beams. It does make my job more difficult and it seems it could have some other possible applcations as in laser beam imaging.