Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2010, 02:14:30 pm
advanced search




Pages: [1] 2
  Print  
Author Topic: Help loading an md5 model  (Read 6079 times)
styggentorsken
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: April 05, 2007, 04:31:25 pm »

I have just made a bike in blender, wich I want to use in jME using md5reader

I use the following lib and example code, changing only the md5-filenames
md5reader.cvs.sourceforge.net

(ps I followed this tutorial)
http://www.jmonkeyengine.com/wiki/doku.php?id=exporting_animated_.md5_models_from_blender

And I use the following exporter for blender:
http://home.tiscali.de/der_ton/blender2md5.rar

The model now loads fine into blender again (after export and import)
Even with the animation

The model also loads into jME, but the animation looks broken.
It seems to move like it's supposed to, but it also shakes a lot.

I noticed even the example md5's shake a little bit

Why?


these are my files
http://fredrik1.com/blender/bike.blend
http://fredrik1.com/blender/bike.md5mesh
http://fredrik1.com/blender/bike.md5anim
Logged
nymon
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1250



View Profile
« Reply #1 on: April 05, 2007, 05:29:03 pm »

This is something that has recently come up (been noticed?). I think there is a thorough discussion going on about it here:
http://www.jmonkeyengine.com/jmeforum/index.php?topic=4702.msg37775#msg37775

I used der tons code not to long ago, about october last year, and didn't have any problems with jitter. I do beleive I was using a jME nighlty build, not cvs.
« Last Edit: April 05, 2007, 05:33:13 pm by nymon » Logged

Scene Monitor might help!
mcbeth
Moderator
Sr. Member
*
Offline Offline

Posts: 826


um.......err........nevermind


View Profile
« Reply #2 on: April 05, 2007, 05:47:14 pm »

I checked the loader with a nightly build, dont get "wild' shakes but the textures on the marine did seem to flicker a bit might be the shaking issue just subtle. will take crack at it over the long weekend.....4 days..whole da.........um... any how rolleyes will have a good look, see if I can come up with something, in the meantime use kman's it shiould keep u going for the time being.
« Last Edit: April 05, 2007, 08:18:58 pm by mcbeth » Logged
styggentorsken
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #3 on: April 05, 2007, 06:06:19 pm »

Thanks for quick answers

I didn't follow and read those discussions in detail,
but I found a solution for my model.

I took a close look on the marine (shipped with the md5reader) ( opened in blender ),
and noticed that it had one bone placed at the origin.
All the other bones were children of the "origin" bone.

So I added an "origin" bone to my bike, and the shaking stopped.

Wohoo smiley
Logged
nymon
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1250



View Profile
« Reply #4 on: April 05, 2007, 06:46:39 pm »

hmm... Thats an interesting tidbit of info. Maybe thats why I havn't experienced this shaking stuff, I've only really used on model which I built and it has this so called "origin" bone.
Logged

Scene Monitor might help!
mcbeth
Moderator
Sr. Member
*
Offline Offline

Posts: 826


um.......err........nevermind


View Profile
« Reply #5 on: April 05, 2007, 08:06:34 pm »

oh right that's why...... it seems that the loader depends a bit on the origin bone like doom, I beliave its used ( by doom3) to translate and determine a models position on the floor.



edit clarification
« Last Edit: April 05, 2007, 08:14:54 pm by mcbeth » Logged
mud2005
Full Member
***
Offline Offline

Posts: 360



View Profile WWW
« Reply #6 on: April 06, 2007, 05:57:01 am »

Quote
the textures on the marine did seem to flicker a bit

I also notice this, when the bounding box is showing the flickering stops though.  huh not sure why
Logged

Clarence Oveur: Roger, Roger, what's our vector, victor?
Fungi
Jr. Member
**
Offline Offline

Posts: 87


View Profile
« Reply #7 on: April 06, 2007, 06:49:52 am »

i changed fish.md5mesh to

