Archive for February, 2009

Oops, I broke the site

Saturday, February 14th, 2009

Note to self: From now on do not use the automatic update feature of WordPress.

Doing this broke my theme and thus my site, as it decided to overwrite it with the default one. My custom theme was a heavily modified version of the default and I never bothered making a new directory for it so I guess it was entirely my fault. All the background code and design changes I had made meant that the “updated” theme files broke the layout entirely and resulted in some sort of strange love-child between this site and the default WordPress theme. Luckily the nice people at my webhost company had an automatic backup from two days ago so they found my theme and gave it back to me. Thank you Register1! *kisses*

To be honest I’ve been thinking about changing my theme for a while now anyway, there are a few design problems with it. I’ve tried tweaking it a lot to make it so the text is more readable on a blueish background but I can never get a high contrast without changing the font colour to white, which I am not going to do. I’m thinking of incorporating more design elements from my “Vote Campaign” design that I made a while back (it’s on my projects page) seeing as he never actually used it in the end. Specifically I want to change the colour scheme so the main text is on a white background, though more changes may be included. Only problem is that I should probably remove the “Vote Campaign” design from my portfolio if I make it too similar to this site!

Anyway, we’ll see what happens. I’ll likely just work in the background on the next design until I’m happy enough with it to take the plunge and change over. This one works for now and I don’t exactly want to break anything.

Anything more that is.

-Thomas

GTD – Planetary objects

Monday, February 9th, 2009

It’s been a while since the last update, and unfortunately it’s likely to be a little while till the next one due to upcoming university coursework. I’ll still try to spend a couple of hours every few nights on this though if I can.

Anyway onto the update. Firstly I’ve fiddled about with the atmospheric settings to add a bit of a more “blinding” effect from looking at the sun, though I feel it might be overdone for when you’re not looking at the camera. Maybe something to add would be a modifier that increases based on how central the sun is to the screen.

Secondly I’ve added some planetary objects to the previously empty sky. There is now a sun which orbits the sky during the day and stars which become visible at night. Pictures below!

From inside the dome - Click to enlarge images

011-inside-dome-day 011-inside-dome-night 011-inside-dome-nightmore

From outside the domeClick to enlarge images

011-outside-dome-day 011-outside-dome-night 011-outside-dome-nightmore

I have also been working on other parts of the engine. I added a modified version of my camera from “Blocks” with the physics interactions stripped out. I have also been learning how to use vertex/fragment shaders, I planned on converting the sky calculations to the graphics card but I may save that for another time now. In the more immediate future I plan on using shaders to add dynamic shadowing to the terrain, possibly using the shadow-mapping technique.

GTD – Atmospheric scattering

Sunday, February 1st, 2009

I’ve almost finished implementing the base for the sky, using the SkyDome technique. Instead of a skymap or a colour table I decided to use a simulation of how light actually scatters in our own atmosphere for a (hopefully) more realistic approach. This means that I also have a day/night cycle, albeit currently it takes a total of one minute to complete the cycle as opposed to 24 hours! Screenshots below.

Wireframe of the SkyDome

009-skydome-wireframe

The sunrise (NB: the actual sun itself isn’t drawn yet)

010-skydome-atmospheric-scattering010b-skydome-atmospheric-scattering010c-skydome-atmospheric-scattering010d-skydome-atmospheric-scattering010e-skydome-atmospheric-scattering010f-skydome-atmospheric-scattering

I also had a few rather interesting glitches while implementing this. When I tried to first display it I put every colour value of the SkyDome’s vertices to red (um.. because it’s the standard sky colour…? Don’t ask me why!). However I made my colours were stored as RGBA and I was accidentally making the colour pointer read the values as RGB, this resulted in alternating between full red/green/blue colours due to incorrect offsets.

Glitch – Rainbow sky?

008b-skydome-rainbow008c-skydome-rainbow

Not very realistic but interesting as far as glitches go!

My next steps with this sky will be to make it a bit more realistic, there are no planetary objects currently (sun, stars etc) so that would probably be a good next step. Clouds might be added too.