Fabien Sanglard
Java OBJ loader, LWJGL rendition.
From 2D to 3D, or how to make it 10 times harder.The actual stuff
![]() | Try it ! |
![]() | Download Eclipse project (6.2Mb). |
![]() | Drop me a line. |
History
For the next game in C++, I wrote an OBJ Loader. I decided to port it to JAVA and used my favorite Java OpenGL binding for rendition: LWJGL.
Support
This Java OBJ Loader support:
- Groups
- Vertex, Normal, Texture coordinate
- MTL (material) references.
- Texture Loading (including Alpha for PNG)
- LWJGL Rendition with DisplayList
This Java OBJ Loader DOES NOT support:
- Relative vertex references.
- Anything other than GL_TRIANGLE and GL_QUAD polygons
How-To
I extracted the Ikaruga Models to test this loader. If anybody wonder how to do it, this is what you need:
- An Ikaruga CD (DreamCast prefered)
- A PVR viewer (PVR is the texture format in the dreamcast) ( Use Pvr2png for batch conversion and PVRViewer for special files). A bit or reading about the Sega PVT GBIX format: here
- A PVM decompressor (PVR files are stored inside PVM archives). pvmupk will do the job.
- A NJ (Sega/DreamCast format object model format, AKA Ninja) reader. I used Exmldnet, but their version is bugged (texture names are truncated among other things). As they were kind enough to publish the source code, I fixed it. Fix was sent but there is no update, so in the meantime you can download the latest version from here.
- A lot of enthousiasm ;) !
Screenshots
In case you wonder, the kanji on the right in each screenshot mean "Never give up"...

