Page 1 of 1

Animated textures?

Posted: Wed Sep 05, 2007 12:48 pm
by peterparker
Hi there ,
I just want to do an animated Texture.

For this I add an AnimatorSimple and bind it to an material TextureX/TextureY/ or TextureScale.
This works, but it seems there is a hefty performance penalty doing so..(may be only on my card, it not a performance-tiger)?

But what I like and what not works is to bind an AnimatorSimple onto a BitmapZoomRotate.
So I can scroll / scale a texture, but cannot rotate it.
Or did I miss something?

Anyway a great tool..
I like especially the XML-Project files, as it is very easy to use versioning tools like subversion!

Great work,
Peter

Posted: Wed Sep 05, 2007 3:26 pm
by VilleK
Hi Peter and welcome to this forum!

You are doing the right thing, the problem is that you have the SpawnModel in your App.OnRender. Which means that a new model will be instantiated every frame, so performance goes down because it is drawing several hundered textured cubes every second :)

So if you move the SpawnModel to App.OnLoaded it will work as expected.

Material.Scale/TextureX/Y all change the texturematrix and is very fast. BitmapZoomRotate will recreate the texture so it is slow.

Btw I'm glad you like the XML-files, I use subversion myself and think that text-files are the best way to store many kinds of data so you can use diff-tools.