Animation-Texture-Baker icon indicating copy to clipboard operation
Animation-Texture-Baker copied to clipboard

Shader graph version not working

Open infrank opened this issue 2 years ago • 5 comments

Hi please could you add more explanative information about how to make the shader graph version work? There is quite a lack of information about how to use the shader, and I am not well versed in coding.

I've actually baked an animation from a character into a texture and it works, with the generated shader, which is not a shader graph. As I'm not versed in coding, I'm interested on using the shader graph, but I tried with the shader graph you provided, changing the textures, but it is not working for me, the animation is there, but the mesh vertices are messed up.

You mention in the doc, that for the shader graph "Need to edit the mesh at runtime.. Vertex index data is being copied to mesh.uv1 by script".

I don't know what it means exactly. I tried adding the script VertIdxToUv.cs to the gameobject of the character with the baked texture, but it's not working. I don't know if that is the right method..

This is the character with the shader once baked:

image

And this is the character with the shader graph you provided, changing the textures to the ones baked from the character:

image

I don't know, what am I missing here?

infrank avatar Apr 29 '22 13:04 infrank

upgrade to shader graph v14 to get access to vertex-id node

image

nukadelic avatar Mar 13 '23 09:03 nukadelic

Hi thanks! Precisely now I'm thinking on using it in my project, but I'm working with Amplify Shader Editor, do you think it would work with Amplify?

infrank avatar Mar 13 '23 15:03 infrank

http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Vertex_ID

nukadelic avatar Mar 13 '23 20:03 nukadelic

Hi thanks for the help. It was a bit difficult to understand but I got it working in Amplify Shader Editor. Curiously I cannot get it in shader graph. In Amplify it's not perfect, perhaps is that I'm not using the tangent, but I don't know where to connect the tangent texture.

imagen

Another curious thing is that I have to reescale down the model until the minimum posible, because when the shader is applied the size of the model is more than the original, I don't know why: imagen

infrank avatar Mar 18 '23 13:03 infrank

Same thing in shader graph , the tangent texture is not connected anywhere , from the looks of it - it's not being used , similar case for the hlsl shader ( TextureAnimPlayer.shader ) it is not using the tangents. I think he generated the tangent textures just in case. Also some of the shaders don't even use the baked normal textures and only rely on color and position inputs.

nukadelic avatar Mar 21 '23 20:03 nukadelic