Archive for 2007

CloudWright

Wednesday, September 19th, 2007

I’ve long had an interest in rendering realistic clouds for games. The usual approach – taking photos of the sky and stitching them together into a dome or cubemap – produces convincing skies but has a number of disadvantages. If you want to use high dynamic range, you either need to take a full HDR picture of your sky, or to fake it convincingly. It’s static, lacking the infinite variety of real skies.

CloudWright is a program written with Simul that generates skies. It outputs cubemaps that you can use in-game. It can cover pretty much any kind of “fluffy” cloud with full physics-based lighting – cumulus, stratus, cumulonimbus. The lighting is based on date, latitude and time-of-day information.

Here is some early preview output from CloudWright:

CW2.jpgCW8.jpgCW5.jpgCW4.jpgCW7.jpg

 

The Simul framework helped a lot with this – I could easily build objects with saveable properties, so I didn’t have to worry about file formats – the framework does all the work. In this case, CloudWright just remembers what your data was when you last ran it. Later on I’ll put in a save/load setup and more bells and whistles.

Post to Twitter


DLL’s, entry points and global variables in C++

Tuesday, September 18th, 2007

I recently converted one of my libraries from a statically-linked lib to a DLL. But I found some problems – global variables declared in the DLL were not being initialized – and they ended up with null virtual-function pointers. The reason – I had checked “no entry point”. This seemed sensible as the DLL is a resource, and doesn’t do anything explicit on loading.

But apparently this means it will just leave your globals (actually static class members in my case) completely uninitialized. Neither Microsoft’s documentation, nor googling enlightened me much after discovering this behaviour.

Post to Twitter


Reflection in C++

Monday, September 17th, 2007

In building simul I’ve found it necessary to implement reflection in C++. Reflection is where you can dynamically get information about a class, even use its functions and members, at runtime rather than compile time.

(more…)

Post to Twitter


Starting up

Monday, September 17th, 2007

This is a blog about simul, a framework for software. I guess most blogs are about the author recording his/her thoughts or opinions when he/she feels like it. While I might do this as well, what I mainly want to do here is provide an outlet for simul, so I can explain what it is and get feedback from the software community.

Post to Twitter