MD5 reader fixed

first of in that test snaga did he uploaded the file in  md5mesh and md5anim which as far as I can see loads fine therefore it may well be the exporter or the process by which it is exported or the file have "impurities"

http://www.jmonkeyengine.com/jmeforum/index.php?topic=3022.0



I sent  you that and the test class to compare



edit for silly mistake

mcbeth said:
I sent  you that and the test class to compare

edit for silly mistake


Thanks mcbeth.

I saw a lot of interest by the community about this Reader. I placed a counter on the site where I hosted the fixed Reader and it registered about 7 users a day (not visits, but unique users).

Also contributes from other coders are really usefull. I have seen that tracking all the sources and examples sent me by mcbeth, is going to be everyday more and more difficult for me.
So, I am going to think that the better solution to organize the sources and to wellcome possible contributions is to open a oss project on sorceforge.net or dev.java.net.

I will ask more informations to Chaosdeathfish for the licence, and I will decide about this thing.

ender that might not be a good idea at this time as kman tried this and got a bit of oposition that was the jme-contrib project I have no idea if it was even approved at this point simple replacing the marine test wth that one slightly edited to included the animation will suffice and as I said  a while back the libs are not necessary in your upload, the package will then be alot easier to handle

mcbeth said:
ender that might not be a good idea at this time as kman tried this and got a bit of oposition that was the jme-contrib project


Why should anyone out there forbid me to create any oss project based on jME? I am sorry but I do not understand.

I have no idea if it was even approved at this point


Do I need approval from jME staff to make a separate oss project based on jME? Is jME not anymore BSD licenced?
Basically MD5 Reader can be considered as a library based on jME. There is anything wrong in creating something based on jME?
I am sorry, but I really do not understand.

simple replacing the marine test wth that one slightly edited to included the animation will suffice


I will had some examples done by me, as soon as they will be ready. Meanwhile I will ask der_ton if I can place the fish.md5mesh and fish.md5anim. There should not be any problem, considering that der_ton wrote in the blender2md5-readme.txt that fish.blend is a free model.

and as I said  a while back the libs are not necessary in your upload, the package will then be alot easier to handle


Libraries are not a problem. I included them becouse they are a build of a jME CVS, I done in agust and that I used to code and test the fix. So, I am sure that the new MD5 Reader works with them. Moreover I included them as like as any good software realease that, when possible, includes its dependecies in the package, for quick start.

@Ender, this was about creating a project on java.net. The reason it failed is not so much opposition, but more the fact noone administrates the game section of java.net anymore. You're always free to start jme related projects, and there's many other places besides java.net where you can do this.

Ok I have been able to export the fish.blend example from der_ton and make the exported files to work with MD5 Reader. Also thanks to mcbeth that points me to a test done by snaga. The error I done was in wrong editing of the fish.md5mesh and also in renaming wrongly the texture targa file.

Taking the snaga worm test as an example I have been able to run fish.md5mesh… with some miracle :slight_smile:





Multiplication of fish :stuck_out_tongue:



Here is a close up of a fish and its bounding box.





And here (I moved back the camera) you can see a school of fish XD





Now I should investigate if the fish.blend file contain multiples instances of the same object but I am almost sure that it does not.

llama said:
@Ender, this was about creating a project on java.net. The reason it failed is not so much opposition, but more the fact noone administrates the game section of java.net anymore. You're always free to start jme related projects,


Thanks for the clarification, llama.

and there's many other places besides java.net where you can do this.


Yes, in fact, I also mentioned sorceforge.net (probably mcbeth did not notice it) , and I know there are many more like sorceforge.net al around the net.

So, if the problem is dev.java.net I simply will choose one other. Thanks for the advise.

:’(  XD



Of course the Multiplication of fish was not a miracle but simply a code that was added by patching mcbeth fixes. It was a little test code, inserted in the MD5Test2.java file, made to obtain multiple instance of marine with SharedNode. When I released the patch I had not the time to verify that code added was clean.



This have been resolved thanks to mcbeth that answer to my request of help and made me notice this little code.



Here is the image of the succesfull loaded single fish. I still have some problem with Texture scale, becouse I had to enlarge the fish, that was too little and difficult to approach with the camera, as exported from Blender.





Also there is still another little problem. While marine was correctly rotated the fish is rotated with his side on the XZ plane.

I remember Kat on doom3world saying that the model needed to be rotated in blender to match dooms coordinated system

Eh eh eh :smiley:



From Blender to MD5 there is a world coordinates orientation change and also from MD5 to jME there is one.

I think that I will modify der_ton's script with an option to export for jME or MD5 world coordinates. I do not like to manually edit object orientation in Blender to export files. Mainly becouse there are cases in wich things do not go the way you expected, expecially if there are animations and bones.

yup, wise move (do it through the script)


Ender said:

Ok I have been able to export the fish.blend example from der_ton and make the exported files to work with MD5 Reader. Also thanks to mcbeth that points me to a test done by snaga. The error I done was in wrong editing of the fish.md5mesh and also in renaming wrongly the texture targa file.
Taking the snaga worm test as an example I have been able to run fish.md5mesh... with some miracle :)


