MAV when trying to add vertices triangles to surfa

Blitz3D Forums/Blitz3D Programming/MAV when trying to add vertices triangles to surfa

RemiD(Posted 2013) [#1]
Hello, :)

I am creating a simple demo with many particles rendered on the screen.
Some must be able to turn/move, some are static.

I have decided to keep the turning/moving particles as separate entities and to merge all static particles in one or several surfaces of a mesh so that it is faster to render.

Each static particle is added to a surface until the surface has 48534vertices/16178tris (more and i get a mav at renderworld()), then a new surface is created and the others static particles are added to this new surface.

It works well, and the render is fast enough, but sometimes i get a mav at renderworld()

I guess that this means that there is a maximum amount of vertices and triangles allowed per mesh ? Or is it dependent on the graphic card ?
If yes, a way to avoid this would be to create several meshes with only 1 surface instead of trying to create only 1 mesh with several surfaces ?

Your thoughts ?

Thanks,


Floyd(Posted 2013) [#2]
I think the limits on triangles and vertices are per surface.

There have been many discussions of this over the years. It seems like the DX7 limit should be 64K. But when this is tested some people say they have problems at 32K.


RemiD(Posted 2013) [#3]
64000 triangles ? 32000 triangles ?

It seems that the limit is more around 16000 triangles per surface (16180 to be precise) on the computer i have tested it on. It is surprising because i have bought this computer (new) in July 2012.


Floyd(Posted 2013) [#4]
Triangles and vertices both have limits, which could be 32K or 64K, or something.

If you have trouble with 16180 triangles then, since you are certainly under the triangle limit, you must have exceeded the vertex limit. From your earlier example it looks like there are no shared vertices so you have 48540 of them.

It does seem odd that trouble would arise near 48K rather than 32K or 64K. But other people have reported strange numbers with different graphics cards and drivers. Some have even claimed problems near 32K and were using a slightly smaller number, such as 30K, to leave a safety margin.


RemiD(Posted 2013) [#5]
Hello,

I have done some tests and the limit seems to be around 32000 vertices or triangles per surface on my computer. So now i limit the maximum number of vertices or triangles per surface at 30000 (to be safe) and i have no more mav at renderworld() even with 15 surfaces.
I have also tested on 2 others computers and it works well.
Good enough for me.