Memory requirements and level creation/loading

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.
Post Reply
sd
Posts: 11
Joined: Wed Feb 27, 2008 4:18 am

Memory requirements and level creation/loading

Post by sd »

Hi there,

I have a few questions regarding memory requirements, loading levels, etc.

How would I handle a large open area level (like in Zelda: Ocarina of Time there is a large open grassy plane). Should I use a Quake 3 level file for that, or should I create my own format for a level?

If you have an .irr file with lots of meshes in it (say hundreds or thousands) and you load all that into Irrlicht, will there be any problems with memory or with game rendering speed? (does Irrlicht not care if you have a massive level all loaded? .. does it just do the calcs for the current rendering of the camera and not worry if there's heaps of other stuff out there loaded in the 3D space? That is, should I write some special code to divide up my own level format into partitions and load each partition as I need it because you can't stick it all in memory else Irrlicht will slow down or something? Sorry I don't know the right terms for this, but you should get my gist.

I read from another post that Quake 3 levels are for first person shooter type games? But .irr files are something like project files, where you can store the positions of meshes and store animators, etc?

Thanks,
sd.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Irrlicht does two things for you. It has mesh and texture caches, and it does frustum culling.

Every mesh and texture you load takes up memory. The mesh and texture caches are there so that only one copy of any mesh or texture is going to be loaded into memory at a time.

The scene manager does automatic frustum culling. This prevents meshes that are far out of view from being rendered. This reduces CPU load and should theoretically improve frame rate.

Other than that, it is up to you to write you application to avoid loading anything into memory that isn't necessary. If your environment is very large, you must write your own system for loading and unloading things as needed.

Travis
sd
Posts: 11
Joined: Wed Feb 27, 2008 4:18 am

Post by sd »

Thanks, that seems to have answered my questions for now. :D
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

The scene manager does automatic frustum culling. This prevents meshes that are far out of view from being rendered. This reduces CPU load and should theoretically improve frame rate.
do i have to set the culling or sthg? when i create for example 60 fearies and move away from them, so that they are not drawn (or to small) my fps are still very low (without faeries: ~400, with faeries: ~40-60 no matter how far i move away).
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The meshes are still animated (because animation could affect the culling). You see a CPU limit here, doesn't matter how much is really rendered.
Riceman
Posts: 9
Joined: Tue Dec 30, 2008 8:40 pm

Post by Riceman »

Similarly, is it incumbent on the coder to write code for a "perpetual" world - that is, a game world that only loads what the player has in his immediate area - or does Irrlicht have an existing library or module that provides this?
Post Reply