POV-Ray : Newsgroups : povray.programming : Smooth mesh 'bug' inverted normals (+Patch) : Re: Smooth mesh 'bug' inverted normals (+Patch) Server Time
1 May 2024 00:37:39 EDT (-0400)
  Re: Smooth mesh 'bug' inverted normals (+Patch)  
From: Warp
Date: 10 Aug 2002 21:32:53
Message: <3d55bec5@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> 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.

  Be aware that there's a case where both solutions give the *WRONG* result,
ie. they cause a hole in the mesh when there shouldn't be any.
  This scene demonstrates such case:

camera { location -z*4 look_at 0 }
light_source { y*10, 1 }

mesh
{ smooth_triangle
  { <0,-.5,-1><0,1,-1>, <-1,0,0><-1,1,.1>, <1,0,0><1,1,.1> }
  smooth_triangle
  { <1,0,0><1,1,.1>, <-1,0,0><-1,1,.1>, <0,.5,1><0,1,-1> }

  //double_illuminate // use this to fix the artifact
  pigment { rgb 1 }
}


-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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