Quote:

I noticed that setting the entities ambient and albedo doesn't seem to work when using this material. Is that right? If so, what do I need to change in the material to adjust these?


maybe it's necessary to copy the mat_model material parameters to get the same behavior as with standard models. instead of the starter function this example uses a material event function:

Code:
function mtl_vegetation_init

{
vec_set(mtl.emissive_blue,mat_model.emissive_blue);
vec_set(mtl.ambient_blue,mat_model.ambient_blue);
vec_set(mtl.diffuse_blue,mat_model.diffuse_blue);
vec_set(mtl.specular_blue,mat_model.specular_blue);
mtl.power=mat_model.power;
mtl.albedo=mat_model.albedo;
mtl.skill1=pixel_for_vec(vector(128,0,0),0,8888);
}

material mtl_vegetation
{
event=mtl_vegetation_init;
effect=
"
texture entSkin1;
dword mtlSkill1;

technique vegetation
{
pass p0
{
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaTestEnable=true;
alphaRef=<mtlSkill1>;
alphaFunc=greater;
cullMode=none;

colorArg1[0]=texture;
colorOp[0]=modulate2x;
colorArg2[0]=diffuse;
}
}
technique fallback
{
pass p0
{
}
}
";
}



@slacker: strange! i have no idea what could cause this. i use a gf4 too so this shouldn't be a problem... (try to add an empty fallback! )