[Solved]Irrlicht crashes at vertex array sized 65535?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
primem0ver
Posts: 57
Joined: Sat Oct 11, 2014 11:07 pm

Re: [solved] Irrlicht crashes at vertex array sized 65535?

Post by primem0ver »

ralian wrote:If I'm correct, you should just create your 'indices' array as an array of u32 instead of u16, then you can reference vertices past the u16 referencing limit.
Really, you shouldn't be trying to cram that many polys into a scene though, unless you're doing something graphical that will be rendered once :) You'll find
that drawing that many polygons will be quite slow.
Umm... I hope that isn't true. This isn't really that fast if it is. Using DirectX 9c for .NET for example, I have a mesh that has over 10 times as many VERTICES and it is being drawn at 20fps. To be exact, the object has 665,610 vertices and 1,331,200 triangles. The mesh is a spherical colored ISEA grid with an appeture of 8. This means that each of the 20 triangles on an icosahedron are subdivided (quadrupled) 8 times to emulate a sphere. With an aperture of 7, the mesh will have 174,090 vertices and 348,160 triangles. At this resolution I get a full 60 fps. Is doing this going to be a problem with Irrlicht? (I don't think indexing with that number will be a problem since each of the 20 sides is its own triangle list).
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [Solved]Irrlicht crashes at vertex array sized 65535?

Post by CuteAlien »

Limits are generally the graphic-card and not the engine. But that stuff depends a lot on the type of triangles. If your whole mesh is static for example it can be kept on the graphiccard and will be a lot faster (you have to mark it as static). And materials and lights will often matter more than polygon numbers. But hard to have any general numbers for that stuff. More than a quarter million polygons would be nothing you use for a typical game object (well, maybe for a whole scene). But there's just too many factors - you have to try what your card takes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ralian
Posts: 28
Joined: Tue Nov 11, 2014 1:00 am

Re: [solved] Irrlicht crashes at vertex array sized 65535?

Post by ralian »

primem0ver wrote:
ralian wrote:If I'm correct, you should just create your 'indices' array as an array of u32 instead of u16, then you can reference vertices past the u16 referencing limit.
Really, you shouldn't be trying to cram that many polys into a scene though, unless you're doing something graphical that will be rendered once :) You'll find
that drawing that many polygons will be quite slow.
Umm... I hope that isn't true. This isn't really that fast if it is. Using DirectX 9c for .NET for example, I have a mesh that has over 10 times as many VERTICES and it is being drawn at 20fps. To be exact, the object has 665,610 vertices and 1,331,200 triangles. The mesh is a spherical colored ISEA grid with an appeture of 8. This means that each of the 20 triangles on an icosahedron are subdivided (quadrupled) 8 times to emulate a sphere. With an aperture of 7, the mesh will have 174,090 vertices and 348,160 triangles. At this resolution I get a full 60 fps. Is doing this going to be a problem with Irrlicht? (I don't think indexing with that number will be a problem since each of the 20 sides is its own triangle list).
I do apologize, I meant one scene node.

And yes, I shouldn't have assumed OP knew to use delete. New is probably better practice in general.
Post Reply