Showing posts with label lighting. Show all posts
Showing posts with label lighting. Show all posts

Monday, 27 February 2012

Lights!


Decided it was time to fling some deferred rendering at the project, because who doesn't like taking huge chunks of VRAM to do simple things? Thanks to Jotaf's comments last week, I have a much easier method for making and rendering walls, so it only took a few minutes of Blender-torture to generate new ones.

The question of style is one I haven't resolved yet, alas. Making tech is far, far easier than trying to hang a scene together as a coherent whole. I know the cultural roots the game world will draw from, but not whether to go for a cell-shaded or painterly or somewhat realistic approach. The latter is probably most tedious in terms of rendering tech and modelling, but is almost certainly the easier to at least rough out textures based on photographic sources.

Tuesday, 7 October 2008

Whoops, massive lack of updates

So, many deadlines at work combine with a resurgence of my WoW habit to completely destroy my hobby-code productivity...

With the next expansion looming very near (and a pre-expansion patch apparently within a week), Wowcrack is undergoing some very bizarre changes. I may splurge about the design decisions later, because they're quite interesting even if mostly specific to the online genre.

In the past month I did get a few things done. Some general hackery, a new model to replace the tentacles for general clutter, and a starter particle system (here used to show where the test lights are):



Particles are entirely GPU-side, all the simulation is done in the vertex shader operating on some static random buffers. This means they're only good for simple things, but they're pretty damn quick, entirely deterministic, and quite fun.

'Shrooms need a diffuse texture, and probably a redesign. The problem with things like these familiar mushroom shapes is that from a top-down perspective, they look a great deal like rocks. Bright colours/spots/etc would help with that, but I think a better choice would be to choose a more interesting shape for the fungi and flora. After all, they're present in a vast array of bizarre shapes in real life, so I see no reason to stick with the common toadstool shape in a fantasy cave-world.

With luck, I'll have more time for code and blogging soon. 'Til then, enjoy the minimal sparklies!

Edit: SSAO is turned off in the final composited image at the moment, because it has returned to looking a bit arse. Tricky thing to get right it seems.

Monday, 8 September 2008

Even more deferred tentacles

Just a quicky today.

These are lighting-only shots showing the same scene with and without screen-space ambient occlusion, the latest hacktastic post process to take the rendering world by storm. Unfortunately I have to concede that even my less than stellar implementation does add a lot to the rendering, for a moderate cost, so I guess I'll be jumping on the bandwagon. It's an especially useful technique when combined with deferred lighting, as attempting any real shadowing with a bucketload of small point lights is very bonkers, so the illusion that the faked ambient occlusion provides is doubly useful.

As an aside, I do like my dungeon fairy lights. They add such a nice ambience...

Before (no SSAO):



After (mit SSAO):

Friday, 5 September 2008

Deferred Tentacles

Further work on the deferred rendering side. I finally found an example online using FBOs with a stencil buffer, and thereby discovered that despite using a combined depth-stencil renderbuffer it needs to be attached to the frame buffer object twice, once as a depth attachment and once as a stencil attachment. Sigh.

That done, efficient rendering of small lights via z-and-stencil-tested spheres works nicely!

Behold the scene, containing no less than fifty ickle lights, plus the large shadow-casting light from the player's avatar.


The majority of the screen is taken up by the final composite image. On the right, small sections show a sample of the buffers involved (yes, I don't even turn off my debugging chuffle before posting, I'm that lazy). Top is the SSAO term (very low intensity in the final image, as it looks pants). Below that are the lighting accumulation buffer, world-space normal, and finally unlit diffuse buffers.

Lastly, the image displays some filthy aliasing as the source render targets are only 512x512, violently scaled up to match the screen resolution. I should fix that.

Edit: here's a version using 1024x768 buffers throughout. Ouch, bye-bye framerate. Need to fix my absurd pixel shader usage methinks.