Thanks
Illuminating everything i do like this
#constant IlluminationImageID=CreateImageColor(255,255,255,255)
#constant NormalMapID=CreateImageColor(128,128,255,255)
function setupIlluminationShader(objectId as integer,imageId as integer, bones as integer)
///////////////////////////////////////////////////////////////////////
/*
SetObjectImage(ObjectID,DiffuseImageID,0)
SetObjectImage(ObjectID,IlluminationImageID,1)
SetObjectNormalMap(ObjectID,NormalImageID)
SetObjectImage(ObjectID,SpecularImageID,3)
SP_Illumination_AddObject(ObjectID,DiffuseImageID,NormalImageID,SpecularImageID,IlluminationImageID)
*/
/*/
if bones=0
SetShaderConstantByName(Illumination_ShaderID,"normalSize",1.0,0,0,0)
SetShaderConstantByName(Illumination_ShaderID,"specularPower",90.0,0,0,0)
SetShaderConstantByName(Illumination_ShaderID,"illuminationGlow",1.0,0,0,0)
else
SetShaderConstantByName(IlluminationBones_ShaderID,"normalSize",1.0,0,0,0)
SetShaderConstantByName(IlluminationBones_ShaderID,"specularPower",90.0,0,0,0)
SetShaderConstantByName(IlluminationBones_ShaderID,"illuminationGlow",1.0,0,0,0)
endif
*/
SetObjectImage(objectId,imageId,0) //mixamorig:LeftHand
setobjectimage(objectId,illuminationImageID,1)
SetObjectNormalMap(objectId,NormalmapID)
SetObjectColorEmissive(objectId,20,20,20)
child as integer
for child = 1 to GetObjectNumChildren(objectId)
SetObjectImage(GetObjectChildID(objectID,Child),imageID,0)
SetObjectImage(GetObjectChildID(objectID,Child),illuminationImageID,1)
SetObjectNormalMap(GetObjectChildID(objectID,Child),NormalMapID)
SetObjectColorEmissive(GetObjectChildID(objectID,Child),20,20,20)
next child
/*
if bones =0
SetObjectShader(objectId,Illumination_ShaderID)
else
SetObjectShader(objectId,IlluminationBones_ShaderID)
endif
//setobjectcoloremissive(objectId,150,150,150)
*/
endfunction
and if you see the attached video that was an attempt with the shader being used to paint cars it needs work but instead of a splat image this is just
a coloured square being applied