PDA

View Full Version : creating a gradient in refraction


mister3d
01-04-2009, 05:07 PM
I want to create a gradient in a bottle refrection. I found only one way to make it yet, by placing a gradient just behind the bottle glass. is there any more clever way anybody knows?

http://img156.imageshack.us/img156/2356/gradientbehindglasshj3.jpg (http://imageshack.us)
http://img156.imageshack.us/img156/gradientbehindglasshj3.jpg/1/w226.png (http://g.imageshack.us/img156/gradientbehindglasshj3.jpg/1/)

Rens
01-04-2009, 08:21 PM
What renderer/program are you using? Also what kind of gradient are you looking for, something like the gradient on the left side of the bottle in your image?

Maybe you could look at a refraction normal pass or shader and drive a gradient with that. Or maybe a ray depth shader. Depends on what you want to do, but your plane behind the glass solution might the the easiest to control.

mister3d
01-04-2009, 08:34 PM
What renderer/program are you using? Also what kind of gradient are you looking for, something like the gradient on the left side of the bottle in your image?

Maybe you could look at a refraction normal pass or shader and drive a gradient with that. Or maybe a ray depth shader. Depends on what you want to do, but your plane behind the glass solution might the the easiest to control.

It is mental ray in 3ds max. Yes, it is the left side gradient in the liquid. I've seen it in several films and it's a cool way to present liquid in glass, that's why I'm interested in this effect. I remember in "Golden compass" there was a carafe lighted like this. I'm curious whether they used the same cheap trick as me, or used something more natural. I can't remember whether it was animated or just static.
Those shader-based compositing colutions are interesting ways, thank you Rens. It might be easier for me to link the gradient to the bottle with "visible to refraction" if simple animation is needed.

Rens
01-05-2009, 04:26 PM
Hi again mister3d. Ok I see what you want to do. Usually in photography a gradient like that is created by having a bright card or light box just off-screen. If I'm not mistaken, in your example image you'd place your bright gradient plane to the right of and behind the bottle, off-screen of course and viewed from the camera.

mister3d
01-05-2009, 07:18 PM
Hi again mister3d. Ok I see what you want to do. Usually in photography a gradient like that is created by having a bright card or light box just off-screen. If I'm not mistaken, in your example image you'd place your bright gradient plane to the right of and behind the bottle, off-screen of course and viewed from the camera.

Thank you Rens! I tried to make it the way you proposed and it worked! I also forgot to set high enough value for refraction tracing, this was the problem also. :buttrock:

CGTalk Moderation
01-05-2009, 07:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.