SCP-CBN / cbre

Sledge fork made for SCP - Containment Breach room creation.
15 stars 6 forks source link

RMesh provider #28

Closed PyroFire232 closed 3 years ago

PyroFire232 commented 3 years ago

Mesh only, textures to be done.

juanjp600 commented 3 years ago

CBRE is not going to ever accept an RMesh provider because it is simply not possible to make one that works correctly. This one puts all faces in one brush, which is totally unacceptable as the resulting brush is completely unusable: the result is almost guaranteed to be non-convex, and it'll have way too many faces, most of which will be facing inwards.

A correct RMesh loader would have to take a bunch of triangles, merge them together if they're coplanar and share an edge, and somehow generate missing brush faces out of nowhere, to then make a convex hull. While you could probably get away with just pretending that everything is made out of cubes for a number of rooms, this technique wouldn't work well for most of them.