POV-Ray : Newsgroups : povray.unofficial.patches : csg error with megapov's solid mesh? Server Time
2 Sep 2024 04:18:40 EDT (-0400)
  csg error with megapov's solid mesh? (Message 26 to 35 of 35)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: ryan constantine
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 13:49:17
Message: <39AD491D.A12D94A3@yahoo.com>
what are the benefits of smooth triangles?  do they have explicit
normals in the file?

Warp wrote:
> 
> ryan constantine <rco### [at] yahoocom> wrote:
> : what kind of meshes does this work on?  can it convert from regular to
> : mesh2?
> 
>   It reads a pov-file with meshes and writes and identical pov-file with
> the same meshes, except that all the triangles are smooth_triangles. Everything
> else is preserved.
> 
> --
> 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 13:51:42
Message: <39AD49B0.67B80009@yahoo.com>
thanks everybody.  i haven't started yet, but i think you have given me
enough information to do what i want.

ryan constantine wrote:
> 
> i posted a closeup of a section of the xwing scene i posted last month.
> it shows the torpedo tube area, but the pieces used to cut out of the
> mesh show up as semi-transparent objects (which are kind of hard to
> see).  i'm not sure what is going on.  the two tubes (one on each side)
> are each cut with a cylinder and a sphere.  the four items are in one
> csg union together under a difference with the mesh fuselage.  should i
> union each set seperately so one tube is cut at a time?  does it matter
> that the left tube doesn't touch the right tube but they are in the same
> union?  might adjusting the inside_vector help?  and if i animate the
> ship's movement, will i need to change the inside_vector to prevent such
> errors?
> 
> and on another note, is it possible to texture individual triangles in a
> solid mesh, or do i need to convert to mesh2?  if so how?  or can i use
> uv mapping?  how?
> 
>   TIA.


Post a reply to this message

From: Warp
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 18:51:43
Message: <39ad8fff@news.povray.org>
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? :)

  I think there should be a more "secure" way of doing it.

  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.
  It's not usual, but very possible that a triangle has more than three
adjacent triangles, but I think that in that case we are in trouble.

-- 
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: Warp
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 18:55:54
Message: <39ad90fa@news.povray.org>
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: Warp
Subject: Re: csg error with megapov's solid mesh?
Date: 30 Aug 2000 19:05:10
Message: <39ad9326@news.povray.org>
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.

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