POV-Ray : Newsgroups : povray.general : How do you convert POV-Ray CSG shapes into other 3D formats? : Re: How do you convert POV-Ray CSG shapes into other 3D formats? Server Time
30 Jul 2024 02:24:50 EDT (-0400)
  Re: How do you convert POV-Ray CSG shapes into other 3D formats?  
From: Urs Holzer
Date: 4 Feb 2010 07:30:38
Message: <4b6abdee$1@news.povray.org>
Hi

> Is there a way to convert POV-Ray's internal representation of a 3D
> shape (i.e. one constructed using CSG) into another 3D format -
> perhaps mesh or mesh2?

There are some C++ libraries that can do CSG using meshes:
GTS: http://gts.sourceforge.net/
OpenCSG: http://www.opencsg.org/
As far as I know, the second one cheats using some OpenGL features, 
whereas the first one really generates a mesh. Unfortunately, they are 
C++ libraries only, so you have to write your own application for your 
task. Together with an implementation of the marching triangles 
algorithm (as mentioned by Warp), you could do nearly everything:

First convert all primitives to isosurfaces. (Is that possible?) Then 
convert them to meshes. Finally do the CSG using the GTS.

It is really time that someone implements a Povray to Mesh converter 
which works for most scenes. Unfortunately, I do not have the time to 
start such a project.

Greetings
Urs


Post a reply to this message

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