Texture animation?

I’m creating simple tank game and I’d like to have rolling tracks in future versions. Currently I’m using .OBJ-models but 3DS looks also possible . Texture animation sounds like good solution but is there anything I should know in advance?

Should I make tracks and road wheels as separate object or …?

I am using texture animation in my tank game - for the tracks.

Check the demos on the http://xith.org/ site, I believe there is a rotating texture example.

I made the tracks and wheels seperate - this is important if you are animating the track and wheel textures seperately.

Will.

There are at least 2 ways you can go:

  1. Dynamic texture
  2. Texture Transforms

Texture transforms will modify texture coordinates on the fly [graphic card will calculate this in hardware], so this may be fast. And this is often good for some animation effects.

Say, for track, you may prepare wrappable texture of the track and control translation of the texture by the texture transform.

Check Xith3DTextureTransformTest for demo code and more details.

Yuri

I wrote a small tutorial on playing with texture coordinates over at xith.org. the link is

http://xith.org/tutes/GettingStarted/html/more_fun_with_textures.html

The example (with associated code) shows how to grab the cooridnates of the texture, modify them, and put the new values back into the system. In the example I only modified one corner of the texture to magnify or minify the texture. You could modify all four corners to get different effects.

Also wanted to mention that the tutourial shows how to implement the GeometryUpdater interface along with the updateData method.

Using this approach sync’s your changes with the rendering system…the only way to go.

Just noticed the Webstart link isn’t working…Jens is this my fault…what do I need to do to fix this??

[quote]Just noticed the Webstart link isn’t working…Jens is this my fault…what do I need to do to fix this??
[/quote]
It’s not you fault. :slight_smile: I have fixed it.