The final demo and documentation is now finished. Find them here:
Demo files
Implementation notes pt. 2
Post mortem
The implementation notes complement the post mortem document and are meant to be considered together. Presentation to be completed in the coming days (although It will be brief, the demonstration of the demo being the focus of the future presentation).
During the week I set up ordinary lighting and experimented with parts of the algorithm (one thing is certain: there are a lot of things you can do differently on this topic), but I don’t think I got the lighting quite right (though it does serve for demonstrative purposes) and most of the experiments were ultimately rejected. After that I made some structural changes and increased the number of changeable parameters for demonstrative as well as practical purposes. Finally I created some (3) presets for the demo that can now be loaded with the improved GUI. This marks the final changes before the deadline and has been made available in the public build section. I might put up some screens later but for now focus lies on finishing the documentation.
I decided to simply use an existing sample scene + some hdr skies for the demo in production, not like I have time to do anyting elaborate now anyway. I had some serious trouble getting the implementation to work with it though, the screen would suddenly go black without any discernible reason and without going back. Ultimately I found that it seems to have to do with OpenGLs basic texture manipulation functions, specifically the detail map for the terrain as it work now that it is removed. I also fixed an old problem with the lum adaptation related to the fact that the shader has to take in the value from the previous frame which I originally did with one texture by not clearing the backbuffer at render time. This caused the adaptation to occasionally fail to work, ending up black. It was solved by using two textures that are switched between frames.
For now I’m working on getting the settings to work well and expanding the GUI for the demo. There isn’t much left to do but on the other hand there isn’t much time left to do it since the deadline for the final milestone is next monday (whence ‘The Final Strech’). The plan is to devote the weekdays to making the most of the demo and then producing the documents over the weekend (heck, it’s worked before). Expect more entries over the next couple of days.
And so the floating point texture support has been implemented! It’s been quite a journey that deserves some implementation notes of its own when the milestone comes around again but here is a basic rundown of how things have progressed:
I began by compiling the tools provided by ILM, a process that took a while but tought me quite a bit about using libraries. The thing is that though the tools are simple to compile in Windows using Visual C++, I am now using MinGW which wasn’t as simple to get to compile in windows, involving getting POSIX thread support for windows using this library and then compiling it all using MSYS so to be able to use the provided makefiles and autoconfig stuff. It also involved changing some parts of the files (mostly the order of defines and imports).
Pretty much simultaniously I was writing the loader class for Irrlicht. Irrlicht supports adding new image loaders (and writers, though I didn’t add writing support) using a function, so adding new loaders is simple. I also made changes in the engine to further enable floating point textures. At first however the colors came out wrong, appearing purple with little spaces between all pixels. This turned out to be because of a section of the texture class that I had missed.
Finally, I don’t remember if I have mentioned it before but previously I have been unhappy about the final image appearing too dark. This problem has now also been solved purely incidentaly as I was looking for some other errors. It was because of some values used in the luminance calculations that ended up as zero causing abnormaly high or even infinite values or numeric failures. This also solved a known problem with black pixels causing similar infinite or corrupt values.
With this the functunality is pretty much finished. From now on I will be building the scene (which I decided to put less emphasis on, focusing instead on fixing the technical aspects). Finally I will see about creating further effects if I have time before writing the final documentation.
I’ve begun work with implementing floating point textures. Specifically I choose the OpenEXR format created by Industrial Lights and Magic and released as an open standard along with several tools. It is difficult work, just figuring out how loading and displaying images in Irrlicht is hard enough and then supposing I’ll have to make some changes in the general framework to allow the type to be used worries me. As far as I can see the tools provided by ILM can be used to do the actual loading of the files, hopefully allowing the image loader to get the data and use it. This may take a while longer though.
Lastly I finally put up that public build. Find it <removed since the final demo is now available in the MS3 section>. I also added a link to it on the sidebar <removed> so in the future I’ll just note that a new build is available.