Out of the Shadows

Ahhh. Shadows. Fixed.

It was “me” – but in the weirdest, most odd manner.

WARNING! Techy Talk! Move on for the pictures… šŸ™‚

It seems my matrix multiplication code (working just fine and dandy for the past x years) seems to be “broken”. I finally tracked the problem down by shifting all the matrix multiplication code into the vertex shader, and letting the GPU do the job for me and voila… shadows appeared in all the right places.

The bizarre thing is – if the matrix multiply code is wrong in 666, then I don’t understand how camera orientations, or scene graph nodes can all work just fine – as they all use matrix mults extensively… clearly, I still have some weirdness I’ve overlooked – so I’ll need to keep digging. I have to fix 666Ā as the matrix-mults can’t be left in the vertex shader – it means they’llĀ be done for every single vertex in every single model being rendered which is a major (and needless) processingĀ overhead.

Anyway! That’s boring! Show me the Shadows!

Here, we have a shot of a nice Imperial Naval Destroyer, pre-shadow-goodness… (and yes, you will be able to Captain one of these in game – if you are really, really good…)

sans-shadows

Textured, lit, normal mapped, specular mapped, detail mapped.

 

And here, in all it’s real-time glory, shadowed…

with-shadows

All the previous, plus shadow map.

 

Now, I knew what to expect, but as soon as the shadows appeared the sense of “depth” they added was remarkable. The ship suddenly turned from a renderingĀ of a mere model into a pictureĀ of a real thing.

It looks even better when moving about – and there would have been a video this time,Ā except that after the latest Windows 8.1 updates I applied yesterday, FRAPS has decided it no longer works with Windows 8.1… neither does Bandicam… all I get is black video from both. šŸ™

Anyway – this is only the model viewer. Once I install the shadow maps into the Dominium rendering pipeline and get some real goodness on the go – then I’ll see about fixing the video recording issue.

There is still lots of work to do on shadows Ā – there are some visual artifacts which need dealing with, and if you look closely, the shadows at the front of the destroyer are fainter than those at the rear – they need balancing across the entire depth-range. Also – the in-game system will optimise shadow map usage and rendering across the entire scene, but that’s way down the dev roadmap.

In other news… I’ve also finally made the additional edits to Chapter 1 of Book 1, and committed myself to getting it proof read. I’m polishing all of Book 1 and planning onĀ sending it chapter by chapterĀ for any further suggested changes.

Next : (Hopefully!) In-game shadows…

 

SHARE THIS POST

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Mak View all posts by

Comments are closed.

Get an awesome sticky message bar!Download