Hello guys,
I (too ) intend to design an easy-to-extend (for Python programmers) minecraft clone.
But the blocks should be smaller and are used for terraforming only, objects and actors shall be rather smooth. Maybe I will open a thread to describe my project, in another sub-forum. If someone wants to join, he/she is very welcome.
Basis for my first approach was the āProcedural-Cubeā example, of course. The pycraft prototype
(http://www.youtube.com/watch?v=qg4gMMDaJM8)
was then used to check, why my approach was so slow. Now, the engine is quick enough that I am certain it makes sense to go on.
For my question:
For optimization, I would like to reduce the number of vertices I send to the pipe. I thought about using Tristrips instead of Triangles.
http://imageshack.us/f/210/pandacube.png/
The problem: vertices can be used for several triangles (using Tristrips), but their texture-coordinates are linked to the vertices as defined in the GeomVertexData.
Now in PyCraft, the texture coordinates of one (vertex) coordinate may differ for adjacent triangles, for example if a dirt cube face touches a stone cube face. In the picture you see vertex 2 and 3 that belong to two faces, a red and a green one. The left triangle holds tex-coords of the texture imageās right side, the right triangle tex-coords of the imageās left side.
The texture-coordinates should have been saved in the triangle instead of the vertex, so they could be set explicitely for the adjacent triangles, without touching the vertices again.
Can anyone propose a way to assign one texture coordinate for one Tristrip triangle and set another texture coordinate for the adjacent triangle? Or a similar solution to reuse vertices?
Many thanks for your ideas!
Michael