POV-Ray : Newsgroups : povray.general : Mesh to solid Server Time
29 Jul 2024 14:23:38 EDT (-0400)
  Mesh to solid (Message 1 to 6 of 6)  
From: Tommy Grav
Subject: Mesh to solid
Date: 28 Oct 1998 07:43:56
Message: <36371188.69077EE9@astro.uio.no>
I have one short question :-)

Meshes in povray become hollow objects. Is there
any way to convert a mest to a solid object?

What I want is to have the mesh define the outer
limits of the object but still be able to cut
out of it to make more complexed shapes.


--
Tommy Grav
-------------------------------------------------------------
tom### [at] astrouiono     http://www.uio.no/~tommygr/
Institute of Astrophysics, UiO, No
IMTU tn++t4+tg+ ru+ge++ !3i jt+au+st+ls hi++dr-so++zh-sy-sw++


Post a reply to this message

From: Margus Ramst
Subject: Re: Mesh to solid
Date: 28 Oct 1998 14:03:48
Message: <363778DB.C29B1B02@peak.edu.ee>
Tommy Grav wrote:
> 
> I have one short question :-)
> 
> Meshes in povray become hollow objects. Is there
> any way to convert a mest to a solid object?
> 
> What I want is to have the mesh define the outer
> limits of the object but still be able to cut
> out of it to make more complexed shapes.
> 
> --
> Tommy Grav
> -------------------------------------------------------------
> tom### [at] astrouiono     http://www.uio.no/~tommygr/
> Institute of Astrophysics, UiO, No
> IMTU tn++t4+tg+ ru+ge++ !3i jt+au+st+ls hi++dr-so++zh-sy-sw++

I haven't done very much CSG with triangle meshes (well, not in POV anyway). But
this much I know: a triangle mesh does not have a well-defined inside and
outside. Therefore the results of CSG may be unpredictable. Sometimes it looks
right - mostly it doesn't.
As for converting to a solid object - a mesh of triangles will always remain
just that. I can think of no way that you coul convert it into a parametric
surface. Maybe you should try using bezier patches instead?

Margus


Post a reply to this message

From: Nathan Kopp
Subject: Re: Mesh to solid
Date: 28 Oct 1998 15:01:52
Message: <363777BF.8FBF57A6@Kopp.com>
Bezier patches are also infinitely thin.  It MIGHT be possible to create a
patched version of POV that treats triangle meshes as solid.  The main
problem that currently exists is that POV doesn't know if a point is inside
an object or not.  The simple (but not always effective) solution is to
shoot an arbitrary ray from the point and if it intersects an even number
of triangles, you are outside the object, and if it intersects an odd
number than you are inside.  Maybe I'll try it.  (here I go again talking
about stuff here that should be in the povray.programming newsgroup.)

-Nathan Kopp

Margus Ramst wrote:
> 
> As for converting to a solid object - a mesh of triangles will always remain
> just that. I can think of no way that you coul convert it into a parametric
> surface. Maybe you should try using bezier patches instead?
> 
> Margus


Post a reply to this message

From: Ron Parker
Subject: Re: Mesh to solid
Date: 28 Oct 1998 15:24:40
Message: <36377d88.0@news.povray.org>
On Wed, 28 Oct 1998 14:59:59 -0500, Nathan Kopp <Nat### [at] Koppcom> wrote:
>Bezier patches are also infinitely thin.  It MIGHT be possible to create a
>patched version of POV that treats triangle meshes as solid.  The main
>problem that currently exists is that POV doesn't know if a point is inside
>an object or not.  The simple (but not always effective) solution is to
>shoot an arbitrary ray from the point and if it intersects an even number
>of triangles, you are outside the object, and if it intersects an odd
>number than you are inside.  Maybe I'll try it.  (here I go again talking
>about stuff here that should be in the povray.programming newsgroup.)

Welcome to the club, Nathan.  I'm guilty of posting about programming stuff
here as well.  Something you'll want to keep in mind is that if you 
intersect at a vertex or edge, you'll have to either shoot a new ray or use 
some heuristics to determine whether the edge or vertex counts as an 
intersection or not.  That is, if you shoot a ray "tangent" to a vertex or 
edge, you don't want to count the intersection.  If you shoot it "through" 
a vertex or edge, you want to count it, but only once (more than one 
triangle could be hit at such a point, but you only want to count one.)

Followups set to povray.programming.


Post a reply to this message

From: Remco de Korte
Subject: Re: Mesh to solid
Date: 28 Oct 1998 17:43:35
Message: <36378A16.F74CDB32@xs4all.nl>
Tommy Grav wrote:
> 
> I have one short question :-)
> 
> Meshes in povray become hollow objects. Is there
> any way to convert a mest to a solid object?
> 
> What I want is to have the mesh define the outer
> limits of the object but still be able to cut
> out of it to make more complexed shapes.
> 
> --
> Tommy Grav

This is not a general solution for every mesh, in some case it may work,  but at
least not with smooth_triangles but what if you'd convert the mesh to a CSG
(union) using prisms? 
Just a thought...


Post a reply to this message

From: John VanSickle
Subject: Re: Mesh to solid
Date: 30 Oct 1998 19:05:19
Message: <363A2B25.DFC5FD46@erols.com>
Tommy Grav wrote:
> 
> I have one short question :-)
> 
> Meshes in povray become hollow objects. Is there
> any way to convert a mest to a solid object?
> 
> What I want is to have the mesh define the outer
> limits of the object but still be able to cut
> out of it to make more complexed shapes.

If the mesh describes a convex shape, you can do it with an intersection
of planes.

If the mesh describes a concave shape, divide it into convex shapes,
define the convexes as intersections of planes, and merge the results
together.

In either case, the final result should be manually bound, or else they
will be infinite objects, and cause rendering to slow to a crawl.

Regards,
John
-- 
"I see some really stupid children being born as a result of these
two meeting." -- Tom Servo


Post a reply to this message

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