NewkieBroon Posted April 27, 2012 Share Posted April 27, 2012 I am trying to implement a system that creates a character from multiple body parts. If I have 4 separate body parts (.gmf files) with identical bone structure can I simply attach these parts to a pivot in code and apply the LoadAnimation command on each part? Would this method be inefficient as 4 identical bone structures are loaded? Is there an elegant way to merge all the bone structures as one? Cheers Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted April 27, 2012 Share Posted April 27, 2012 It would work. However, as you say it wouldn't be ideal as you'll have a bunch of bones that don't do anything. I had a lot of trouble with this myself and unfortunately I never came up with a solution that was as ideal as I would have liked it to be. Apparently the best way to do this kind of thing is to actually weld vertices using code and apply bone weights using code as well to the added parts. However, I'm pretty sure you can't do that with LE itself. Perhaps there is a way to do it through OpenGL. However, I wouldn't know where to start there. Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
tournamentdan Posted April 27, 2012 Share Posted April 27, 2012 Apparently the best way to do this kind of thing is to actually weld vertices using code and apply bone weights using code as well to the added parts. However, I'm pretty sure you can't do that with LE itself. I think your right. Although it should be fine to add weapons and none animated thing to your characters using bones. You should not have to apply bone weights by code. If you use the same skeleton for every character then you can just weight each mesh for the one bone hierarchy. And I do not necessarily think you have to weld the vertices using code. Every body part that you want to interchange would have to have vertext groups. If you name each vertex group the same for each body part they should occupy the same x,y,z. Say if you want to be able to change the heads on the body. When you model each head, where ever you want them to connect you would make sure to have the same amount of vertice. Probably somewhere in the neck. So name the bottom loop(vertexgroup) of the neck the same as the top loop (vertex group) of the body. Or if you wanted to combine the vertex groups by code then you could make a game where you could chop off arms,legs,heads,torso pretty easy. Quote Link to comment Share on other sites More sharing options...
NewkieBroon Posted April 28, 2012 Author Share Posted April 28, 2012 Thanks for the advice guys. 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.