POV-Ray : Newsgroups : povray.unofficial.patches : Material{} in mesh2 ? : Re: Material{} in mesh2 ? Server Time
2 Sep 2024 00:18:19 EDT (-0400)
  Re: Material{} in mesh2 ?  
From: Ron Parker
Date: 3 Jan 2001 20:33:37
Message: <slrn957knk.bhb.ron.parker@fwi.com>
On Wed, 03 Jan 2001 20:27:40 -0500, Chris Huff wrote:
>Not quite as bad as the ior problem...you could take the media of the 
>faces at each end of the ray segment being sampled, and do something 
>like interpolate between the two while sampling, or compute both and 
>average their results, etc...with ior, you would have to predict the 
>path the ray would take, tracing curved rays...not fun.

But you can't.  POV only knows to calculate media because it thinks it's
leaving an area of one media and entering an area of the other.  There 
is no way to distinguish between the case you mention and the case of 
hitting another object completely enclosed in the first object, so POV
will use the media specs of the first face you hit to color the ray 
between the two faces, and then use the media specs of the second face
to color the ray that goes beyond the second face.  That's just how it
works, and making it work any other way would be very difficult indeed.

There is a legitimate use for different interior statements on different
faces of a triangle union, and you could make the case that it should be
allowed in meshes, but the way it's done now actually is correct, and 
any modification to it would break that correctness.

Picture a cube made of bicubic patches (because I hate triangles.)  Give
each face of that cube the same interior (by assigning a material to the
union of faces; you can't do it any other way.)  Now union another similar 
cube, completely enclosed by the first cube and with a different interior.
You have a single union of bicubic patches with different interiors on 
some faces, and it actually behaves correctly, physically speaking.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.