Wintermute Engine Forum

Wintermute Engine => Feature requests, suggestions => Won't implement => Topic started by: raychaser on October 23, 2007, 11:02:14 PM

Title: Complex Sprite 3D textures
Post by: raychaser on October 23, 2007, 11:02:14 PM
Just throwing in my request from another forum thread.

Let me sell this a bit: It would kick some serious butt to be able to control complex sprites as textures. Imagine: eyes, eyebrows, mouths, hell even hair on different subframes that have their animations and scripts controlling their positions etc. Change a character's tie, shirt, socks, shoes on the fly without having to re-render the entire texture. put a gaping wound or bullet hole on your character on the fly. Animate a flowing wound, tears, snow accumulating in hair etc. Every minute I spend thinking about this yields more possibilities of what we could do with it.

What I need it for specifically: Face Engine

You could do things like:
actor.mood("Happy");

mood() could be a user-defined method that would control the eyes, eyebrows, mouth etc in different ways. You could easily write a function to make the eyes look at things and have the expressions change subtly. Also the footprint would be miniscule because the eye graphic would be less than 4k and you wouldn't need a whole face texture for every eye position.

This might also pave the way to a lip-syncing ability

What is required here is that the transparency and colour be calculated from the sum of all frames and subframes.

eh? eh?
Title: Re: Complex Sprite 3D textures
Post by: Jyujinkai on November 03, 2007, 08:58:58 AM
can't you swap textures already on a 3d model.. or is that only when the model loads? 3dactor.SetTexture ??
Title: Re: Complex Sprite 3D textures
Post by: metamorphium on November 03, 2007, 11:51:06 PM
you can indeed swap the textures.
Title: Re: Complex Sprite 3D textures
Post by: Mnemonic on November 12, 2007, 09:21:20 AM
As Jyujinkai suggested in the IRC channel, one should be able to achieve that with smart modeling (multiple layers, then setting their materials). As I explained in the other thread, manipulating multi-layered textures on engine-level would either require multitexturing (variable support on various video cards) or pre-processing the texture (slow and limited to rectangular resulting texture).