The Blog

About Me


Marius Oberholster Hey! I'm having an incredible learning experience, not only learning how Blender works (yes, still learning), but also about Open-Source and the incredible software available. Stick around!

Game Engine - Animated textures

Posted by Marius Oberholster on Tuesday, October 22, 2013 Under: Quick Blog Tutorial
Hey all!

This is just so much fun! I was so surprised to find this out and I am super jazzed to share this QBT with you today!

These passed few weeks I've been blessed to be able to learn more about Blender's game engine or the BGE (Blender Game Engine) and on thing in particular that fascinated me. Also fairly puzzling, but cool nonetheless; animated textures. Basically it enables you to have constant movement throughout your games for things like water, grass, lava, etc. and even beyond that, varying displacement.

Here is a demonstration of how an animated texture works:

I thought it would simply be like you'd add a sequence to an animation, but the mistake is thinking that the BGE uses the timeline. They had to come up with an alternative way of animating textures and this is how it works:

Jip! That's right, all the frames of your animation have to go on one image. I placed the numbers to show you how it is read to the computer.

While this may look like a horribly time consuming task, it really isn't. You simply do the following to apply one in Blender; try the above texture:
- Set Blender to the Blender Game from the engine drop-down
- Set it to GLSL texture mode (animated textures don't work outside of it from what I know)
- Add the object you want textured (whether modelled or not) and unwrap it (animated textures are either reflection or UV coordinates)
- Go into the UV/Image editor and open your animated texture there
- Press N to give you the tools panel on the left, there, when scrolling down, you'll find the animation settings
- Set it for the amount of frames you image contains, minus 1, because it starts at 0. Also set the tile amount, but don't tick tiles (if you don't, it doesn't know how many parts to divide the texture in)
- You don't have to tick repeat either. It repeats on it's own.
- Now go back to your model and add a new image texture and select the one we just configured, set it for UV Coordinates, or reflection, whichever you chose and press P to start the game and it should move. 

How to make one?
- Open the Gimp or any software that can set up a grid, snap images to that grid and export images
- Set-up a grid for the amount of frames you need vertically and horizontally. This will take some math on your part.
- Import all your images (remember the grid blocks should be the same size as of your frames) and order them like the above texture example.
- Export your final image

Just a note: Blender doesn't understand the gif format, so you can forget about adding that, haha. As a side though, according to a wikipedia article, the gif format's patents has expired, but I'm not so sure, haha. Eitherway, this is the only way I know of on how to add an animated texture.

Credit:
- JESUS
- Arusebo:

 - A very good friend, Dener Alves

Hope this has been helpful to you all!!

Thank YOU!!!!

In : Quick Blog Tutorial 


Tags: jesus  thank you  great  animated textures  bge  works  different  what!  cool 
Social
(+27) 073 104 2834   |   marius.oberholster@gmail.com   |   Contact

Make a free website with Yola