Hey guys, I’ve got one character rig, a makehuman rig, animated in the game engine. Walk cycle, jump, axe swing, carry wood etc… for some reason at times it can take up to 40% of the profiler and is really slowing down the frame rate. There’s a lot of time invested in this rig and it’s animations and set up and I’m looking for some optimizations I can do without drastically altering my current set up, thanks.
What mesh do you use?
Makehuman meshes are usually very high-poly and have way to much bones.
You can use the low-polygon skins from make-human for a game.
Hand decimation is pretty easy, just select patches of the mesh, and then do F(to make a face) and as you get to sections that need different topology, delete face, split edges, and then draw in new faces, I did this to make a head the other day to make a low poly head.
the rig has 464 bones. -___- I assumed the bge would be able to handle a rig like this. It’s very dissapointing to find out the contrary after all of the work I put into it. darn.
I believe there’s a rig optimised for the game engine within make human so I guess I’ll experiment with that and then redo the animations. It’s going to be quite a bit of work but I suppose it’s necessary.
So your human rig has more than twice as many bones as an actual human? I don’t think any modern games use near that many bones. Maybe for Pixar type animation stuff but not games.
As a point of reference, that isn’t a bone count you’ll find in even the most advanced AAA games.
yeah would’ve been nice to know before hand It was my ignorance on the subject that caused the problem not the bge, thanks guys for your help. There are settings in make human to reduce poly count and there is a minimal rig optimised for the game engine so I’ll get to work.
just keep the bones that are the ik targets of the hands, feet etc
the animations may carry over, just join the animated bones to the new armature as ik targets.
the new rig doesn’t come with ik, I’m not good at setting it up either so I’ll just make new animations, it’s not a big deal really. The character’s body is only 1600 verts, in total however with clothes and hair he is 7,000 verts, is this too much?
I did some searching around and found that I should try and keep the number of tris on the character fairly low. I’m sitting at 9,000 tris right now. is there a way to decimate a character mesh without disturbing the uv map? I could move this question to a new thread as it would help people and would be in an easier to find location.
As far as I remember IK is pretty heavy.
Hand decimation is best, if the rig is symetrical, you can split it down the middle and delete half, hand decimate, mirror and join.
So, your going to need larger faces in areas that dont deform, and many faces placed so the areas that do deform do it gracefully.
oh wow, thanks, I was looking for ways to mirror and that sounds like a good idea, I’ll be hand decimating because I’ve got a decent mesh topology to work with. Thanks for your suggestions, you and monster, Agoose, you guys are more helpful than you know, especially for me these past few days.
Also if the mesh have a good topology you can use the edge loop tool for decrease the polygon number, select a row of edges using ALT+MOUSE RIGHT BUTTON, press X and select edge loop.
PD: This tool conserve the UVs.
There’s also the decimate modifier, which does its best to conserve UVs, though it might wreck your topology.
9k isn’t too bad for a character, especially if you will see it on screen a lot (e.g., main character with a third person camera). It could be lower, but I wouldn’t worry about it since you’ll probably run into other issues before poly count becomes an issue. As for bones, you’ll want around 30 or less per character (fewer if you have a lot of characters, e.g., zombie hordes).
Thanks for the edge loop tool suggestion Carlo, really good info. Solar, I’m using the decimate modifier’s ‘unsubdivide’ setting, it keeps the topology intact for the most part in comparison to the other modes. Moguri it is first/third person so I was thinking 9k tris is reasonable but I needed a second opinion, thanks for the affirmation. Very good info in this thread. You guys have helped me since the beginning, 6-7 years ago. I’ve found the info I needed by searching these forums and recently I’ve started posting questions to save time. Moguri while I have your attention, The work you and everyone else does on the bge helps the less technical guys like me who just want to make games without too much of a hastle in the bge. I’m so grateful to have people like you working to progress the engine and I hope the growth continues exponentially.
wow thanks again Carlo, the edge loop tool is powerful, that golden nugget of information is going to save me buckets of time.
That’s not quite right, Battlefield 3 characters for example even have about 14k tris (~9k not triangulated)!