joints {
   "origin"   -1 ( 0 0 0 ) ( -0.5 -0.5 -0.5 )
   "Bone1"   0 ( 0.046053 0.001212 0.000000 ) ( -0.000000 -0.000000 -0.698215 )      //
   "Bone2"   1 ( -0.065689 0.004006 0.000000 ) ( -0.000000 -0.000000 -0.700276 )      // Bone1
   "Bone3"   2 ( -0.210955 0.006799 0.000000 ) ( -0.000000 -0.000000 -0.707108 )      // Bone2
   "Bone4"   3 ( -0.353426 0.006799 0.000000 ) ( -0.000000 -0.000000 -0.687760 )      // Bone3
}

still shutters, is that not enough correct? is the origin bone not to problem?

Edit:

I just tried the showing bound and wireframe and normals and all of those but none of them fixed the shaking.
I'm running the MD5Test2
« Last Edit: April 06, 2007, 06:57:09 am by Fungi » Logged
mud2005
Full Member
***
Offline Offline

Posts: 360



View Profile WWW
« Reply #8 on: April 06, 2007, 07:40:47 am »

Quote
I just tried the showing bound and wireframe and normals and all of those but none of them fixed the shaking.
actually I was referring to the flickering not the shaking
Logged

Clarence Oveur: Roger, Roger, what's our vector, victor?
mud2005
Full Member
***
Offline Offline

Posts: 360



View Profile WWW
« Reply #9 on: April 06, 2007, 11:48:50 pm »

also ive found if you remove line
Code:
bodyInstance.setLocalScale( 5.00f );
from the test class the flickering stops.
Logged

Clarence Oveur: Roger, Roger, what's our vector, victor?
styggentorsken
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #10 on: April 07, 2007, 01:03:29 am »

The origin bone fixes the shaking by me. (just tried for the fish.blend)

But editing the mesh-file without making a new md5anim
doesn't help. Make a new md5anim too.

is there any good alternatives to setLocalScale?
Scaling within blender?
Logged
Fungi
Jr. Member
**
Offline Offline

Posts: 87


View Profile
« Reply #11 on: April 07, 2007, 01:12:59 am »

texture flickering
   fixed by displaying bounds or normals
   removing setLocalScale from test file
model shaking
  origin bone

I tried these fixes for myself but I don't like it. These fixes seem bad, like the code is unstable, like I have to baby MD5. argh undecided
Logged
mud2005
Full Member
***
Offline Offline

Posts: 360



View Profile WWW
« Reply #12 on: April 07, 2007, 03:13:12 am »

ok, after some testing I got the shaking model to stand still. It seems the origin bone needs to be at the same location as the model. In blender I selected model then snapped cursor to selection then selected bone and snapped selection to cursor. now I need to figure out why my tga images only appear black in jme  undecided

edit: figured out the black texture, I had to save as targa raw instead of targa in blender. tutorial has been updated   wink
« Last Edit: April 07, 2007, 05:28:00 am by mud2005 » Logged

Clarence Oveur: Roger, Roger, what's our vector, victor?
Fungi
Jr. Member
**
Offline Offline

Posts: 87


View Profile
« Reply #13 on: April 10, 2007, 11:57:07 pm »

can you post your new bike blender file after the origin bone add?
Logged
Ender
Sr. Member
****
Offline Offline

Posts: 525


No artist has ethical sympathies.


View Profile WWW
« Reply #14 on: April 11, 2007, 02:13:49 am »

I want to temporally join in this thread all my considerations about MD5 Reader 2 bug tracking. I come from the Md5 twitching? thread.

About all the problems you experienced, I have to say that I have tested MD5 Reader 2 yesterday with success. But I used an old CVS snapshot. Consider that in the MD5 Reader 2 CVS tree there are all dependencies. Please, try to run the original marine with them and tell me if it works.

If my guess (that, in this last 5 month, something have been changed in jME source, influencing MD5 Reader 2 behavior) were confirmed, I would decide to wait untill the next official release of  Java Monkey Engine to release a stable version of MD5 Reader 2.

Meanwhile, please try to track bugs, requests and other things using the MD5 Reader 2 project tracking page. It seems that there is no need to be registered users.

We also need help! I saw many people interested about this loader. I read in this thread that Fungi, for example, try some fix. Why don't you join us? Also mud2005 could be one of us and of course anyone else interested. Also modelers and animators for testing models are required.

For informations, please PM me.

Thanks.

Marco Frisan, Trieste, Italy
Logged

Tags:
Pages: [1] 2
  Print  
 
Jump to: