Get an array or list of points and normals of mesh surface (Not vertecis)
Hey Unity Answers!
I would like to be able to get a defined amount (could be 1000s) of points that are evenly spread across the surface of a mesh, including the normal data as well.
To explain a bit what I am trying to do; I have a prefab I would like to place over a mesh a defined amount of times. So I would like to use those points to position them, and the normal for the rotation. (Not just vertex positions of the mesh, the prefabs could be anywhere on the mesh) It does not have to be calculated in realtime, but in the editor. So performance isn't a big issue.
I have looked into uv>position (http://answers.unity3d.com/questions/46788/painting-on-a-texture-without-crossing-mesh-triang.html#answer-46816) and while this may be a wat to get the positions, it would also mean that some of these 'defined amounts' will not on used UV space, and therefor be lost. That being said, it would be great to be able to use a UV map, since I could create a height-map too, which I could use to give the prefab a different height.
I'm not sure how to get started with this idea. Would you be able to help me?
Friendly regards,
Colin
Answer by Kyuu · May 23, 2017 at 12:32 PM
No one able or willing to help me out on this one? I am still stuck on this.
Your answer
Follow this Question
Related Questions
Normal Walker Script Rotating Player Orientation Incorrectly? 0 Answers
Tiling a noise texture 1:1 over each triangle without creating extra vertices 1 Answer
Why are the corners of my generated Mesh going dark/light like this? 1 Answer
Finding the vertices of each edge of a mesh face found by a raycast hit 0 Answers
Bump maps in replacement shaders 0 Answers