secondary ray 2005-03-30 - By Jim Rothrock
Back <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Gerbrand Nel wrote: <blockquote cite="mid003201c53503$4509c790$1600a8c0@(protected)" type="cite"> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1"> <meta content="MSHTML 6.00.2900.2604" name="GENERATOR"> <div><font face="Arial" size="2">still feels like it shouldn't work this way, if I make something 100 % transparent but still have highlights running on it, everything behind that object should be a secondary ray... because it's a refraction on the transparent object, even if the index of refraction is 1 ??? does anyone else agree????? the funny thing is it starts working the moment you change the index of refraction. usefull sometimes but isn't that what the sprite shader is for????</font></div> </blockquote> Without having the source code to the shader you are using, I can make a guess about what is happening. If the relative index of refraction is not 1.0, the ray direction must change, so the shader calls mi_trace_refraction(). If the relative IOR is 1.0, the ray direction will not change, so mi_trace_transparent() is called instead. This is a speed optimization. mi_trace_transparent() will have approximately the same effect as mi_trace_refraction(result, state, &state->dir), but transparency rays are considered to be primary rays. From the mental ray documentation:<br> <br> <p><tt> miRAY_PRIMARY(raytype)</tt><br> is true if the raytype is a primary or a transparency ray.<br> </p> <pre class="moz-signature" cols="72">-- Jim Rothrock | Stan Winston Digital | <a class="moz-txt-link-abbreviated" href= "mailto:jimr@(protected)">jimr@(protected)</a> </pre> </body> </html> --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|