Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 612 times)
0 Members and 1 Guest are viewing this topic.
Offline gouessej
« Posted 2013-11-11 23:03:01 »

Hi

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:
https://github.com/gouessej/Ardor3D/commit/9c9cc3506f3e52f5fc9d74d0d5c1dab9755a1b68

I have tested it on this model:
http://svn.code.sf.net/p/tuer/code/pre_beta/abin/agent.abin
by running the main method of this class:
http://svn.code.sf.net/p/tuer/code/pre_beta/engine/conversion/ArdorToObjConverter.java

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.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2013-11-12 07: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

Senior Member


Medals: 7
Exp: 4 years


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


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

If it helps:
http://www.misfitcode.com/misfitmodel3d/

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2013-11-13 13:26:31 »

Hi

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

Offline gouessej
« Reply #4 - Posted 2013-11-13 22: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.

Offline gouessej
« Reply #5 - Posted 2013-11-15 20:12:57 »

Hi

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.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (33 views)
2014-07-18 06:55:21

Zero Volt (29 views)
2014-07-17 23:47:54

danieldean (24 views)
2014-07-17 23:41:23

MustardPeter (26 views)
2014-07-16 23:30:00

Cero (41 views)
2014-07-16 00:42:17

Riven (43 views)
2014-07-14 18:02:53

OpenGLShaders (31 views)
2014-07-14 16:23:47

Riven (30 views)
2014-07-14 11:51:35

quew8 (29 views)
2014-07-13 13:57:52

SHC (65 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!