OSSO icon indicating copy to clipboard operation
OSSO copied to clipboard

How to scale skeleton parts?

Open hwy1992129 opened this issue 1 year ago • 5 comments

I go through the code in gloss_skeleton. It looks like the variable zs controls the shape of the skeleton, but how to scale it in x,y,or z direction...?

hwy1992129 avatar Jun 15 '23 14:06 hwy1992129

The skeleton model released with OSSO does not suport the bones rescaling. To change the shape of the bones, you can refer to the demo of the full skeleton model on Silvia Zuffi GitHub : https://github.com/silviazuffi/gloss_skeleton. The demo 'python show_skeleton.py' shows the bone shape spaces.

MarilynKeller avatar Jun 19 '23 17:06 MarilynKeller

I check the code in gloss_skeleton, but I don't understand how they do the scaling... I only find the variable zs could change the shape, but zs can have more than 3XN dimensions, like 4XN, 5XN, which doesn't looks like x,y,z....

hwy1992129 avatar Jun 19 '23 17:06 hwy1992129

You are on the right track. zs is not a simple scaling, but a per bone synthetic shape space of dimension N (N=7 if I remember correctly). The shape space of each bone is illustrated here. So by setting values of zs you can change the shape of the bones. The code then computes the necessary offsets between bones to avoid overlap.

MarilynKeller avatar Jun 19 '23 18:06 MarilynKeller

The image does show the part scale on x,y,or z, but I haven't figured out how to do it... I ask a question in gloss_skeleton and get no response...

hwy1992129 avatar Jun 19 '23 19:06 hwy1992129

The shape space used in the GLOSS model is described in the SMAL Paper page 4 "Shape deformation space". I think you can scale the bone i by x, y or z by changing respectively zs[i*7+0], zs[i*7+1] and zs[i*7+2]. I can not test at the moment unfortunately.

MarilynKeller avatar Jun 19 '23 22:06 MarilynKeller