Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (868)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [SOLVED] Conversion of Ardor3D binary files into WaveFront OBJ files not working  (Read 3160 times)
0 Members and 1 Guest are viewing this topic.
Offline gouessej
« Posted 2013-11-11 22:03:01 »


I use some MD2 models in my game. I would like to edit them. However, Blender has no longer any build-in Python script to import MD2 files since its version 2.50, my Python script works a bit with Blender 2.63 but not with later versions and I'm fed up with maintaining it, it gets broken each time a new version of Blender is released.

I ported the MD2 importer of JMonkeyEngine 2 to Ardor3D, Renanse improved its performance, it works very well but now I need to convert those animations in WaveFront OBJ file(s) to import them in Blender which still supports this format. I have written this exporter today:

I have tested it on this model:
by running the main method of this class:

The geometry seems correct except the texture coordinates. I don't understand what is wrong. It contains both triangle fans and triangle strips, I convert them into triangles so that it works with this format (WaveFront OBJ). As I can't import the original MD2 file with Blender, I can't really compare. I have checked that the order of the vertices is correct, I have noticed that there were 33% of useless texture coordinates equal to (0,0) at the end of each texture coordinates buffer, I haven't kept them. I have tried to remove the normals too. Have I forgotten something obvious? Best regards.

Julien Gouesse | Personal blog | Website | Jogamp
Offline Riven

« JGO Overlord »

Medals: 1371
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #1 - Posted 2013-11-12 06:39:04 »

Start with a cube, and see how your UVs are altered. It's most likely flipped on one axis.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline orange451

JGO Kernel

Medals: 564
Projects: 8
Exp: 8 years

Your face? Your ass? What's the difference?

« Reply #2 - Posted 2013-11-12 17:03:46 »

If it helps:

First Recon. A java made online first person shooter!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2013-11-13 12:26:31 »


Start with a cube, and see how your UVs are altered. It's most likely flipped on one axis.
Good idea. I'm going to test it with more simple objects.

Thank you, it's helpful, it supports MD2 and it works under GNU Linux  Grin

Julien Gouesse | Personal blog | Website | Jogamp
Offline gouessej
« Reply #4 - Posted 2013-11-13 21:24:57 »

The exporter works like a charm on models only composed of triangles (for example rocketlauncher.abin), the bug is reproducible on triangle strips and triangle fans.

Julien Gouesse | Personal blog | Website | Jogamp
Offline gouessej
« Reply #5 - Posted 2013-11-15 19:12:57 »


see how your UVs are altered. It's most likely flipped on one axis.
This was one of the 2 bugs. Now it works very well, it is just under-optimized. Thank you very much.

Julien Gouesse | Personal blog | Website | Jogamp
Pages: [1]
  ignore  |  Print  

Riven (579 views)
2019-09-04 15:33:17

hadezbladez (5501 views)
2018-11-16 13:46:03

hadezbladez (2398 views)
2018-11-16 13:41:33

hadezbladez (5761 views)
2018-11-16 13:35:35

hadezbladez (1220 views)
2018-11-16 13:32:03

EgonOlsen (4660 views)
2018-06-10 19:43:48

EgonOlsen (5681 views)
2018-06-10 19:43:44

EgonOlsen (3196 views)
2018-06-10 19:43:20

DesertCoockie (4094 views)
2018-05-13 18:23:11

nelsongames (5113 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!