For a third person shooter project I've been thinking about, it would be really cool to have a mix of custom and predefined animation on the player model (eg the character would be aiming and looking at the mouse cursor, but his legs would still move with a run animation). Before I start this project, I need to know whether (and how) this is possible with Irrlicht's current features (and/or addons - for example Acki's custom bones).
There is also another feature I'd like to ask about. The character of this shooter would be some kind of humanoid robot, and the player would have the opportunity to upgrade his character with weapons, armor plating etc. There would have to be lots of combinations possible, too many to model them all. So my question is: what would be the best way to generate a model out of those upgrades (for example taking different sets of legs/arms/head/torso and combining them together)? Taking a seperate scene node for each part and then setting their parent to the central node would be too performance-costly, and animating a combined scene node like that would be really difficult.
Thanks.
Complex animation (motion blending?)
-
- Posts: 40
- Joined: Mon Oct 31, 2005 1:19 pm
- Location: Netherlands
Complex animation (motion blending?)
"The shortest distance between two points is always under construction."
- Noelie Alite
- Noelie Alite
-
- Posts: 395
- Joined: Fri Apr 08, 2005 8:46 pm
One approach might be to shove your complexity into your modelling program. Create a series of meshes that represent all possible combinations of upgrades and types. In blender, which I work in, I'd have a torso and the arms and limbs as separate meshs, that could be swapped out, but still have one armature, which contains the animations. All that changes are the vertices assoicated with a bone.
It doesn't make things easier, it just shoves the problem onto your asset creator and away from the programmer.
It doesn't make things easier, it just shoves the problem onto your asset creator and away from the programmer.
since you dont want to load your custom modelformat, i would do the following: place joints (bones) on your models, and them simply attach your model parts (torso, legs, arms, head, ...), the same for your robot upgrades. lets say you have different types of backpacks (one that can fly, another can place mines and so on), then simply place a joint on the back of your robot, call it something like "backpack_position" and place all backpack upgrades the player got on that joint.
for your body parts (torso leg and the like) its important that your dont connect these nodes (parent-child) because they need to move on their own (lets say your player shoots in direction a, then the torso rotates, the legs etc. shoulnt, so you need to update the position manually)
for your body parts (torso leg and the like) its important that your dont connect these nodes (parent-child) because they need to move on their own (lets say your player shoots in direction a, then the torso rotates, the legs etc. shoulnt, so you need to update the position manually)
-
- Posts: 40
- Joined: Mon Oct 31, 2005 1:19 pm
- Location: Netherlands
@dhenton: you mean that I should first make all the seperate parts, then swap them out and save every combination as a model file? Or did I misunderstand you?
#Guest: would that mean using several scene nodes for my model: would that be very bad for performance?
Thanks for replying.
#Guest: would that mean using several scene nodes for my model: would that be very bad for performance?
Thanks for replying.
"The shortest distance between two points is always under construction."
- Noelie Alite
- Noelie Alite
yes I meant several scene nodes... I never tried irrlicht with a lot scene nodes, I only read it takes more time, but for your idea this is the only solution (like dhenton said, create different modeltypes), but when you want your player to move parts of without messing with the other meshes, all you can do is use different scene nodes.. (you can search the forums, I saw a post somewhere on how you can increase your performance for 50%, he uses some kind of tweak to process many scene nodes faster)#Guest: would that mean using several scene nodes for my model: would that be very bad for performance?
-
- Posts: 395
- Joined: Fri Apr 08, 2005 8:46 pm
Exactly. Its called the "Bruce Fort" method. You have one blender file with a typical configuration and armature with animations. Save as s1.blend and a1.blend. Open a1.blend and make all the modifications necessary to get one of the possible configurations.SanderVocke wrote:@dhenton: you mean that I should first make all the seperate parts, then swap them out and save every combination as a model file? Or did I misunderstand you?
Thanks for replying.
It has a couple of disadvantages. If you change your animations, you'll have to update all files, and if you have a lot of permutations, it will get real boring.
-
- Posts: 40
- Joined: Mon Oct 31, 2005 1:19 pm
- Location: Netherlands