I have still problems with loading md5 files. I can't see the fish.md5mesh. The fish model is there (1030 Vertices) but not visible. The bounding box is unvisible too, also when I add a BoundingBox to my Trimesh.

@Ender I'm not sure where you get the targa file. Did you export the Texture form blender? Is it possible to get your fish.md5mesh and your Texture.tga? Where have you located this file? Relative to the position of the fish.md5mesh ?

pm me your email I'll forward a working test

JTroll said:
I have still problems with loading md5 files. I can't see the fish.md5mesh. The fish model is there (1030 Vertices) but not visible. The bounding box is unvisible too, also when I add a BoundingBox to my Trimesh.


In the fish.md5mesh file you need to edit the targa file path making it relative to MD5 Reader sources root directory.
For example, if your targa file is in the directory pathtomd5readersource/models/textures you should edit the targa filepath like this: models/textures/nameofthetargafile. Also you must omit the file name extension.

@Ender I'm not sure where you get the targa file. Did you export the Texture form blender?


Yes. The texture of the fish.blend example included with der_ton's exporter is packed in to the fish.blend file. You need to open a UV/Image Editor view port in Blender to see the texture of the fish and then press the Unpack button. Blender will ask you where to unpack the texture and with wich name.

Is it possible to get your fish.md5mesh and your Texture.tga? Where have you located this file? Relative to the position of the fish.md5mesh ?


I will release as soon as possible a package of the source with some working examples. Anyway I saved the texture file as models/fish/textures/fish.tga relative to sources root.

I hope these explanations can help you. Please, do not hesitate to post feedback or any other problems, and of course make me know if you will load the fish model succesfully :) .

I can see something!!! :smiley: I'm not blind any longer! First I saw the worm and now I see the fish. Thx mcbeth! Thx Ender! I've also made a mistake by attaching to root node. I don't know why, but I tried to attach a Trimesh instead of the ModelInstance. This happens if you try every crazy idea.



I have a blender head model which is fully animated with bones. The bones are used as IPO Drivers. So i can use the bones as sliders to adjust an facial expression on the fly in blender. I want to do the same thing inside JMonkey. I'm not familiar with the md5 Bone animation. I read MD5 Spec (MD5Mesh and MD5Anim files formats specifications (Doom 3's models)). I want to move  single bones in realtime, without keyframes.



can anybody tell me how to move single bones in a md5 model? Is it neceassary to make frames or animation? Where can I get mor information about this topic or whats the best way to get started? :roll:



Here is an link to someone who done similar stuff in blender, to show whats my intension:

http://orange.blender.org/wp-content/themes/orange/images/blog/facetest.avi

JTroll said:
I have a blender head model which is fully animated with bones. The bones are used as IPO Drivers. So i can use the bones as sliders to adjust an facial expression on the fly in blender. I want to do the same thing inside JMonkey. I'm not familiar with the md5 Bone animation. I read MD5 Spec (http://tfc.duke.free.fr/coding/md5-specs-en.html). I want to move  single bones in realtime, without keyframes.


In jME and MD5 Reader, to the same they do with face animation in the example avi from the Orange project, you need to code a program that moves bones in relation with sliders (basically some object in 3D space). It is not hard to do, but I know no shortcut to do it, and I think that there is no Utility in jME or MD5 Reader specifically created to do it. You need to code it by yourself.

Currently I am in the challenge to make some example to test all the features of MD5 Reader. Once I will have the finished example test, I will concentrate my efforts to fix other aspects of MD5 Reader, seeing if it is fully MD5 Specification compliant, eventually extend its functionalities and trying a port to support the new SkinNode class in jME.

Can anybody tell me how to access the bones? How is the right way? Get the TransformMatrix to the Bone and manipulate rotation and translation?  I tried something like that…  8)



private SkeletalModelInstance bodyInstance;

private Model model;







protected void simpleInitGame() {





bodyInstance = new SkeletalModelInstance( model );

Skeleton skeleton = bodyInstance.getModelSkeletal().getSkeleton();





int boneIndex = skeleton.findJoint("Bone001");

TransformMatrix[] matrices = bodyInstance.getJointTransforms();

matrices[boneIndex].setRotationQuaternion(…?








It doesn't work so its wrong, but whats the way  :?

AFAIK this loader does not support ragdoll animation sorry

mcbeth said:
AFAIK this loader does not support ragdoll animation sorry


Sorry but my English and also my knowledge of 3D Graphics terms is poor in this case.

What is ragdoll animation?

Do you mean that MD5 Reader does not permit to animate bones by code? This could be a feature to be implemented, if true.

thats what I think they call it :? back then I was checking out agentfx