Hello, I’m facing problem in exporting my model in ogrexml format in blender 2.61 for loading a character in jme3. While exporting it shows try “increasing the Trim-Weights threshold option” with few other lines of warning. I can load the model, can see it, but animation does not work. I guess it’s a common problem as my model was a “make human” model with the default human skeleton of blender 2.6. I found a post in ogre forum which was not very helpful for me.
http://www.ogre3d.org/forums/viewtopic.php?f=4&t=61485&start=100#p424018 – This is the link of the post i found in ogre forum.
Has anyone faced the same problem before? Kindly let me know if you have any solution. I guess I have to change the python addon file that we had to add while installing the ogrexml addon in blender. Not sure about it.
Thanks in advanced
Ryan Karim
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender
:?
do you have NLA and configuration like in documentation? maybe its a simple problem.
NLA:
video1
video2
about warnings it is becouse:
- some of vertices are not assigned to bones
OR
- one of vertices is assigned to too many bones(4?).
I have the same problem, it tells me when I export it that I have like 900 vertexes that are assigned to more than for bones, and then if i try to load the exported model, JME crashes and gives an index out of bounds exception which is due to it expecting there to be four or less bones for each vertex. Does anyone know if theres a script or something to fix the vertex groups and what bones they’re attached to?
Can you please post the exception you’re getting? It should not be happening.
Thanks for replying guys. I have fixed the problem. I’m sharing the process:
- Locate the “io_export_ogreDotScene.py” file in the addons folder of blender. As i have installed blender into my c-drive, location in my computer is : C:Program Files (x86)Blender FoundationBlender2.61scriptsaddonsio_export_ogreDotScene.py
- Open this file in any text editor, preferably in an ide with python support. I used notepad++.
- In line number 6481 change the following code
if check > 4:
badverts += 1
to
if check > 100:
badverts += 1
if line number 6481 is too hard to find, use cntrl+F and type " check > 4 " . change the 4 to a bigger number.
instead of 100, place any number depending on the number of bones you need per vertex. you will get this number when you will see the exception warning “Mini-Report” in blender. In my model, the error report was:
- Mesh has 67 vertices weighted to too many bones (Ogre limits a vertex to 4 bone)
as i needed 67, i placed the number 100 just to be in the safe side.
- Save the python file. and we are done. It’s not showing the warning anymore while exporting.
Regards,
Ryan.K.
Did that model end up working in jMonkey? I think a lot of game engine’s want you to have only 4 bones max for a vertex anyway. I also fixed my problem this way.
- Erase all the vertex groups that you currently have.
- One by one select the vertices you want for each bone and make a new vertex group with the same name as the bone.
This way no vertex is assigned to more than one or two bones.
Luke