Thursday, January 19, 2012

Episode 1 - Reflections and more

2012, Week 3 - No matter how passionate a coder you are, at some point in your life you'll find that your home programming hours have become so scarce and far between that it becomes hard to keep the flow going of whatever hobby projects you are working on (and your are working on hobby projects, right?). 

For me, detailed planning and structuring really kill motivation if I know my next opportunity to put another half hour into it is at least a week away. So now I'm trying something new: I'm just going to write down whatever I'm working on this week, add some imagery, and hopefully when rereading it'll look enough like I'm actually Getting Things Done to keep me going.

Added convenient SkyBox support to the office 3D engine, which I also use to do at-home 3D prototyping. Currently only supports a cubemap texture, for this example I've used one of the great sets by Emil 'Humus' Persson. I used the DirectX Texture Tool from the SDK to stitch the texture together into a single cubemap, which took a surprising amount of processing time to do its job and then spit out a huge 98mb cubemap. I'll sure I'll get around to fixing that huge file size later, but for now it works... and it sure seems to load quickly enough.

Reflection & Refraction
Time to get some basic shaders up and running. Did a basic reflection shader, then a basic refraction shader. Rather unsure about picking the "best" refraction ratio, settled for something that results in the standard "backdrop looks upside down when seen through a sphere" look.

Finally, I combined the two shaders into one and included a tint color. It only colors the refraction bit, not the reflection. Not entirely correct, but in general it gives the look I was after, and isn't that what graphics programming is all about?
  • Started a new test project that should give me some legroom to do some experiments. Revived support for full frame rate vsync timing in the 3D engine, because the fixed rate timer was getting in the way of kkapture capturing... or so I thought. Turned out to be the aweful high resolution uncompressed AVI video playback on my laptop.
  • Worked out a very awkward way of recording YouTube video using kkapture to do the uncompressed capture, VirtualDub do stitch the AVI segments back together, and finally x264 to compress into MP4. At least two of the components in this workflow refuse to be properly automated from the command line, but for now it works.
  • Played around with the Protrekkr playback source, planning to research options for getting it to run with Delphi, perhaps through the Object File Converter?
  • Played around with kkrunchy, verified that for <64kb C++ applications it does indeed run circles around any other cruncher. Need to figure out how to get it to properly pack a Delphi application.

No comments:

Post a Comment