md5reader2 updating bounds updates the translation but not rotation

i have an md5 model that is just a cube with a simple rotation animation, I have used an OrientedBoundindBox and the bounds do not rotate with the cube. If I set

animationController.setUpdatingBounds(true);

It works for updating the translation of the bounds, is there a way I can update the rotation?

Maybe it's something simple like a missing:



updateModelBounds() or updateGeometricState()

yes the md5importer is finished and is more close to jme than the older versions. it does support all the features that md5 format supports including skeletal animation and texturing. the post is in user code section and the source code can be checked out from google code. the link is in both the post and wiki page.



the md5importer should handle dynamic attach and detach automatically. the boundings r updated autometically.



but if u do run into any problems, send a message to me and ill get it fixed asap.

it does support all the features that md5 format supports including skeletal animation and texturing
actually I was referring to the fadeIn fadeOut methods of md5reader2 that allow you to "blend" from one animation to another, makes for much smoother animation switches.

edit: I tried MD5Importer and I noticed in the marine test, textures missing for eyes and teeth and two pink triangles floating in front of head.

first i wanna suggest u using the newer version, the md5importer i wrote. heres the wiki page for it. http://www.jmonkeyengine.com/wiki/doku.php?id=md5



second, is there any particular reason u wanna use oriented bounding instead of the usual bounding? if so, i can add this feature into it easily.

first i wanna suggest u using the newer version, the md5importer i wrote
I did not realize it was finished does it support animation blending like md5reader2?
second, is there any particular reason u wanna use oriented bounding instead of the usual bounding?
yes, I would like to make a md5 model that goes between animated and ragdoll, but I need the oriented bounds or when I detach the meshes from the model the bounds are way off.

yes u r correct. i cant find the textures for those meshes. the original md5reader just ignores the texture and put a default white/gray color on it. if u look into the md5mesh file for the head, there r like 5 meshes in there all refering to their textures but we only have 1 texture for the head model.



ill look into the fade in/out feature and add it in asap. thx

just found this post from 2004 http://www.jmonkeyengine.com/jmeforum/index.php?topic=622.0



looks like I may need to rotate the bounds manually, I tried

BoundingVolume bv = box.getWorldBound().transform(rotStore, vec, new Vector3f(1,1,1));

and couldnt get the bounds to budge. does someone have an example of how to rotate bounds?  :?

when  I first started looking at this stuff,  I added the bounding calls at the mesh level because at the node level they got left behind when the model moved. the reason why these calls are both in modelInstance and SkeletalModelInstance is because I simply forget to remove one of them, also they were previously OBBs I changed them to boundingboxes due to a bug in OBBs which I think is resolved now

Please, mud2005, try changing to OBB and tell us the result.



Meanwhile I will try to remove one of the 2 redundant calls, I will probably leave the one in ModelInstance.



[OT]I just want to make clear that neakor's MD5 Importer is not MD5 Reader. We welcomed neakors in our team with the hope to have some help integrating his work in MD5 Reader 2 Refactor (org.md5reader2 package). Anyway, currently, he is maintaining his code as a separate project. For some reasons I think that his code his good but I would like to merge it whit the more clear architecture of the new MD5 Reader 2 code. I hope he will help us soon or later, though, currently he did not change a single line of code of MD5 Reader 2. This just to give right credits to who actually gave some help to MD5 Reader 2 project in the past like kman, mcbeth and recently Duodecimo. neakor's importer is certainly a good code, though it is totally separate code from MD5 Reader 2.[/OT]

yes indeed as ender said, my code currently is completely seperate from the md5reader2. it is more close to jme but it has its constraints such as im not planning on supporting other engines or systems at all. on the other hand i believe ender wants to make md5reader2 an open API which can be used in a much more general case.



currently im only maintaining the md5importer project. and im waiting to start on the md5reader2 project. however i do not think i will modify the original md5reader project unless ender wants me to focus on that.



either way, ill be maintaining md5importer project as long as md5reader2 project is not ready to launch.

I have looked at neakor's stuff it's cool, but I would miss the animation blending capabilities of the old stuff as mud2005 pointed it is quite handy. not even the jme core animation system has that functionality…erm…  :? publicly available atleast :?.

mcbeth said:

I have looked at neakor's stuff it's cool, but I would miss the animation blending capabilities of the old stuff as mud2005 pointed it is quite handy. not even the jme core animation system has that functionality.......erm.......  :? publicly available atleast :?.


it should be easy to implement. its just a interpolation between the current frame and the first frame in the newly passed in animation. ill try to find time to implement it tonight. worst case ill check it in the svn tomorrow.

can u send me some testing model maybe? coz my artists r not ready to export the models yet.

send the models to neakor@gmail.com

give a few hours, I'm heading out for a jog, exercise time …um wait… the marine should be packed with three, I have three :? walk, run and stand. if u don't have em I'll send em now to save time check your mail





edit…sort of :stuck_out_tongue:



sent

subject: md5  marine anims

Please, mud2005, try changing to OBB and tell us the result
I tried OBB in md5reader2 and md5importer and it didnt work in either. The bounds just grow/shrink with animation.
mud2005 said:

Please, mud2005, try changing to OBB and tell us the result
I tried OBB in md5reader2 and md5importer and it didnt work in either. The bounds just grow/shrink with animation.



wait...u dont want them to change in size? but thats what they r suppoed to do though...

btw i got the model. thx alot~ill try to add in the feature tomorrow.

heres a screenshot just to clarify, the right cube the bounds dont rotate they expand.

ok , a little progress. when I set (in md5reader2)

 animationController.setUpdatingLocalTransform(true);

the rotation of the bounds get updated  :smiley: :smiley: but it only works with one box when I use 3 boxes the animation is way off and the bounds of only one of the boxes gets updated  :frowning:

I think it is caused by something related to what mcbeth explained. I do not know that part well, though I should read the *.md5mesh and *.md5anim to understand what you did and find a possible solution.

the reason y the size of the bounding is changing is because the legs r moving. however if u simply rotate the model using spatial transformer, the bounding stays the same.



i just added in the new oriented bounding featuer. u can set it to use oriented bounding by MD5Importer.setOrientedBounding(true);



and i just fixed some bugs, now theres a significant frame rate boost between my implementation and the original MD5reader.



on my machine, my implementation runs at 1400 to 1500 fps for the running animation compare to the original md5reader which runs at 1100 to 1200 fps



also i found out y my implementation loads 2 triangles in front of the eye. it is actually that the original md5reader isnt loading those 2 triangles which belong to 1 of the meshes in the sarge model. if u use debug mode to set the bounding visible, u'll c that the head model only has 2 boundings. but if there r 5 meshes, there should be 5 boundings. i removed the extra meshes in the md5mesh file, and my implementation loads exactly the same thing as the original md5reader.



the fading feature is coming soon  :smiley: