Search This Blog

Wednesday, December 23, 2015

Technique Evaluation: Lighting in Game-Guru

If there's one complaint I have about a lot of the homebrew games I see being made with Game-Guru (GG), it's the lighting.  It's clear people are going out of their way to develop games that they play for fun and usually are decent enough - but the lighting is atrocious.  This is because the default settings in GG are less than ideal for most if any games.  They are great for placing objects and determining where you want things to go though.  In that sense it's great as it shows you exactly what you did wrong because the seams and shadows stand out like a sore thumb.  Which is precisely why you don't want to use that on your base game.

From a previous article on ground clutter - note the very jarring colors/textures.


There are two different types of lighting in Game-Guru:  Interior and Exterior.  Both have different processes but similar methods.

Interior lighting is highly reliant upon placed static lights.  Exterior lighting much less so as the sun (which is not adjustable at this time) handles a lot of it.

I'll get into interior lighting in another article as it requires a significant amount of changes to level design and methodology.

For exterior lighting, you'll primarily be messing with the 'tab-tab' screen.  To reach it, simply fire up the game in test mode then hit tab twice.  Simple, right?

The 'easy game maker' sure has a lot of complicated options, eh? :)

As you can see in the above picture there are a significant amount of options.

Starting from left to right, top to bottom:
  • The 'metrics' are debug information used for troubleshooting speed, efficiency, etc.  That's another discussion for another day.
  • World settings are your most basic settings: What type of sky you want, what  kind of terrain you're using, and the type of 'grass' you can paint on the ground.
  • Quality settings can be summed up as: LOD = how far away things start to get shitty looking to save on rendering cost, how big the 'map' is, and vegetation settings.
  • Camera settings - I almost never mess with this because the defaults are good for most FPS games.  
  • Visual settings - the most relevant panel in the list.  This affects the colors and lighting you'll be using.  I'll go into further detail below.
  • Graphic options:  This is a more 'high end' feature.  It affects water reflection opacity, how 'thick' the shadows are, lightray amount and vegetation.  Occlusion and debug visuals will require hand tuning in your final pre-game tests.
  • Shader options:  I pretty much leave distance transition settings normal and put everything on highest.  
  • Post effects: What happens "AFTER" the lighting is done.  Bloom affects how fuzzy your light will look.  Vignette radius and intensity - Primarily used to give that 'old time horror game' feel.  Motion blur distance - I hate motion blur, so I disable this typically.  Depth of field I leave at 25 out of 100 but this can really give your game a sense of distance so definitely play with it to see what works best.

So really we've established that for MOST outdoor scenes your most important settings are going to be found in the visual settings tab.

 So let's start with the fog settings.  Starting in a previous version, the fog system is actually VERY impressive in Game-Guru.  It's a blended technique vs the brute force method original versions used. So in reality it's actually very good for making scenes have a unified color, which in turn helps unify the theme.  It also blends the distance very well so the horizon isn't as sheared.

A good example of using light fog to unify the color palette and theme.

A side note: On unifying colors the idea is that if you take a color and use it as a base or blend for the others you will help make a scene feel less jarring.  This can take the form of a common color, shape, or in this case - a fog to overlay a blended color.

I recommend setting fog nearest to around 5 and fog distance between 10 and 30.  Then select the colors you want from the R/B/G sliders.  Fog intensity will typically be around 30-40, unless you want a very heavy fog.

Someone overdid the fog and lighting, methinks.

Ambiance level is another slider you wll need to modify often; it's how much of the ambience r/b/g levels are automatically applied to a surface.  This is important because the brighter this is, the overall brighter your textures will be.  I generally find a setting between 15 and 25 is best here if the color bars are at 100.

Surface level will show HOW MUCH light is reflected by your textures.  This is especially important outside as it determine how much of the sun's light is put on your textures!  Often you will find less is more with this engine; setting this too high will cause highly pronounced shadows which at times are good but often just make things look very clean and unprofessional.

Yeah, it's the unreal engine.  This picture illustrates a low level of ambient lighting (around 5-10 in game guru terms) and a high level of surface lighting to highlight the sun's light (think 30-50).

Another important setting here is 'global specular'.  This slider controls the mirror-like qualities of the textures being hit with light.  This differs from the surface level because surface level changes the lighting on the textures themselves... global specular changes how reflective it looks.  Imagine the difference between a white wall and a mirror.  Both can reflect light very well, but the mirror has that telltale bright spot.

Specularity is low on the right and high on the left.

Understanding these settings is important for fine tuning your lighting.  There is no one size fits all here.  Every setting has to be carefully measured and tested but it does no good for you to not know what they do or how they work.

Let me know in the comments if this helps your project!

No comments: