POV-Ray : Newsgroups : povray.general : Mesh question : Re: Mesh question Server Time
2 Nov 2024 13:17:12 EDT (-0400)
  Re: Mesh question  
From: Florian Brucker
Date: 5 Mar 2004 11:23:47
Message: <4048a993@news.povray.org>
>>I've downloaded an object file that consists as a list of vertices with 
>>color in this format :
>>x y z r g b

>   If you append a comma to every value, you can read them from POV-Ray

You may want to use a text editor to replace spaces with commas :) And 
if you've got a good text editor, replace newlines with commas, too (not 
all so-called text-editors can replace newlines, though).

Creating the mesh could be done in several ways. Best way would propably 
be to try to convert the data to mesh2-format which is only slightly 
different from the one you've got (just add some brackets and some 
keywords and get rid off the colour information).
You could do this in a text editor or via pov-script (first one is 
simpler, latter one lets you redo the job for several files once you've 
got it running).
The only problem I see is with the unique colour for each triangle: IMHO 
POV only supports 1) one texture for the whole mesh or 2) one 
_predefined_ texture for each triangle (MESH2). Therefore you could 
predefine all occuring textures (could be automated and could be quite 
an overhead depending on the number of different textures) or you can 
use a union of triangles where you can apply your texture on the fly but 
you'll lose the advantages of meshes that way. It really depends on what 
you want to do with the stuff.

HTH,
Florian


Post a reply to this message

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