Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader graph version not working #18

Open
infrank opened this issue Apr 29, 2022 · 5 comments
Open

Shader graph version not working #18

infrank opened this issue Apr 29, 2022 · 5 comments

Comments

@infrank
Copy link

infrank commented Apr 29, 2022

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?

@nukadelic
Copy link

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

image

@infrank
Copy link
Author

infrank commented Mar 13, 2023

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
Copy link
Author

infrank commented Mar 18, 2023

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

@nukadelic
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants