I'm looking at ndMakeStaticMap.cpp for examples, but i'm confused about there being two 'mesh builders': ndPolygonSoupBuilder and ndMeshEffect. In the function BuildGridPlane they are even used both. So what's the purpose / difference of those two classes? When do i use which or both?
Regarding my geometry, that's quite different form the usual standard. Here's an example made from blending 4 boxes:
This is similar to marching cubes, but it's actually a quad dominant remesh. Because edge flow aligns to curvature, the quality is better so i hope to use this for both terrain and basic architecture, but not for all kinds of details and decorations.
I think this also is good for physics. The remeshing guarantees manifold and no degenerate mesh issues, also no self intersections from kitbashing multiple, overlapping models. Basically i can import any buggy mesh and convert it to robust volume and surface.
The downside is ofc. lots of triangles in comparison to manually optimized models.
I can generate the geometry at any resolution. For physics i guess edge length of 10 - 20 cm may work well, but it's still a lot of triangles.
Let me know if you think a reduction is needed, and if Newton can do such reduction or if i should do this. Ideally, no reduction is needed, assuming a detailed game world has not much flat surfaces anyway.
I'm also worried about about the boundaries. Notice, for a large world, the whole world would be just one single connected huge mesh, but divided into (color coded) blocks. Physics sim will only happen on blocks near the player ofc.
But how would Newton know multiple such blocks are meant to form a seamless, connected surface?
Is it enough to provide matching boundary vertex positions and normals?
Or is there a need to add skirts to the boundaries, eventually adding a row of triangles on the boundary so they represent the duplicated surface of an adjacent block?
Finally, i could provide adjacency information even across blocks, if that helps Newton to build it's data structures faster or better.