Unscaled it’s not possible to describe how different is the size of those three. Sinbad is probably as big as the Ninja’s big toe. Anyway, since I can’t seem to find either a (Ogre) XML importer to open those in blender, that there isn’t a .blend file for them that I could find or, at worse a mention of it on wiki, I’ve got to ask here.
Reason is for perspective. I made a test heightmap that should give more or less the size that I want (at least I hope), but I need something to compare it from, and for that I need models I can get some sense of height from so I can either revise the scale of the heightmap or the models. And the models will be the frame of reference.
Jaime is already of proper scale normally, in my opinion. About the size of a short person but I don’t remember the exact size.
Here is the code I use to normalize Sinbad’s size in Monkey Trap: (I have similar code for pretty much all models)
[java]
// Normalize the ogre to be 1.8 meters tall
BoundingBox bounds = (BoundingBox)ogre.getWorldBound();
ogre.setLocalScale( 1.8f / (bounds.getYExtent() * 2) );
bounds = (BoundingBox)ogre.getWorldBound();
ogre.setLocalTranslation(0, bounds.getYExtent() - bounds.getCenter().y, 0);
[/java]
The last line is to put his feet on the ground instead of his waist.
…then I pop that into a node which is what I actually move around.
Not exactly the direct “here’s a fish” answer but a “teach to fish” answer that will work for basically any model.
@madjack said:
Ah, I see you're taking the bounding box's height as a reference to derive. I should've thought of that.
Thanks.
No problem. Despite the simplicity of that code, it was not arrived upon lightly… so I thought I would share. Mostly it was the normalization of origin took a few tries.
@pspeed said:
No problem. Despite the simplicity of that code, it was not arrived upon lightly... so I thought I would share. Mostly it was the normalization of origin took a few tries.
Makes you wonder why would anyone put the origin of a model in the middle of it. 99.9% of the time this is at the bottom (up to about 5 pixels beneath it). But, oh well.
@madjack said:
Makes you wonder why would anyone put the origin of a model in the middle of it. 99.9% of the time this is at the bottom (up to about 5 pixels beneath it). But, oh well.
Well… and don’t get me started on walk cycles that don’t match any sort of character speed…
Back in the day, there were all kinds of tricks to move the root bone relative to the model origin so that the model origin could move at constant speed… I guess that lore is lost. The feet always end up sliding at some point now.
I was able to put my grubby hands on a blender version of Sinbad with which I could fix the ORIGIN where it should be, at the model’s FEET!
If someone wants it, I’ll let it live on my site for a while. @pspeed maybe you guys want to replace the other version with that one instead? I’ll be doing some animation tests soon, if there’s an issue with the mesh and animation I’ll you guys know.
LOL Don’t use this. XD I’ll fix it and repost. Use at your own risk. lol
I removed the link because that version of Shitbad is effed up. The animation looks broken and I don’t want to spend time on this. Sorry peeps.
I’m looking for these three models as .blend files.
It’s for the current game contest taking place just now.
Also I don’t know how to give characters physics (capsules, boxes, spheres, …).
There is this nice physics demo in the jme tests where you have a Sindbad ragdoll physic - does any of you know how to make this?
@Ogli said:
I'm looking for these three models as .blend files.
It's for the current game contest taking place just now.
Also I don’t know how to give characters physics (capsules, boxes, spheres, …).
There is this nice physics demo in the jme tests where you have a Sindbad ragdoll physic - does any of you know how to make this?
The source code for the tests is right there where you ran the test.
The test code itself looks simple, but I cannot find the point where the radius of the capsules is defined (only adds bones to some ragdoll and defines angle constraints for bone joints in the test code).
Also, in Blender you can configure Ogre Physics before exporting, but I don’t know enough to applicate this. Thought that someone might know more about that…