Too long to load (.irr) scene

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Too long to load (.irr) scene

Post by st0ph »

Hello Irrlichters :)
I have created a .irr scene, but it takes about 3 minutes to load when I use it in the game,
so I'm asking is there a way to speed up the loading of my scene, and if not is
there a way that I could play an animation or a video while my program loads the scene !

Thanks in advance.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Too long to load (.irr) scene

Post by ACE247 »

First, please describe what exactly you do/have in a scene that takes so long. There is probably alot of optmization to be done.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: Too long to load (.irr) scene

Post by st0ph »

@ACE247 I have modeled my school in Blender, after that I used CopperCube to add lights and other effects then I exported the scene to a .irr file (35 Mo) which I loaded into my game with :

Code: Select all

sceneManager()->loadScene("terrain.irr");
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Too long to load (.irr) scene

Post by sudi »

st0ph wrote:@ACE247 I have modeled my school in Blender
i see.. :twisted:

anyway how many lights are in the scene? how big is the model? 35Mo is that supposed to mean 35mb? How many textures? how big are the textures?
if your model file is 35mb and you create an octree from it, it might take some time to process it. you might want to break up the mesh into smaller parts.
Last edited by sudi on Sat Feb 23, 2013 11:58 am, edited 1 time in total.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: Too long to load (.irr) scene

Post by st0ph »

Yes I meant 35 MB (in french we say Mega Octet), and I have about 50 lights and the textures are not big (300 KB max).
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Too long to load (.irr) scene

Post by sudi »

well since its a building an i guess you modeled the interior as well. So the thing is, thats normaly not how its done. You have probably a lot of redundant meshes in there. i would suggest you take the building and place everything inside it with the sceneeditor. this should speed up loading. after that you probably want to batch rooms together to speed up rendering. or you create a portal scenemanager.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: Too long to load (.irr) scene

Post by st0ph »

Actually I modeled just the outdoor of my school : the garden, the buildings just from the outside and some stairs !
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Too long to load (.irr) scene

Post by sudi »

you got a screenshot(s). besides what i said about chairs applies to plants as well and every other repeating geometry
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: Too long to load (.irr) scene

Post by st0ph »

here is some screenshots :
Image

Image

Image

Image


Image

So you mean that I should add the repeating geometry elements programmatically and not all in irr file ?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Too long to load (.irr) scene

Post by hendu »

None of the images work here.

Some points:
- .irr is a XML file. Those are going to load slow.
- have you profiled where it spends its time?
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: Too long to load (.irr) scene

Post by st0ph »

yes indeed
during the loading I noticed that it takes more time to load the grass and the floor textures. which is normal I had to cover all the floor with textures :3
Post Reply