Jump to content

  • Log In with Google      Sign In   
  • Create Account


DX11 - Sponza Scene - Comparison of loading times


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 13 September 2013 - 08:59 AM

Hi guys! wink.png

 

Well I decided to look into the topic of global illumination, and as seen, many of those demos use the Sponza Scene (From Crytek), because of its complexity. And, well, I tried it as well, but my loading time seems quite high just for the Sponza Scene. (Loading the file, creating buffers, and creating a simple texture material).

 

Loading time for my project: 21.9 Seconds (21 for Loading the actual file, ~1 for Creating the buffers) wacko.png

 

For those people who have tried loading this scene before, what are your loading times, are mine terrible?

 

Thanks, as usual.

-MIGI0027



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7436

Like
0Likes
Like

Posted 13 September 2013 - 10:50 AM

What format are you trying to load it in?  Sounds like you might be parsing text, which is never going to be fast; instead you should preprocess the model into a binary format that can be just loaded directly into buffers with a single fread.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 13 September 2013 - 11:03 AM

Well, the thing is that I use Assimp. dry.png



#4 Yourself   Crossbones+   -  Reputation: 1041

Like
0Likes
Like

Posted 13 September 2013 - 12:06 PM

My framework loads the crytek sponza in about 2-3 seconds, though preprocessing ( geometry to binary data, textures to dds, compiling hlsl... ) takes about 15-20 seconds.

#5 DwarvesH   Members   -  Reputation: 433

Like
0Likes
Like

Posted 13 September 2013 - 01:10 PM

Wow, too much. Give me link to the sponza scene and I'll test it. I can load now a few MiB of meshes and about 300 MiB of textures in DDS format in 3-4 seconds.



#6 imoogiBG   Members   -  Reputation: 1021

Like
0Likes
Like

Posted 13 September 2013 - 01:17 PM

3 seconds to load ONLY the geometry (from a text file).



#7 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 13 September 2013 - 01:25 PM

PS. When I mean the load time, I mean:

  • Loading the file (Assimp)
  • Parsing it (Assimp)
  • Triangulating (Assimp)
  • Copying Vertices / Normals / Tangent...
  • Calculating bounding box
  • Create shader/material
  • Create ALL textures.
  • Create buffers (v/i)


#8 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 13 September 2013 - 01:28 PM

DwarvesH: http://www.crytek.com/cryengine/cryengine3/downloads



#9 Jason Z   Crossbones+   -  Reputation: 4691

Like
0Likes
Like

Posted 13 September 2013 - 05:11 PM

Are you testing this in a debug or a release build?  File operations can be significantly slower in debug builds than release builds, so that might account for some of the time.  If that isn't the issue, you might want to profile each of the operations you listed above to see which one is taking the most time.  It doesn't need to be anything fancy, just dump the system time in milliseconds to the output debug area when each process finishes.  That should help you figure out what is going on.



#10 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 14 September 2013 - 02:25 AM

Jason Z:

 

I'm using release build for this.

Thanks! I'm going to start profiling it in a while.



#11 Hodgman   Moderators   -  Reputation: 27686

Like
1Likes
Like

Posted 14 September 2013 - 02:33 AM

What format are you trying to load it in?  Sounds like you might be parsing text, which is never going to be fast; instead you should preprocess the model into a binary format that can be just loaded directly into buffers with a single fread.

Well, the thing is that I use Assimp. dry.png

You can still take your code that uses Assimp and move it into an external tool that you run ahead of time, which you can then use generate a simpler binary file that can be loaded quickly.

#12 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 14 September 2013 - 04:12 AM

 

 

What format are you trying to load it in?  Sounds like you might be parsing text, which is never going to be fast; instead you should preprocess the model into a binary format that can be just loaded directly into buffers with a single fread.

Well, the thing is that I use Assimp. dry.png

 

You can still take your code that uses Assimp and move it into an external tool that you run ahead of time, which you can then use generate a simpler binary file that can be loaded quickly.

 

 

Huh.. Don't know why I didn't think of that, but thanks, I'll give it a try.



#13 DwarvesH   Members   -  Reputation: 433

Like
0Likes
Like

Posted 18 September 2013 - 02:30 AM

Sorry, I've been implementing terrain LOD and did not have time to profile my loading of the mesh. But when I do have time, this 22 MiB mesh will surely be interesting to load and render. I saw the sponza mesh everywhere. Pretty much anybody writing an engine has screenshots with it, but I never used it before. It will be a good stress test for my forward rendering of multiple point lights.



#14 MiniMigi   Crossbones+   -  Reputation: 1434

Like
0Likes
Like

Posted 18 September 2013 - 02:53 AM

Btw.

 

When I said creating all textures, I mean the diffuse, normals and specular.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS