Animated textures?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
peterparker
Posts: 3
Joined: Wed Sep 05, 2007 10:14 am

Animated textures?

Post 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
Attachments
anim_text_sample.zgeproj
A version with animated texure
(131.4 KiB) Downloaded 571 times
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
Post Reply