I don't think sscanf has anything to do with it. You should notice that there are no calls to the driver (DirectX?). There are no symbols for these calls so the time is reported under the next symbol above in the symbol table.
The WaitForMultipleObjects seems to suggest multiple threads.
How to decrease texture loading time?
Re: How to decrease texture loading time?
Now that makes more sense. You can't do much to avoid the copy32BitMipMap unless you don't need mipmaps for all materials in which case you could disable them for some materials. I think it's also the one that costs most time in my project right now.
The other one looks like you have really huge mesh in your file (or many small ones - anyway - lots of mesh-loading going on). Which seems to be so big that it costs more time than all the texture-loading. Although it's a little surprising only sscanf shows up that much. Also surprising it's even used at that place - it's certainly not optimal. Still - first take a look at your mesh-sizes, maybe those are not really realtime meshes in which case you will have trouble anyway.
DebugSetLevel is confusing - are you using debug libraries for directX?
The other one looks like you have really huge mesh in your file (or many small ones - anyway - lots of mesh-loading going on). Which seems to be so big that it costs more time than all the texture-loading. Although it's a little surprising only sscanf shows up that much. Also surprising it's even used at that place - it's certainly not optimal. Still - first take a look at your mesh-sizes, maybe those are not really realtime meshes in which case you will have trouble anyway.
DebugSetLevel is confusing - are you using debug libraries for directX?
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to decrease texture loading time?
I have one obj file, converted to .irrmesh format, this is loaded. But it is loaded only after all the textures are loaded. Only that time irrlicht loads the .irrmesh model. The size of irrmesh file is 57MB.CuteAlien wrote:The other one looks like you have really huge mesh in your file (or many small ones - anyway - lots of mesh-loading going on). Which seems to be so big that it costs more time than all the texture-loading. Although it's a little surprising only sscanf shows up that much. Also surprising it's even used at that place - it's certainly not optimal. Still - first take a look at your mesh-sizes, maybe those are not really realtime meshes in which case you will have trouble anyway.
I didn't set up anythink in directx debugging, I just downloaded the required SDK when setting up the irrlicht development environment. I did not made anything else...CuteAlien wrote:DebugSetLevel is confusing - are you using debug libraries for directX?
Re: How to decrease texture loading time?
57 MB sound extremely huge for a model file. I did a quick check and the largest model (obj format) in my current project is 3MB and that has already over 35000 triangles.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to decrease texture loading time?
isn't .irrmesh ascii though, that would explain both the size and the loading time
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: How to decrease texture loading time?
can somebody explain this please? from the console I see, that first the textures are loading. and the last one, which is loaded, is the .irrmesh fileent1ty wrote:isn't .irrmesh ascii though, that would explain both the size and the loading time
(of course everything is inside one .irr file)
Re: How to decrease texture loading time?
So is the .obj format.ent1ty wrote:isn't .irrmesh ascii though, that would explain both the size and the loading time
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to decrease texture loading time?
Hi,
I'm still dealing with this stuff...
So the initial conditions are the following: I have an .irr file, an .irrmesh file (size is approx. 50 MB), an .obj file and an .mtl file.
house.irrmesh 58,824,784 bytes
house.obj 23,417,887 bytes
house.irr 1,433,932 bytes
house.mtl 24,396 bytes
The problem is, that the texture loading time of the 154 jpg textures is more than one minute. Size of the directory is 40 MB.
I tried out, what happens, if I load the textures into memory as a very first step in the main() function:
When I execute my app, I can see, that the textures are loading much faster, when loading from the original place (via .irr file). But, when the code reaches the .irr file loading part, my application crashes without any informative window...
I thought, that with this method, I can include some kind of multithreading to this texture loading part, and if the textures will be in memory in the beginning of my application quickly, than the .irr file loading process will not load them once again.
Experts, please comment.
Thanks!
I'm still dealing with this stuff...
So the initial conditions are the following: I have an .irr file, an .irrmesh file (size is approx. 50 MB), an .obj file and an .mtl file.
house.irrmesh 58,824,784 bytes
house.obj 23,417,887 bytes
house.irr 1,433,932 bytes
house.mtl 24,396 bytes
The problem is, that the texture loading time of the 154 jpg textures is more than one minute. Size of the directory is 40 MB.
I tried out, what happens, if I load the textures into memory as a very first step in the main() function:
Code: Select all
IImage* ThreadTexture = 0;
device->getVideoDriver()->addTexture ( "pictures\\recorder_texture_512.jpg" , ThreadTexture , 0 );
device->getVideoDriver()->addTexture ( "pictures\\bookshelve1.jpg" , ThreadTexture , 0 );
device->getVideoDriver()->addTexture ( "pictures\\bookshelve2.jpg" , ThreadTexture , 0 );
...(+151 more lines)
device->getVideoDriver()->getTexture ( "pictures\\recorder_texture_512.jpg");
device->getVideoDriver()->getTexture ( "pictures\\bookshelve1.jpg");
device->getVideoDriver()->getTexture ( "pictures\\bookshelve2.jpg");
...(+151 more lines)
I thought, that with this method, I can include some kind of multithreading to this texture loading part, and if the textures will be in memory in the beginning of my application quickly, than the .irr file loading process will not load them once again.
Experts, please comment.
Thanks!
Re: How to decrease texture loading time?
OpenGL is not thread-safe. You should only use one thread to load textures.
Re: How to decrease texture loading time?
I'm using Direct3D only.