I've been stumped on how I can go about creating an object that looks like glass. No matter what I do, I always get a solid colour. Any hints?
Creating a glass object in ray tracing
Started by Psycho_Gamer, Mar 30 2007 08:12 PM
7 replies to this topic
#1
Posted 30 March 2007 - 08:12 PM
#2
Posted 31 March 2007 - 01:03 AM
Google for refraction and Snell's law.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 31 March 2007 - 05:43 AM
Reedbeta said:
Google for refraction and Snell's law.
Yeah, I have been trying refraction, but I think I might have the formula for my refraction ray direction in correct. On my sphere, i currently get a ring that looks transparent, while the inside is solid.
#4
Posted 31 March 2007 - 06:04 AM
Try working out the vectors on paper for a simple scene, using your formula, and check that everything looks like it's going the right direction. There are different sign conventions in use for the incident ray and refracted ray, so you might have a formula that doesn't match your program.
reedbeta.com - developer blog, OpenGL demos, and other projects
#6
Posted 02 April 2007 - 07:32 AM
Thanks folks.
#7
Posted 03 April 2007 - 09:46 AM
and there is always the excellent raytracing article series here at devmaster :
http://www.devmaster...eries/part3.php
http://www.devmaster...eries/part3.php
If Prolog is the answer, what is the question ?
#8
Posted 03 April 2007 - 10:25 PM
anubis said:
and there is always the excellent raytracing article series here at devmaster :
http://www.devmaster...eries/part3.php
http://www.devmaster...eries/part3.php
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











