SpiderPig Posted December 28, 2022 Share Posted December 28, 2022 I wonder if anyone here has any clues as to how most games achieve a character editor? As a test I scale the bone but this isn't the result that's needed. I'm thinking a float or two should be attached to each bone and the vertex shader can handle the scaling of the associated vertices around said bone. I wonder if this can be achieved in Ultra yet... auto model = character_viewer->GetCharacter(); auto value = 0.5f * (float)slider_head_height->GetValue(); auto head_bone = model->skeleton->FindBone("Head"); head_bone->SetScale(0.5f + value); 2 Quote Link to comment Share on other sites More sharing options...
Alienhead Posted December 29, 2022 Share Posted December 29, 2022 Nice start ! 1 Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
SpiderPig Posted December 29, 2022 Author Share Posted December 29, 2022 Thanks In GUI alone Ultra is so much faster and more flexible than Leadwerks. In Leadwerks rendering a character like this with a 2nd camera dropped the FPS from 200 to about 50 If I remember correctly. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted December 29, 2022 Author Share Posted December 29, 2022 And now I can manipulate the vertices around a single bone with the shaders. Here only the toe bone is raised by 1.0f. It's just a matter of finding a way to identify the bone I want to edit and deciding on the right way to edit them. It will probably be something like expanding the vertices away from the bone's axis within a certain range and reducing that range to 0 as it nears either end of the bone. Tomorrow I'll see what I can do. 3 Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted December 29, 2022 Author Share Posted December 29, 2022 3 Hours later and I can edit the vertices around the head bone. Now I just need to work out how to change the shape smoothly and more naturally. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted December 30, 2022 Author Share Posted December 30, 2022 Still needs refining but the general inner workings are there. 1 1 Quote Link to comment Share on other sites More sharing options...
Vida Marcell Posted December 31, 2022 Share Posted December 31, 2022 Use shape keys, and i also think you can scale body parts by bones. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.