Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to scale skeleton parts? #12

Open
hwy1992129 opened this issue Jun 15, 2023 · 5 comments
Open

How to scale skeleton parts? #12

hwy1992129 opened this issue Jun 15, 2023 · 5 comments

Comments

@hwy1992129
Copy link

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...?

@MarilynKeller
Copy link
Owner

MarilynKeller commented Jun 19, 2023

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.

@hwy1992129
Copy link
Author

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....

@MarilynKeller
Copy link
Owner

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.

@hwy1992129
Copy link
Author

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...

@MarilynKeller
Copy link
Owner

MarilynKeller commented Jun 19, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants