Bone Rotation with Weights

Posted By: EpsiloN

Bone Rotation with Weights - 07/08/15 21:24

Hi all,
I dont know if this belongs here or in another section, but since I'm going to use script to rotate the skeleton, I'm posting my question here...

If I import a model (probably .FBX format) that has a skeleton (3D Max) and is rigged with vertex weights, when I rotate a single bone in the engine, will it move the vertices according to their weights?

The problem is, that the model's anatomy is rigged, so the muscles respond to movement the same way a real body responds...I need to preserve that 'inflation' when a muscle is tense, but I dont have a model to test...

The original files are for 3DS Max 10. The model will have no animation (it'll be animated through script probably).

Anyone played around with this kind of stuff??

Thanks.
Posted By: Ch40zzC0d3r

Re: Bone Rotation with Weights - 07/08/15 23:29

hm the engine only supports maximal 4 bone weights so I guess that wont work as you want
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 06:09

Well, I dont know if I've understood it right, but...

Max 4 bone weights means one vertice can have 4 bones moving it around, right?

If thats the case, it could work. I dont think it'll need more than 4.
But I have no idea how the model has been made. It costs a LOT of money, so I cant test it before I buy it...
Posted By: Superku

Re: Bone Rotation with Weights - 07/09/15 08:02

Originally Posted By: EpsiloN
when I rotate a single bone in the engine, will it move the vertices according to their weights?

Sure, that's what bones are there for.
I use them in combination with regular bones animation and bone rotate and move via code in my game, too. Recently I've discovered bone animation via shader for me which speeds things up a lot and opens up many possibilities for me (because the shader animation works for code-animated models and bones, too).


EDIT: Just create a test model by yourself before you spend money on stuff that may or may not work at all.
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 09:31

Originally Posted By: Superku
Sure, that's what bones are there for.
I use them in combination with regular bones animation and bone rotate and move via code in my game, too.

I have used this before, but in A6 there were no weights...And you couldnt really make the muscles move the way a real muscle moves.

Originally Posted By: Superku
EDIT: Just create a test model by yourself before you spend money on stuff that may or may not work at all.

I cant laugh Otherwise I would have created the final model myself. Cant rig it properly (I can do just regular rigs...) with weights.

I did find a model with a rig for testing, its a free model, but when I export it and import it in MED (as .fbx) the bones are huge. (There are no bones in 3DS but biped objects, which are converted to bones...maybe thats the reason?)

I'll probably have to start another thread in the editors section to fix this issue...
Posted By: Ch40zzC0d3r

Re: Bone Rotation with Weights - 07/09/15 09:35

Originally Posted By: EpsiloN
Well, I dont know if I've understood it right, but...

Max 4 bone weights means one vertice can have 4 bones moving it around, right?

If thats the case, it could work. I dont think it'll need more than 4.
But I have no idea how the model has been made. It costs a LOT of money, so I cant test it before I buy it...


Well, Ive been converting models from gamebanana and there are some really professionial modelers and the mdodels had more weights.
But I dont need weights anyways so it was fine grin
You could PM them before and ask before you buy such an expensive model
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 12:20

Anyone has any model I can test?

I keep finding fbx files that break after importing. The bones become huge or not all verts are assigned as they should...

I dont need a beautiful model or animations, just a rigged model with weights...
Posted By: Superku

Re: Bone Rotation with Weights - 07/09/15 12:24

"Bones become huge"
What do you mean, does the bone skeleton not fit to the rest of the model, like the head bone ends some 100 quants above the head? Or do you only mean the visual representation of the bones? If you mean the latter just change them in MED's misc settings or whatever they are called, or scale the model with global scale (which scales the bones accordingly, too) because it's probably too small then.
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 12:50

I cant tell if their origins fit the model, but they're like a huge circles around my model. I tried scaling one, but it also moves away. Didnt try scaling all of them at once, just thought of it...

*** EDIT ***

I tried selecting more than one bone, but it doesnt allow, so I cant scale all bones together.
I scaled only one bone, in just one direction, but it moves down and at some point becomes like a triangle...dunno what's happening there.

Here's a link to the exported .FBX file from .max (note, bones are Biped Objects and converted to bones on export to fbx).
HumanCasualRigged.fbx
Posted By: Superku

Re: Bone Rotation with Weights - 07/09/15 13:03

Like I said, it's just the visible representation then, it doesn't mean anything. Change the bone size (which has nothing to do with the model itself) in your MED preferences. Or use the option global scale to scale the model, not the scaling tools.
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 13:14

I tried scaling the model, and it looks 5% better laugh but still wrong bones. I tried the bone size, but it gives me 1 as lowest value, and it still is too big. I cant set bone length in bone properties (grayed out). I dont see anything I can do, except try a different model? But I've already tried at least 10 models and its always ALMOST the same result. (One was looking great, but wrong verts assigned and some unassigned to any bone...)

EDIT: See my prev post for links.
Posted By: Superku

Re: Bone Rotation with Weights - 07/09/15 13:18

Your whole model is smaller than 0.5 or 1 quants (judging from the screenshot)...
Just scale it, like I said two times before, by a factor of let's say 64 and everything will be fine.

MED -> Object -> Scale Global -> Scale factor: 64
Posted By: EpsiloN

Re: Bone Rotation with Weights - 07/09/15 13:27

LOL, you're right grin Thanks.
In the import screen, the BBox was around 1 cubic quant in size...I just entered scale factor 100...

Now, lets do some testing! laugh

Thanks again.
Posted By: Superku

Re: Bone Rotation with Weights - 07/09/15 13:30

Great! (Forgot about scaling factors on import, too.)
© 2024 lite-C Forums