OpenBVE icon indicating copy to clipboard operation
OpenBVE copied to clipboard

[Question] How many vertices are currently supported in a single .b3d file?

Open BPI-919 opened this issue 4 months ago • 3 comments

Description

Hi,

I have recently seen in the developer documentation, that maximum 65534 pieces of Vertex command can be accepted in 1 .b3d file.

Screenshot_2024-09-28-15-46-35-933_org mozilla firefox

I was thinking about the related warning messages appearing in Object Viewer, and I took a look at the source code, and I think I found an interesting thing...

Screenshot_2024-09-28-16-14-58-501_org mozilla firefox Screenshot_2024-09-28-16-15-07-904_org mozilla firefox

As you can see above, according to the (source code) warning message, 65535 pieces of Vertex command is still acceptable.

So can you please clarify the maximum number of the supported Vertex commands in 1 .b3d file?

65534 pieces of Vertex command - allowed 65535 Vertex - still allowed (?) 65536 Vertex - not allowed (too many vertices)

Or 65536 is still supported, because in the source code, a[j] starts from 0 and ends with 65535, which means 65536 pieces of vertices are allowed (?).

I am also curious about the appearance of the [MeshBuilder] s: What happens if I try to load an .b3d object with e.g. 65540 vertices / too many vertices ? Let's say that 65532 Vertex commands are in 1 [MeshBuilder] , and the rest 8 Vertex commands are in another 1 [MeshBuilder] . In this case, the whole of the first [MeshBuilder] appear properly, and the second one does not appear at all, or will the loading of this .b3d object file produce another / different result(s)?

Thanks in advance for your answers!

BPI-919 avatar Sep 28 '24 15:09 BPI-919