Forums

You are not logged in.

#1 2007-01-15 17:50:24

bertrand
Member
From: Vancouver
Registered: 2007-01-09
Posts: 324
Website

cornea problem

I have an eye with its cornea. I put an index of refraction of 1.376 to the cornea.
My problem is that the refraction makes the eye "shrink" and I have a black ring around the eye, within the cornea.
It is not a max trace depth problem.

Is my shader badly written, or is it a common problem?
Do you have a suggestion?

Thanks

Offline

 

#2 2007-01-16 00:50:24

aghiles
3Delight Developer
Registered: 2007-01-03
Posts: 1081
Website

Re: cornea problem

You should be using 1/eta probably. It depens on how the ray hits the surface.
Could you poste a snippet of your shader code here?

Offline

 

#3 2007-01-16 07:27:34

olivier
3Delight Developer
Registered: 2007-01-09
Posts: 1930

Re: cornea problem

How is it modeled? Does the cornea meet the eye at the edges? It's possible the trace bias causes your cornea to start tracing behind the eye where they nearly meet. How large are those eyes to need raytracing anyway?

Online

 

#4 2007-01-16 11:53:17

berj
Member
From: Toronto, Ontario
Registered: 2007-01-10
Posts: 111
Website

Re: cornea problem

I'm certain aghiles is right.. the fresnel and refract shadeops are expecting "eta" which is the ratio of the index of refration of the material outside the surface to the IOF of the material inside the surface.

So.. if your ray is travelling from air to cornea eta is 1.0/1.376. 

The reason that it is done this way is so that rays can travel between volumes which both have IOFs greater than one. (eg from glass to the liquid inside the glass, etc).

Offline

 

#5 2007-01-16 13:47:33

bertrand
Member
From: Vancouver
Registered: 2007-01-09
Posts: 324
Website

Re: cornea problem

Yes, Aghiles was right. It solved the problem.
Thanks everybody.

Offline

 

Board footer

PunBB is © Copyright 2002–2005 Rickard Andersson

You are here: Resources » Forums
Follow us on Twitter
© 2006-2011 dna research. All Rights Reserved.
Trademarks & Copyrights Notices