|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
--
----------------------------------------------------------
Home Page: http://www.geocities.com/~thomaslake/
----------------------------------------------------------
Post a reply to this message
|
|
| |
| |
|
|
From: Le Forgeron
Subject: Re: 3D File foramt implimentations
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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.
>
Yes I am aware of this complexity from reading up on some of the formats.
Thanks for the list, I was thinking of something along those lines but the
problem is that I need to convert everything to mesh or mesh2 format since
Pov-Ray does not recognize polygonal faces in meshes only triangles. If I
can figure out a way to tessellate the polygons into triangles then I might
not have to worry about supporting polygons at the base level, only
triangles. The problem here is I have no idea how to properly tessellate
them, having very limited math skills, but I might be able to work something
out I'll see,
> I wish you good luck.
Thanks!:-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|