View Full Version : Faking Refractions in shake

12 December 2004, 08:25 PM
Hi all,

have heard that i can fake refractions in shake, but am not sure how to go about doing it. Have been playing about with both displace filter and a macro called glAss. I've figured out that i need a grey scale image to control the displacement/offset. How do i render out my 3D model (in this case a jagged crystal) to that it works convincingly - does the greyscale colour need to be mapped to the model's normals or depth or what?

Hmmmm maybe this would be better in the rendering forum! Sorry if this is a basic question, but anyone have any ideas?

thank alot

12 December 2004, 02:25 AM
I have heard people talking about using surface normals and ray direction to create an accurate technique for warping the background plate using a warpX node. This seems excessive to me ! If one needs really accurate refractions then I would suggest letting your ray tracer handle it.

One can very easily fake refraction, it wont be accurate ( but then again if they are looking at your refractions then what is the rest of the image lacking ?!?)
Use a combination of iDispalce and iBlur. Just render the object with a shader that will show the contouring of the refractive object with a fresnel effect.

for example in Maya use a facing ratio of a ramp shader.
in max use a falloff shader.

Max sure this is rendered as either a grey scale or independant axis are rendered in to a channel. ie x into red channel and y into green. as iDisplace can use seperate channels for each axial displacement.

Hope this helps

12 December 2004, 02:34 PM
if your crystals are not too transparent while rendering, it usually even works if you take the luminance of your image or in special cases one of the color channels to drive an iDisplace node with that.

if the object is not too prominent in the scene you will get along with that one.
not correct as aneks mentioned but usually enough to trick the eye.



12 December 2004, 06:15 PM
Thanks alot, sounds like what i'm looking for. Much appreciated


01 January 2005, 03:43 PM
Render a normal pass of your 3D object and then use this as a source to displace your background image. I can't remember wether the normals have to be in camera co-ord space or object co-ord space, but you will soon find out. The individual r,g and b channels can individually drive the displacement thus you can achieve a very good fake refraction, much better than using a single greyscale channel.

CGTalk Moderation
01 January 2006, 07:00 AM
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.