Sponza

It’s been a wile since i started in one of those side branchs that i was hope for so long to finish…and i guess the end of the year holidays was a great time to focus on that and achieve that one last milestone for 2020.

For long time loading assets in Mirage been quite…odd..If i want to load a new mesh or texture to test, I’ve to update the code (depends on the difference of that new mesh…let’s say has more textures!), and re-build the source. Not to mention, can only have one single mesh at a time. I remember once i wanted to load Sponza (who wouldn’t!) and i went into an endless nightmare of manual modifications only to fit that “single” file. The fact that sponza made of multiple sub-meshes and many textures, was a big obstacle to proceed in testing back then. Mirage at the time had no support for multiple meshes, or more textures than what I’ve created descriptors for. It’s been quite hardcoded for a fixed number of descriptors, and i wanted to get rid of this for good.

By the end of today, i finally closed that code branch and merging to master shorlty after this article. Merging an old ongoing branch isn’t fun, but it will be done anyways. Now (in the branch, and soon in master) i can load any mesh i want, any textures i want, and all at runtime, which means i don’t have to re-compile. I only browse for the meshes, textures, cubemaps,…etc. and Mirage will read them, and put them in use for me right away! isn’t it great!!!

While previoulsy i had limited support for asset files, but with that merge now i’ve support to read mesh formats such as:

  • OBJ (such as the chest box, the dragon; from my earlier posts)
  • FBX with/without animations (such as the zombie character from my earlier posts, sponza and other tests from sketchfab and Mixamo)
  • glTF & glTF2 (support the overall Khronos medium)

Also have support for texture formats such as:

  • PNG (such as the zombie PBR textures, also screenshots can save to that format)
  • JPG (such as the chest PBR textures, also screenshots can save to that format)
  • TGA (allow screenshots to save to that format)
  • BMP (some cubemap examples, the old school one that come in 6 different BMP image files, also screenshots can save to that format)
  • PPM (allow screenshots to save to that format)
  • PSD (supported quite sometime ago, but nothing used in reality with it)
  • HDR (most of the amazing cubemaps i use are in that format)
  • KTX (to load some cubemaps, and to support the overall Khronos medium)
  • KTX2 (to load some cubemaps, and to support the overall Khronos medium)

And I’m glad to finally be able to load any mesh at runtime, and specially Sponza! Which i needed so bad in order to work on some held post-processing, more advanced rendering techniques and overall all the other tricks that needs a practical full scene not a single chest! It doesn’t look like the most beautiful Sponza right now, but I’m happy to have it around. I’m sure with only shadows, single directional light & may be GI…it would turn to a whole different one!

Also if you’ve noticed, i brushed the depth display a little bit..it looks much much better than before…and if you can remember from previous posts, this particular attachment is very very important for me as i mentioned few times before that i do need it for some interesting tricks.

Soon would need to merge the W,E,R or Translate, Rotate, Scale branch, which would allow me to manipulate the scene meshes to fit my needs. So that might be my next post..idk..Until then, be safe and see you soon..

-m


P.S.

Sponza is a Crytek free scene that was published long time ago for researching and testing purposes, specially for realtime3d. It was originally available here for many year, but seems with the recent years changes at Crytek and their market directions, it is been moved to the new marketplace as a CryEngine product here. You can still easily find the version you want (Obj, FBX, Blend, C4D, Max, Maya,….etc.) if you search on google for that specific format.

Leave a Reply

Your email address will not be published.