Maximum number of faces in a Mesh

Advanced game related topics
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Maximum number of faces in a Mesh

Post by IdeasVacuum »

Is there a maximum number of Mesh faces that Engine3D can handle?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Maximum number of faces in a Mesh

Post by Fred »

There is a maximum per mesh, like 65000 IIRC.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Maximum number of faces in a Mesh

Post by Kaeru Gaman »

is it the max of faces or the max of vertices, Fred?
exactly 65000 or 65535?

... just for interest ...
oh... and have a nice day.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Maximum number of faces in a Mesh

Post by Fred »

yes 65535 (2^16)
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Maximum number of faces in a Mesh

Post by IdeasVacuum »

Sorry chaps, is that 65535 faces or 65535 vertices max?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Maximum number of faces in a Mesh

Post by Fred »

I think it's vertices (IIRC).
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Maximum number of faces in a Mesh

Post 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?
oh... and have a nice day.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Maximum number of faces in a Mesh

Post by IdeasVacuum »

Thanks chaps!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Maximum number of faces in a Mesh

Post 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.
oh... and have a nice day.
Post Reply