Hello. When exporting models I noticed that my in-sim vertex count is actually double of what it actually is. I thought it was due to instancing, but then I exported the model without instances and it was still double the actual amount.
What might be the cause for this?
During the Dev alpha we noticed it
(In 2020 it wasn’t important, but the vertex count was still the same)
Quoting a post from my discord in October 2024
This is the only explanation possible
Which makes sense on the counter: it doesn’t count individual vertices,
It count the number of vertices needed
To generate the triangles that compose each face
A good explanation
Infact, if you plop the model model into any glTf viewer, you will notice that the in-game vertex count is somewhat pretty close to them
This limit comes from the glTF itself - we add static_vertex_count
and skinned_vertex_count
.
The whole algorithm is as follows:
- Parse all the scene nodes
- If the node has a mesh & the mesh hasn’t been processed yet
- If the node is skinned
- Add the mesh vertex count to
skinned_vertex_count
- Add the mesh vertex count to
- Else
- Add the mesh vertex count to
static_vertex_count
- Add the mesh vertex count to
- If the node is skinned
- If the node has a mesh & the mesh hasn’t been processed yet
Best regards,
Eric / Asobo
Since the question was asked in the LODs topic too, I thought I’d provide a bit more explanation:
- The glTF format is used so that the buffers provided in binary format can be sent directly to the GPU.
- For the GPU, a vertex is not only a position in space but also includes attributes (normals, uv-coordinates)…
- Hence depending on your object, a single vertex in space may be shared by multiple faces for which some of these attributes are different (think a cube with hard edges where each corner exists 3 times with 3 different normals).
In case this is useful, the topic has also been discussed here.
Best regards,
Eric / Asobo