Author Topic: bit of help with wheels and rotors please?  (Read 1354 times)

anonymousjim

  • Guest
bit of help with wheels and rotors please?
« on: 3 June 2011, 06:47:01 »
Hello all,

I'm getting a problem whenever I try to animate wheels or rotor blades in blender and transfer them into g3d format,  The wheels spin fine in blender but when in a g3d they rotate a quarter of the way they should then seem to scale up a bit and turn back the way they came then scale down at the starting point and the cycle repeats itself.

What is going on????

am I not doing the animating correctly in blender so that it's confusing glest or something?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: bit of help with wheels and rotors please?
« Reply #1 on: 3 June 2011, 09:32:21 »
The technical reason: G3D is a interpolating vertex format (like MD2) and blender uses a bone format (like MD5).

What this means: you should add more frames to your animation.  The files will be bigger but the animation smoother.

anonymousjim

  • Guest
Re: bit of help with wheels and rotors please?
« Reply #2 on: 3 June 2011, 09:39:51 »
ahhh, I see, yeah, that would make sense... Thanks, I'll add more frames!

Mr War

  • Guest
Re: bit of help with wheels and rotors please?
« Reply #3 on: 3 June 2011, 09:43:01 »
This is a common problem and logical issue with animating full revolutions. Basically it looks like it's scaling but really I think it's just each node taking a direct route back to the start position via unrotating. I'm not explaining this well, and I'm no expert.... Blender stores the rotation angle and direction. To go from the last frame to the first it also unwinds accumulated rotations.

Tip. Separate the desired visual effect from actual movement... It doesn't have to rotate, it just needs to look like it does. People are very suggestible, if it's a wheel they'll ASSUME it goes around.

Workarounds
For wheels design them to not look too different regardless of their rotation, then use partial rotations and scaling and movement to give the illusion of going along. It won't look great up close but works fine - look at Tech faction catapult to see what I mean.

Rotors - I haven't done it yet, but am planning to. Two ideas are shrouded rotors which rotate left right very fast to give illusion of flutter.
A rotor using image transparency with only 'shimmer' drawn on not whole blades, maybe with outer arc traced. Again short left-right rotations and up down etc to give shimmer effect
« Last Edit: 3 June 2011, 09:52:57 by Mr War »

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: bit of help with wheels and rotors please?
« Reply #4 on: 3 June 2011, 10:07:13 »
<partial-off-topic>

Interesting fact:  Glest once supported animated texture co-ordinates.

I discovered this while building G3dHack, the only model in magitech with such data is wicker_behemoth_morph.g3d, but you wont see the effect in game because support for it was removed in the engine. (But I implemented it in G3dHack, because I was very curious, so if anyone wants to check it out, load up wicker_behemoth_morph.g3d, set anim speed to about 50 and press play).

Doesn't look fantastic for the wicker behemoth, but I bet it would be great for this: ie, static wheel geometry, with animated texture on the sides.

Of course the blender exporter doesn't support this anyway, so its largely a moot point. But maybe something to consider bringing back in the future.

</partial-off-topic>

Edit: Will actually beat me to this, but I missed his thread from dec... .https://forum.megaglest.org/index.php?topic=6291.0
« Last Edit: 3 June 2011, 11:02:27 by silnarm »
Glest Advanced Engine - Code Monkey

Timeline | Downloads

anonymousjim

  • Guest
Re: bit of help with wheels and rotors please?
« Reply #5 on: 3 June 2011, 10:51:25 »
I got the wheels to work by adding more frames, so the workarounds proved unneccesary.  You mentioned transparent textures though... Can that be done without the team colour filling in the gaps?

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: bit of help with wheels and rotors please?
« Reply #6 on: 3 June 2011, 11:48:04 »
Oh wow, I can answer a blender question...

In blender meshes marked as 'two sided' will be exported as team-colour meshes, and those not so marked will just use the regular rgba from the texture (both will result in two-sided meshes in Glest).

https://forum.megaglest.org/index.php?topic=6501.msg66401#msg66401
Glest Advanced Engine - Code Monkey

Timeline | Downloads

 

anything