[SOLVED] Skinned mesh and custom material (custom shader) - is it possible?

Hi,

  1. I have skinned mesh in model and i need to apply my own material with custom shader on this mesh - yes, it’s a pity, but may be there is any way to store vertex part and change only frament programm for material?

  2. In case i set custom shader on skinned mesh - can i restore this mesh back to default condition (i mean restore by script default vertex programm that make able to play animation)?

  3. What name of uniform variable that make me able to get access to bone matrices array in vertex shader?

The issue has been solved - just added code for handling animation data to my vertex shader from playcanvas hardware skinning shader. Not quite convenient, but works fine. )))

Cool, Good to hear.

Out of interest, what does your custom shader for the model do?

There are two normal maps - one for whole model, and one detailed for textile (detailed map is common for all meshes, model’s normal map is unique for each model - i can combine them only in runtime).

There are a lot’s of properties to rotate, scale and shift textile on vertex shader (cant’t remember exactly maybe most of them present in default material), there are lot’s of proerties for specular on fragment shader.

And also i have specific light maps (i pass light map data through alpha channel of model’s normal map. I hide light maps, during animation is palying and show them in static poses).

I have those features in any textile and leather materials and thats why default materials are not suit for me.

Hi Anton,

I’ve just run into this exact problem. Could you give me some pointers how to get the skinning information into the vertex shader?

can you please share the solution? I’m having the same problem

Hi @luizcarlosfx and welcome! Could you please open a new topic with your problem? This topic is too old.

1 Like