Kool. I can't wait to see if it works out (or not). I'd write some code up for you, but I'm just too damn tired right now. Maybe I'll type somethin up tomorrow mornin'. If you can get the shader, I can try and animate it. lol.

What would be the best way to do this though? You could use the models skins as frames:
Code:

bmap* CMap;

// Animate an Entity by changing the frame parameters.
action AnimateMap
{
my.skill2 = 0.5; // Speed to animate
my.skill3 = 1;
while(1)
{
my.skill1 = cycle(my.skill1 + (my.skill2 * time), 1, ent_skins(my));
my.skill3 = int(my.skill1) + 1;
bmap_for_entity(my, my.skill3);
//
wait(1);
}
}



Then the pointer CMap is set to the skin that needs to be used for the shader mapping. This loop will not include the first skin of the model. This way you can have the models first skin the diffuse map. Then fill the other skins with the normal mapping frames. The above action will cycle through them, and set the predefined bitmap pointer to the entities skin.

The code above is made to work with only one entity though. For multiple entity support, you could simply set up an event for the shader.

Code:

function GetSkin();

material mat_IDK
{
enable_render = on;
event = GetSkin;
effect = "Whatever...";
}

function GetSkin()
{
mtl.skin1 = bmap_for_entity(my, my.skill3);
}

// Animate an Entity by changing the frame parameters.
action AnimateMap
{
my.skill2 = 0.5; // Speed to animate
my.skill3 = 1;
my.material = mat_IDK;
while(1)
{
my.skill1 = cycle(my.skill1 + (my.skill2 * time), 1, ent_skins(my));
my.skill3 = int(my.skill1) + 1;
//
wait(1);
}
}



This code will work with multiple entities, but will also take up more resources.

Say an entity has 6 skins. 1 diffuse texture, and 5 bumpmaps. This code will cycle through skins 2 - 6, and send the current one to the shader each frame. This way you can animate your bumpmaps. It will also work with multiple entities. As many as you want.

* The code above is not tested. Theoretically, it *should* work... If I had a model with animated bumpmaps to test it with, then i would.

Last edited by xXxGuitar511; 06/10/06 16:31.

xXxGuitar511
- Programmer