How to draw texture over a single face of 3D mesh?
I want to achieve this selection effect from For The King:
My hexes are 3d meshes:
Right now I am thinking to have a texture image of that outline and draw it over the top face(top 2D hexagon). How can I do it in Unity? I think shaders are required - which is ok, I would just be grateful for any example of stretching a texture over a single face of the mesh.
I guess the outline in the texture should be square-shaped and just map to the right vertices, but I don't know how will I create it exactly. Should I texture paint in blender, and then use the UV mapping in shader?
As always, thanks for the help.
Answer by TheSmokingGnu · Oct 08, 2020 at 08:43 AM
The solution I went with is: in blender, make 2 sets of UVs - one for normal coloring (just green in this case), and another one that maps a hexagonal-shaped highlight texture to the top face. In unity I then toggle the second uv mapping in shader, or rather when it's active, I blend them by using the second one as emission only.
Your answer
Follow this Question
Related Questions
Something wrong with the cut out feature of the standard shader? 0 Answers
2D image shader, 3D object UV mapping , Using good lightings,,, somebody help me! 0 Answers
What is the best way to handle transparency? 0 Answers
How can I apply texture through shader on sprite without streching? 0 Answers
Random Tiling Shader? 0 Answers