Search This Blog

Thursday, June 16, 2016

Technique Evaluation: GameGuru Interior Lighting.

It's been a while since I've posted something of value to this blog, so I figured it was high time to flex my gamedev muscles, as it were.

Now Game Guru is not breaking any kind of records for most amazing engine, but you can do some very impressive things with it's rather primitive system.  However if you don't know what to do, how to do it, and what buttons to push you're going to end up with something that is about as far from AAA as you can imagine.

For the purposes of this demonstration, I'll be using Voodoo's free Sci-fi wall kit.  You can find it here:https://forum.game-guru.com/thread/212111  You'll need a game-guru forum account.

I've made as simple rectangular room consisting of a door, a fake door, and 4 corner pieces as you can see:

Not much to see here, yet.

The interior is pretty plain too:

 Definitely not much to look at.

So at this point, like a good little gamedev you add clutter elements and discover, to your dismay, that it looks... tremendously amateurish.

Ah yes, nothing says "Bad indy game" like completely absent shadows.

So you check your default lighting settings in Game-guru and discover, to your shock, that you have shadows turned all the way up!  How can this be?!
Default settings, ahoy!

Now I'm no fan of the default settings; my previous Technical Evaluation "Lighting in Game Guru", specifically went over ways to improve and unify scenes to bring better quality to your games.   

THIS IS EVEN MORE IMPORTANT ON INDOOR SCENES.

Now let's pretend you read the previous article and configured your lighting settings with some bare bones fog, better ambient/surface levels, etc.

 You can hardly tell the difference, it just looks darker.

While things don't seem to have changed much, you've already set the stage in the most important ways possible.  One major pain of the stock settings is the surface levels being too light and literally reflecting the generated sun's light INDOORS.  Scroll back up and look at that first picture.  See that far left wall... how much brighter it is?  That's because it's reflecting the sun's light, even though it's inside.

To fix this we have to configure indoor lighting.  We start with the above - slight fog, unified settings, better ambient/surface values, etc.

Then we have to configure the component pieces (walls, specifically) to be static objects.  This is because we'll be using static lighting and the built in lightmapper.

Green is not your friend here. 

At this point once you go to the properties on the wall objects you'll see a screen like this.  The green means it's a dynamic object.  Since this is a wall, it should be static.  Choose static and select YES .. then go down to Physics On and choose NO ... this combination will prime the pump, so to speak, for lightmapping.



Next we need to add an interior light.  Go to your 'markers' tab on the left of game guru and choose a light source of the color you prefer.  I chose white. Place these objects carefully within the perimeter of the room.

The editor's tendency to select irrelevant objects can make this a learned skill.

 Make sure at this point you go to the properties on said light object and set it to static as well by setting it's static value to YES.  The process is identical to what you did with the bunker pieces.  One interesting thing about this is even though you see the light in the editor from the static light, running the game right now will have zero interior lighting.  This is because static lights ONLY function in conjunction with the lightmapper.

Please note in the above picture there's still NO INTERIOR SHADOWS. In order for you to get interior shadows, you must use the lightmapper.  All we've done to this point is set the stage for that to happen.

To begin lightmapping, open your level and press F1,F2,F3, or F4.  F1 is the fastest, F4 is the longest.  In order to do proper interior lighting, you must use F3 or F4; F1 and F2 don't seem to do much of anything with respect to interior lighting.

Depending on your level size this can take between a minute or a day and a half.

Hopefully your lightmapping went well the first time and you won't have to do it again.  I had to add an additional light over the chairs and reposition it two or three times before I got the desired result as seen below:

Now we're talking!

As you can see, the lighting is significantly improved.  Shadows add depth and realism, lighting takes on a more natural look.  There's a few caveats - some objects don't produce shadows properly; flashlights never completely get rid of lightmapped shadows, etc.  But overall, it's a massive improvement.  Don't take my word for it - just check out the comparison shot below:


It's not even close. 



This will give you beautiful interior lighting which you can control the intensity of the shadows via the slider on the tab-tab settings screen.   Again, you may need to play with the lighting a few times, or the level color/etc but it doesn't take too much work to further improve it from the above to a finalized version such as the one below:


While you're not going to fight 300 million dollar budgets and win, this certainly is a far cry superior to the initial results; the above is my attempt to create a dark, musty spaceship that seemed like it'd been abandoned for a long time.  Aside from the blood sticking out too much, I'm tremendously pleased with the results.  Hopefully this has been of help to you.  If there's anything you learned here, please feel free to tell me in the comments.

Thanks and see ya soon!




 


New resource for Game-Guru users.

As always, the small but strong community delivers in spades with GG. 

http://freetoronto.org/gameguru/

The above link is a work in progress to convert many of the old packs into freely available (with permission) downloads for GG and the old FPSC.  Check it out!

Also - still waiting on my terrain project to get approved.  It's driving me nuts, been almost two weeks now due to an error in the original zip.  SIGH.

Sunday, May 22, 2016

First update in a while.

As my newborn son (as of the 11th) sleeps in the room adjacent, I find myself with a strange surplus of time I'm not accustomed to during this period of the night.  I've been doing 'game guru daddy time' with my son though religiously and one thing that's remained constant is his love of roads. 

He's set me up to be prepared for something I've wanted to do for a while and it's making pretty good progress.  Screenshot below:


These are some custom normal-mapped 1024x1024 roads which can be used on the fly to simply *DRAW* a road.  A lot of the models I have for roads are from TGC's city pack which, while useful, is a total bastard to work with in terms of making roads. You're constantly struggling with the problem of snapping them together, making them seamless, getting elevations consistent - not to mention the terrain issue of 'rolling hills' makes them impossible for use.

There's other, probably better, products on the store - namely from "Valuable Assets" but I don't want to shell out 8 dollars for something I can whip out on my own.  Once I verify all the licensing and final texture usages I'll put something up at a lowish price (4-6 dollars?).

I've basically got as of current a series of 'muddy splotchy grass' which looks good with vegetation on it:


Now these are textures I've gotten from the web, built normals for, tweaked, etc.  But I need to verify if they're cool to drop on the store or if I need to find more license-friendly ones first.  For now, personal use will do.  After that, I intend to build some simple 'road line' decals for putting lines on the road.
Simple solution to a simple problem, right?


As you can see, a simple asphalt road runs off through some trees, up a valley to the top of a hill.  It has a gentle slope and looks true enough.   This is simply not something you can easily do with a hard model of a road.  I literally threw this scene together in less than five minutes, so with some touching up it could really be something good!


Monday, May 9, 2016

Quick mini update

We're past due on this pregnancy with a surgery scheduled soon.
So one way or another, baby is coming.
Until then, I remain on hold.
I'll probably resume updates mid-june.
Thanks!

Here's a link to my ever-shifting Mechwarrior: Dark Age/Age Of Destruction rules addendum if you're into that sort of thing: https://drive.google.com/open?id=0B4x1x1pBbC15Rmx1cW5iVlkwOTA

See you soon!