If the mesh model pivot is not the center of the model, “Remove Same Position Triangles” will not work well.
Is it possible to work even if the mosh model pivot is not the center of the model?
Does this grid thing still work if the edges don’t collide 100% in the same position?
For example, let’s say I have amorphously-squared rock volumes that I lay around on a grid that actually go over the size of a single standard grid square in all three dimensions. In a lot of places, they’d overlap, but around edges or as a wall or corner, some parts should be culled but not others. Would this remove those triangles that are overlapped?
Also, how costly would this be in terms of hard-disk space at runtime or in the project (since most of these rocks would be instanced and mostly identical in my project)? – I’m worried that a new mesh would have to be created for all of these rock volumes and stored in the project indefinitely (despite them essentially being the same rock).
1). Yes it would remove them, MCS removes triangles that are inside another mesh, for the same position overlap I added a slight scale up of the other mesh of 1mm to include if the vertex is on the surface of the mesh.
2). Indeed combining adds to memory usage, but the geometry % you remove also makes the same % of less memory it uses compared to traditional combining. So if you remove 60% of geometry the mesh uses 60% less memory. How much that would be depends on how many vertices you use multiplied by memory usage per vertex. E.g. position (Vector3 = 12 bytes) + normals (Vector3 = 12 bytes) + tangents (Vector4 = 16 bytes) + uv (Vector2 = 8 bytes) = ~42 bytes per vertex. Also on disk this gets compressed by Unity (in the build).
Indeed. I was mainly trying to figure out how well this approach might fare against just instancing the same meshes at runtime (and keeping the overdraw). I’d really like to have the best of both worlds since I’m using volumes of smaller repeated similarly sized meshes to make the world, but I’m not terribly sure how I might approach that with your setup to eliminate overdraw. Any ideas?
I’m trying MCS with the Cave add-on to remove tris from a bunch of cliff rock meshes that intersect the terrain. However, I’m having a little trouble with the mesh colliders. I need mesh colliders because the top surfaces of these cliff rocks are walkable. But:
On some meshes, the MCS-generated mesh collider doesn’t match the mesh render – it’s higher, and so the player-character walks about a meter above the mesh surface. Very odd, and only happens with some meshes. Any idea what could be going on there?
On my original prefabs, I have a mesh collider on LOD0 and box colliders on other LODs (necessary for NPC collision detection). But MCS puts mesh colliders on all LODs. Is there a way for MCS to transfer the colliders that I’ve set up?
It will work with MCS. How many vertices and triangles does your rock mesh have? It looks a bit expensive, probably best to use Lods for it.
The other option would be to use instancing and have each rock face as a separate instance. In both cases you could have more variations to break the tiling. MCS will always be faster, but will use more memory so you have to evaluate if the memory usage is acceptable. Another possibility to use less memory would be to use normal cubes with MCS and use distance based tessellation on them with a displacement map.
I’ve just purchased the MCS Cages and Overhangs addon and am taking it for a spin. One thing I’ve noticed is that the licensing info in the downloaded package is different from that on the Asset Store. I assume the license file in the package needs an update?
Also, MCS itself and the Caves & Overhangs add on package have different licenses on the Asset Store itself. Is that deliberate?
In any case, I just pointed MCS at one of my outdoor island scenes and am pretty excited by the results. For what it’s worth, I’d pay far more than the asking price for this.