POV-Ray : Newsgroups : povray.programming : Smooth mesh 'bug' inverted normals (+Patch) : Re: Smooth mesh 'bug' inverted normals (+Patch) Server Time
30 Apr 2024 23:14:34 EDT (-0400)
  Re: Smooth mesh 'bug' inverted normals (+Patch)  
From: Christopher James Huff
Date: 11 Aug 2002 11:08:12
Message: <chrishuff-2453F0.09562311082002@netplex.aussie.org>
In article <web.3d563c38956bba3e2d1684350@news.povray.org>,
 "Jurjen" <jjs### [at] hotmailcom> wrote:

> When all the normals of a convex part of a mesh are pointing outwards then
> there should not be any holes where they shouldn't be. But when the viewer
> is inside the mesh the part of it that encloses the viewer will be totally
> transparent (all the normals will be pointing away from the viewer).

In the case of a transparent mesh the inside needs to be visible, that's 
the reason for my idea. It would be especially bad when media is 
involved, the ray would never leave the mesh because all intersections 
from inside are ignored.

Pseudocode:

if true-normal faces toward ray
    (ray origin is on outside)
    
    if interpolated-normal faces away from ray
        skip intersection
        (it shouldn't be visible anyway)
        
        set flag to skip next
        (it is part of the interior visible through
            the skipped intersection)
    end
else
    (ray origin is on inside, flip the normal
        directions and do the same thing as above)
end

There are a few cases where this wouldn't work, and it would require a 
"well behaved" mesh with good normals and a completely closed surface, 
but I think it would work in most cases.

-- 
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

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