Hi, may someone help me with an example on how do i get a edge normal direction?
If i could understand shade coding, i probably already solve this but shader graph is not the same as coding a shader.
May someone help me, please?
Cheers.
Hi, may someone help me with an example on how do i get a edge normal direction?
If i could understand shade coding, i probably already solve this but shader graph is not the same as coding a shader.
May someone help me, please?
Cheers.
Hi,
What exactly do you mean by edge normal? Do You want to get the surface normal of an edge area of some object, like an edge between cube sides, or what? Perhaps you could show an image or a sketch to visualize what you are trying to do.
Sure:
If we open a 3D software (in this case: Blender), select a edge (not a vertice or a face) and change the orientation to the normal, you see that the edge selected (line) is pointing up (blue arrow).
This is the Edge normal that i want to get. Is it possible in shader graph to obtain this value using PBR or Unlit?
Edges are a very useful concept in 3d modeling programs, but in real-time graphics there’s actually no concept of edge, there are only vertices and their triplets that define triangles, so only vertices have normals (and in shaders normals are interpolated between vertices to get fragment(i.e. pixel) normals). More than that, due to the way model information is stored, in Unity there is no normal like on your screenshot from Blender at all, there are actually three vertices in each corner of the cube, and each vertex’s normal is perpendicular to the face it belongs to.
If you can tell what kind of effect you want to achieve, maybe there are different ways to do it.
Maybe a diferent approuch then.
I’ll create another topic because the issue won’t match the title of this topic. And to make sure that the right answer matches the topic title is important when anyone want to know a certain issue when searching. Thank you Oxeren.