Wintermute Engine Forum
Wintermute Engine => Bug reports => Not a bug => Topic started by: raychaser on October 21, 2007, 08:28:51 PM
-
I'm having a problem whereby only the base frame shows up when I use a sprite as a texture using SetTexture. Is this a bug? It would be great to have control of subframes as well as the main frames to do complex dynamic sprite scripting and animation.
Also it seems that only the transparency of the root frame is considered.
My setup: I've got a base frame with a skin texture and then a couple of effect subframes on top. I then use settexture to assign this sprite to a material.
-
No, it's not a bug, it's intentional. Only simple sprites can be used for animated textures, no subframes.
-
feature request?
It would be amazing to be able to have a layered-up sprite that we could control things like facial features using subframe sprites. For example I could have the eyeballs as one sprite and write a little script to have them shift around and look at things. Eyebrows and mouth could be a different subframe and we could easily build an entire expression engine to do cartoony animation like grim fandango.
The goal:
actor.setExpression("Happy");
actor.setEyes("shifty");
Oh well, for now I suppose I can do it by rendering each eye position for each expression into a separate image and then switching back and forth. That's a lot of images though so I think the sprite would be rather large.
Can anyone think of another way to do this? Has anyone tried this before?
-
It's not that simple, unfortunately. It would require either multi texturing, which might not be available on some video cards (depending on how many subframes you'd use), or pre-composing the final texture in memory, and that would be slow... Not to mention the texture needs to be rectangular, but combined subframes don't.