3D models have a mesh composed of triangular faces. These faces meet each other on edges (the lines along which they touch) and vertices (the points where their corners join).
All 3D models in your scene must fit within the limits of its parcels. If they extend beyond these limits when running a preview, the meshes will be marked in red and bounding boxes will be highlighted in white.
For performance reasons, Decentraland checks the positions of the bounding boxes around meshes (not the vertices in the meshes themselves) to verify that they are within the scene’s limits.
If you have a model that has all of its vertices neatly inside the scene area, but that has large bounding boxes that are mostly empty and extend beyond the scene limits, the entire model will be marked as outside the scene limits.
To avoid this problem, you can clean up your 3D models to reset positions and rotations of meshes so that bounding boxes don’t extend beyond the meshes they wrap.
You can configure a mesh to be smooth. This tells the engine to render its shape as if there was an infinite number of intermediate faces rounding it off. This setting can greatly help you reduce the number of triangles needed to make a shape appear to be rounded.
The image below shows two identical models with the same materials. They differ in that the one on the right has most of its geometry set to smooth.
Note how you can see distinct faces on all of the cylindrical shapes of the model on the left, but not on the model on the right.
This setting can be configured separately over individual faces, edges and vertices of a model. One same model could have some of its faces or edges set to smooth and others to sharp
Best practices for geometries
- Be mindful of how many faces you add to your 3D models, as more faces make its rendering more demanding. See scene limitations for the limits imposed by a scene.
- Make sure there are no hidden faces that can’t be seen but that add to the triangle count.
- For shapes that should have rounded sides, set them to be smooth rather than adding additional faces.
- Make sure the normals of all faces are facing outwards instead of inwards. If there are faces in your model that seem not to be there when you render it, this is most likely the cause.