|
|
In article <web.3d556659fa75637ea3c6bc9f0@news.povray.org>,
"Jurjen" <jjs### [at] hotmailcom> wrote:
> Here is some code that will change the behaviour of smooth-triangles:
> - It will trim the triangles so the spots with inverted normals get
> transparent.
> - This also trims the triangles towards the light source so there will be
> less shadow on triangles behind a smoothed triangle.
I have been wondering about this as a possible solution to the inverted
normal problem, I've just been too lazy to try it out...nice work!
Actually, the variation I was thinking was this: if the smoothed normal
is pointing in the direction of the ray, skip that intersection *and the
next one*, but then go on as usual. In most well-behaved meshes, this
should have the effect of "chopping off" the areas with the bad normals
like your patch, but still let the inside of the mesh render, leaving
the mesh still useful for things like media.
I think your change might have another side effect: it will always let
rays go through the entire mesh, even if the area that has the reversed
normal is in front of an area with a correct normal. I'm not sure
though, I haven't applied this patch to see where it goes.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|