POV-Ray : Newsgroups : povray.general : 3D File foramt implimentations : Re: 3D File foramt implimentations Server Time
29 Jul 2024 10:29:18 EDT (-0400)
  Re: 3D File foramt implimentations  
From: Le Forgeron
Date: 5 Jun 2002 04:50:40
Message: <3CFDD0E9.20005@free.fr>
Thomas Lake wrote:

> I would like to expand my small Java utility mesh2udo to encompass other
> file formats. I've been looking at the specs for several different file
> formats:
> 
> http://www.tnt.uni-hannover.de/js/soft/compgraph/fileformats/
> http://astronomy.swin.edu.au/~pbourke/3dformats/
> 
>  There is a lot to absorbe there and I haven't read enough to implement any
> of them. However before I do I though it would be good to have an object
> oriented frame work to build on, Java being an OO language. I was thinking
> of making a superclass lets call it MeshFileFormat that would model all the
> properties common to all file formats. This is where all the vertex data
> about the mesh would be stored. Then I could extend this class for each file
> format I want to implement. This should also make it easier to convert from
> one file format to another because all the file format classes extend a
> common class. Can anyone who has OO experience let me know if this sounds
> like a good strategy, or can you think of a better way?
> 

It might be a sensible approach, but beware of simplifications made by each
formats. Some may only support triangles whereas someother may have polygons
(more than just 3 vertices per basic surface).

And worst of all, some of the format might be self-descripting about there contents.

Try first to ignore any possible texture/uv mapping, because it is really
a headache to convert (especially from polygon to only triangle), so all
you should need is:
  vertex
  segment
  normal
  triangle/polygon
  object

That's look pretty simple, but the complexity comes from the relation
between them in each format.

I wish you good luck.



-- 
Non Sine Numine
http://grimbert.cjb.net/
Puis, s'il advient d'un peu triompher, par hasard,






Post a reply to this message

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