Hello, I am looking for a smoke shader for a burning cigarette. I have the script below, but cannot figure out what smoke_mat does and how can I modify it?
var __smoke_init = 0;
material smoke_mat
{
skill1 = 0;
skill2 = 0;
}
//Initializes the smoke shader
function smoke_init()
{
if(__smoke_init == 0)
{
me.skill41 = 0;
me.skill42 = 0;
me.skill43 = 0;
me.skill44 = 0;
__smoke_init = 1;
}
}
action smoke_shader
{
smoke_init();
my.material = smoke_mat;
my.transparent = on;
while(1)
{
//This block scrolls the texture
if(smoke_mat.skill1 > 999)
{
smoke_mat.skill1 = 0;
}
else
{
smoke_mat.skill1 += 0.02 * time;
}
if(smoke_mat.skill2 > 999)
{
smoke_mat.skill2 = 0;
}
else
{
smoke_mat.skill2 += 0.01* time;
}
//make plane "face" camera
vec_set(temp, camera.x);
vec_sub(temp, my.x);
vec_to_angle(temp, temp);
my.pan=temp+180;
// my.tilt = 0;
// my.roll = 0;
//This block updates the position of the
//smoke's "tail," moving it closer to the
//head if it is beyond our tolerances
//TODO::
//loop on the next frame
wait(1);
}
}