Hi
I have units such as tanks that has a body, and a turret that can rotate freely from the body. What is the best solution? Animate the turret in 3d max and in irrlicht set animation frame to whatever frame corresponds to the current "float turretRotation"?
Would that work? (Im using obj-files for my units right now). But if i need rotation AND elevation of the turret? I now got two parameters so its hard to animate for all combinations...
Another option is to save the parts in different model files and just manually place/rotate everything in irrlicht depending on turretRotation and turretElevation. But that makes it a bit unhadly with all the files, also wouldnt the drawCalls increase three times, making the game much slower/less optimized?
Thanks for your input
Erik
Rotating tank turret. Animate is best?
Re: Rotating tank turret. Animate is best?
Yes, three separate meshes with code control is best. Three times the drawcalls yes, but how many tanks will you have on screen?
Re: Rotating tank turret. Animate is best?
Maybe 50 units on screen. Will be different depending on the situation.
What is bad with the animation method?
What is bad with the animation method?
Re: Rotating tank turret. Animate is best?
150 draw calls is nothing really.
The infinite number of combinations is bad. Animating even a few hundred combinations is not the best use of RAM (or your time).
The infinite number of combinations is bad. Animating even a few hundred combinations is not the best use of RAM (or your time).
Re: Rotating tank turret. Animate is best?
but do models take up so much more space in ram if they have more animation frames?
For units that may elevate visually ALOT (AA guns for example) animation might be bad, but for units that are "fixed-angle" (firing ground-to-ground only such as anti-tank guns) i might only need 30 frames or something. But 30 frames only for 360 degree rotation may look jumpy...
I remember many drawCalls were mensioned as a bottleneck issue, but maybe thats when you have many hundreds of them (such as using meshes for trees/stones etc)
For units that may elevate visually ALOT (AA guns for example) animation might be bad, but for units that are "fixed-angle" (firing ground-to-ground only such as anti-tank guns) i might only need 30 frames or something. But 30 frames only for 360 degree rotation may look jumpy...
I remember many drawCalls were mensioned as a bottleneck issue, but maybe thats when you have many hundreds of them (such as using meshes for trees/stones etc)
Re: Rotating tank turret. Animate is best?
Aim to have less than 1000 drawcalls per frame. Think of it like a budget. 150 for tanks, some for env...