POV-Ray : Newsgroups : povray.unofficial.patches : csg error with megapov's solid mesh? Server Time
2 Sep 2024 08:15:54 EDT (-0400)
  csg error with megapov's solid mesh? (Message 31 to 35 of 35)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 20:21:57
Message: <39ada525@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
:   And hope that the ray hits the mesh? If it doesn't, shoot another ray? What
: if after shooting 100 rays you still haven't hit the mesh? :)

  Fool me!
  Of course it's easy to shoot a ray that will certainly hit at least one
triangle (and thus at least two triangles since it's a closed mesh)!
  Just choose a triangle and make the ray go through its center.

  This also solves the problem of isolated mesh parts. After fixing one part,
just check if there are non-fixed triangles and choose one of them and repeat
the same thing described above.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: ryan constantine
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 22:19:01
Message: <39ADC093.EC8FCF64@yahoo.com>
where is the utility?  i looked in the newsgroups and looked for your
website but didn't find one.

Warp wrote:
> 
> ryan constantine <rco### [at] yahoocom> wrote:
> : what are the benefits of smooth triangles?
> 
>   This should be obvious when you see a mesh rendered with regular triangles
> and then with smooth triangles.
>   For examples, see:
> http://iki.fi/warp/PovUtils/smooth.html
> 
> :  do they have explicit
> : normals in the file?
> 
>   Yes.
> 
>   Although the mesh smoother calculates single normals for each vertex,
> it's perfectly possible that in a pov mesh there could be different normals
> for the same vertex, one for each triangle (actually there is, but they
> are often the same vector, but they could be different).
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ron Parker
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 23:23:20
Message: <slrn8qrkmk.289.ron.parker@fwi.com>
On 30 Aug 2000 18:51:43 -0400, Warp wrote:
>Ron Parker <ron### [at] povrayorg> wrote:
>: For a closed mesh surface, fire a ray from outside the bounding box and check
>: the normal.
>
>  And hope that the ray hits the mesh? If it doesn't, shoot another ray? What
>if after shooting 100 rays you still haven't hit the mesh? :)

No, fire it at a known triangle.  Determine the normal by which triangle it hit 
first, rather than the triangle you fired it at.

>  I was thinking about how to make sure that the mesh really is closed. I think
>that it's enough to check that every triangle has three and only three
>adjacent triangles.

That's what I'd think.

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


Post a reply to this message

From: Ron Parker
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 23:29:51
Message: <slrn8qrl2r.289.ron.parker@fwi.com>
On 30 Aug 2000 19:05:10 -0400, Warp wrote:
>  Oh, and there's another problem with the ray-shooting technique:
>
>  Even if your ray hits the mesh, if the mesh consists of separate parts
>(all closed) you'll only be able to fix the part that the ray hit. The other
>parts will still have the problem.

That part is guaranteed to be the outside shell of that part of the mesh.
Take that part (all of its triangles) out of the list of triangles, then
fire another ray.  The first surface it hits is either inside the fixed set
of surfaces or not.  If it's inside, its normal should face away from the ray.
If it's outside, the normal should face toward the ray.  Continue removing
these subsurfaces from the list of triangles until none are left.  Now
they're all corrected.

I've done this algorithm in 2D.  It does work.

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


Post a reply to this message

From: ryan constantine
Subject: Re: csg error with megapov's solid mesh?
Date: 31 Aug 2000 02:38:22
Message: <39ADFD4F.CE00FF9E@yahoo.com>
nevermind found it. i also found that my mesh is already in smooth
triangle form. now about texturing...

ryan constantine wrote:
> 
> where is the utility?  i looked in the newsgroups and looked for your
> website but didn't find one.
> 
> Warp wrote:
> >
> > ryan constantine <rco### [at] yahoocom> wrote:
> > : what are the benefits of smooth triangles?
> >
> >   This should be obvious when you see a mesh rendered with regular triangles
> > and then with smooth triangles.
> >   For examples, see:
> > http://iki.fi/warp/PovUtils/smooth.html
> >
> > :  do they have explicit
> > : normals in the file?
> >
> >   Yes.
> >
> >   Although the mesh smoother calculates single normals for each vertex,
> > it's perfectly possible that in a pov mesh there could be different normals
> > for the same vertex, one for each triangle (actually there is, but they
> > are often the same vector, but they could be different).
> >
> > --
> > main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> > ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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