Closed hugtalbot closed 4 years ago
Back to this issue. I dig into the code. The problem comes from the fact that the RegularGridTopology is computing a Quad topology and then creating the triangles by splitting the quads.
For example for a grid of nx="3" ny="3" nz="1"
There will be :
Instead of:
So using
<TriangleSetTopologyContainer src="@grid" />
will force the topology to init itself on non-coherent buffers. If you use: <TriangleSetTopologyContainer triangles="@grid.triangles" position="@grid.position" />
it will recompute the good number of edges and the scene will works.
Thus I see several ways to solve the issue:
Solution chose: change Regular grid to compute: triangles + consistent edges An an option to compute only quads + edges (on demand)
Using a RegularGrid in 2D, a TriangleSetTopologyContainer returns the following error:
and the structure edges in triangles is not created. I guess this would be due to the re-ordering of elements (hexa/quads/tri). Any idea @epernod ?
Example scene:
Suggested labels: