Page 1 of 1

Sequential texturing

Posted: Wed Oct 28, 2009 5:40 pm
by Slaine
I believe that's the correct term? I've done some searching but haven't had much luck. What I am after is a way of displaying a range of frames from a single texture image, like the way games used to animate sprites, frame by frame incrementation, but what I'd like is that displayed onto a single quad/polygon.

A point in the right direction would be greatly appreciated :)

Posted: Wed Oct 28, 2009 5:47 pm
by ArakisTheKitsune
In Example 6 is what you looking for. Hope it helps.

Posted: Wed Oct 28, 2009 10:09 pm
by Slaine
ArakisTheKitsune wrote:In Example 6 is what you looking for. Hope it helps.
Well yeah I did have a look at that example, it was pretty much the first thing I did, but really it's not quite what I'm looking for, firstly it's using Irrlicht's 2D functionality, whereas I'd like this to be 3D projected like a texture, secondly it's not really doing it properly, like using animation frame ranges. I don't know, I'm only experienced with BlitzMax 2D regarding this subject, I've never tried it in 3D. Would it have something to do with UV mapping coordinates? So for example each frame is 32x32 on a 256x256 image, you setup a UV projection matrix to move around the image depending on what animation sequence you want to play, i.e. idle, walk, run etc.

Sorry if this seems lame :( I'm just quite interested in doing it this way.

BTW, the game style I am working on is a Diablo II game, i.e. 2D Isometric but 3D, so the characters are textures projected onto flat quads. Just need to figure out how to animate the textures?

Posted: Wed Oct 28, 2009 11:30 pm
by Kalango
Well, you can make an array of textures and add an texture animator to your scene node....
Special FX example handle that approach when it makes the volume light animation....

Posted: Thu Oct 29, 2009 12:14 am
by hybrid
You need to do things like animation ranges on your own, there's no such thing in Irrlicht as of now. We have had some proposals for such things, but it's not done, yet. You have to use adjusted texture cooordinates, yes. You can either change them manually, or use a texture matrix to scale and move the coordinates as necessary.