unique material per entity ?

Posted By: darkinferno

unique material per entity ? - 02/10/12 21:44

I need to do some changes in the shaders of my entities, stuff like bump strength and so on, i noticed however, that changes done to one MATERIAL affects every entity with that material, first solution that came to mind was to use MTL_CREATE for individual entities, that works.. but theres a visual delay when the entities get created, so with that i looked into using PRELOAD_MODE=3+4; not much difference with that either, i was looking ant ent_cloneskin but didnt seem to get any results, so question here is, what can be done to get this working for varying meshes? Is ent_cloneskin the way but i'm not using it right?
Posted By: Superku

Re: unique material per entity ? - 02/10/12 21:47

Use vecSkill41 and set skill41 to 45 via script (with the floatv command). There's vecSkill45 for four additional skills.
Posted By: darkinferno

Re: unique material per entity ? - 02/10/12 23:06

that is what i do to change shader parameters, via using skills and floatv ... for example: vec_set( myMtl_AiShader.skill17, vector(floatv(tmpVar), floatv(tmpVar), floatv(tmpVar) ));
Posted By: Rei_Ayanami

Re: unique material per entity ? - 02/10/12 23:08

use the entity skills inside the shader, not the material skills.
Posted By: darkinferno

Re: unique material per entity ? - 02/11/12 16:58

how would i go about doing that?
i cant just change: mtl_Shader.skill18 = floatv(1) to my.skill18 = floatv(1) right? because i got no results... i would have to make changes in the shader file also i assume right ?
Posted By: darkinferno

Re: unique material per entity ? - 02/11/12 17:18

OK i got it, thanks people, made use of entity skill41 .. skill44 and skill45 .. skill48 laugh

Didnt think of that before, first time i'm jumping this much into shaders
© 2024 lite-C Forums