Skip to main content

Save from Java3d to .obj format

1 reply [Last post]
timothy99
Offline
Joined: 2010-12-27
Points: 0

Hi!
I'm writing a Java3D application that generates 3d objects.I'd like to be able to save them to .obj file format,can somebody help me how can I make it?Can somebody show me an example?I read this forum but can't find anything.I find an earyer thread http://www.java.net/node/662918, but the links doesn't works :(

Thanks a lot
Mark.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
millerni456
Offline
Joined: 2010-12-09
Points: 0

Hey! I wanted to a make a similar program that saves into the .obj format as well. And... I might be able to help. I did some research and found out that when you open the .obj file with
a text editor such as NotePad, the vertices of the geometry and some other information is printed. I then went online and found a whole page about the .obj file format on wikipedia:
http://en.wikipedia.org/wiki/Wavefront_.obj_file#Texture_maps
With this infomation... perhaps it is possible to use JavaIO to write a file in the .obj format.
Also... it is important that you keep track off all the data used in creating your object, you will need all the numbers when writing the file.
ArrayLists may help with this :)

Hope this helps.
-Nick