Blender to babylon Vertex and Indices Count

Hey guys,

I am optimizing a relatively complex mesh.
What dazzles me is the difference in vertex counts in Blender and Babylon as well as active indices.

Right now I am at:
Left Blender, Right Babylon:
Vertex: 47,944 / 106,172
Faces: 41,924 / 102306
Active Indices: - / 306918

What can I do to improve this? Or is this normal behaviour?
Values are taken from the sandbox!

Thanks so much for any help!
Best regards!

Edit:
I guess faces could be down to Triangulation. But is that doubling the vert count?

I think that happens because of some default setting on the sandbox, like showing reflections. @RaananW is that it?

1 Like

Okay, because this is bugging me…

A Blender standard Cube exported as glb has 24 Vertecies inside babylon? So triple?
12 face - double?

Isn’t this rather inefficient? Can I improve on this somehow?

do you see the same in other viewers ? cause it might simply be related to how blender is exporting its data ?

1 Like

Polycount-way-of-calculation differs from 3D engines/software, it depends about the needs of users I guess.

First, here a basic difference:

Blender will count 8 vertices no matter if the cube is flat shaded or not, but a 3D engine will take into account vertex normals, so a flat cube with 8 vertices will become a 24 vertices one when smooth-shaded but with autosmooth enabled (I made a Blender addon to get a more accurate polycount - but not enough sufficient until I take the time to do some maths… could be long).

You will also have UV coords which are probably count in the Inspector Stats tab, and maybe some other properties that I can’t remember right now.

By the way, talking about my addon, I’ve tried to compare between some software what polycount is shown for the same object, here the results so far that I still don’t explain :joy:

6 Likes

Ah okay thanks!

So I don’t export anything stupid. It’s just a calculation thing!
That clarifies a lot. Thank you!

1 Like

Triangles are triangles. While that might be just a touch obvious, it does not matter whether flat or smooth. Blender can also have lines, quads, and more. Everybody has triangles. Vertices can also be different in Blender & BJS due to multi-materials. Border vert in BJS are doubled up, while not in Blender.

So in Blender, I just look at the triangles. It will be equal to the size of Mesh.indices() / 3. I never even bother to look in BJS, because it has this thing for vertices. This whole totalVertices() in BJS is kind of irrelevant. This is the reason in the log & csv files of the .babylon exporter I now report in triangles.

4 Likes