Page 1 of 1

Maximum number of faces in a Mesh

Posted: Sat Jan 09, 2010 5:08 am
by IdeasVacuum
Is there a maximum number of Mesh faces that Engine3D can handle?

Re: Maximum number of faces in a Mesh

Posted: Sat Jan 09, 2010 12:17 pm
by Fred
There is a maximum per mesh, like 65000 IIRC.

Re: Maximum number of faces in a Mesh

Posted: Sat Jan 09, 2010 12:54 pm
by Kaeru Gaman
is it the max of faces or the max of vertices, Fred?
exactly 65000 or 65535?

... just for interest ...

Re: Maximum number of faces in a Mesh

Posted: Sat Jan 09, 2010 1:01 pm
by Fred
yes 65535 (2^16)

Re: Maximum number of faces in a Mesh

Posted: Sat Jan 09, 2010 11:25 pm
by IdeasVacuum
Sorry chaps, is that 65535 faces or 65535 vertices max?

Re: Maximum number of faces in a Mesh

Posted: Sun Jan 10, 2010 1:57 am
by Fred
I think it's vertices (IIRC).

Re: Maximum number of faces in a Mesh

Posted: Sun Jan 10, 2010 3:06 am
by Kaeru Gaman
sounds reasonable to me:
the number of vertices normally is higher than the number of faces.
maybe you can construct special cases where the number is equal, but it is impossible to have less vertices than faces.
so, use 16bit for each listindex, max number of faces and of vertices is 65535,
but vertices is that what you need to watch because it's higher.

PS:
oops.. I think I found an exception:
correct me if I'm wrong, but I can describe six triangle faces by fife vertices, can't I?

Re: Maximum number of faces in a Mesh

Posted: Sun Jan 10, 2010 5:58 am
by IdeasVacuum
Thanks chaps!

Re: Maximum number of faces in a Mesh

Posted: Sun Jan 10, 2010 12:33 pm
by Kaeru Gaman
addendum:

it's no exception, it's the lower border:

the minimum number of vertices in a mesh is the number of faces minus one.

to construct a mesh, you need at least one vertex per face, because the other two vertices can be defined by two neightbor's vertices.
you can construct a perfectly closed mesh, where each face is connected to others.
the last face to insert will not need an own vertex but just close the last gap.