- Home /
Strange issue with generated mesh
Hello,
I generated a mesh with script. It's build up from "plane paltforms" with different rotations connetcted to each other. So my issue is that the texture appear only on the first triangle on every platform and the other is invisible but if I check them upside down the other triangle appears with texture and the other is invisible. (I did nothing with uv and normals because I don't understand it maybe that's the problem)
Answer by Waz · Jul 04, 2011 at 02:09 PM
If you set no uv you will not have any texture.
Your invisible triangle is probably facing away from the camera. That is, it's normal is facing the wrong way. If you reverse the order of vertices in the triangle, it will face the other way.
So yes, as you anticipated, you can't ignore uv and normals.
Thanks, I changed the order of the index in the triangles and now they are faceing to the right way. Now I got no idea how to set the uvs to scretch the texture on the entrie mesh. Can you help?
UV are each just a 2D point on the texture, from (0,0) to (1,1).
Answer by Graham-Dunnett · Jul 04, 2011 at 02:09 PM
Sounds like your triangles are not facing the same way. My guess is that one triangle has the vertices listed clockwise, and the other has them listed anti-clockwise. I don't recall which way is correct.