Search This Blog

Monday, November 26, 2018

Lighting Part 5: Super Advanced Lighting in GameGuru

This is part 5 of a long running series on lighting techniques in GameGuru.  It's advised you read the previous four if you haven't already so you have some fundamental understanding on lighting techniques used up to this point before taking this on.
Seriously advanced lighting (aka lighting, part four)
Advanced lighting, (aka lighting, part three)
GameGuru interior lighting (aka lighting, part two)
GameGuru Lighting Lesson (aka lighting, part one)

extra credit, Wolf's lighting thread: https://forum.game-guru.com/thread/219206

I should mention that this work has taken me a considerable amount of time and is of significant length.  Please take the time to comment on it if it's beneficial to you!

Before I begin

Obviously I've been busy with my book.  Much of these posts will be revisited in the book itself in varying forms, but I was going through my old data and found this post I literally wrote a year ago and I feel a fool for having never actually posted it.
Hopefully it's not a question of too little too late and that many of you can find some use from it. Be aware the book has about 3x the amount of information on GameGuru lighting

Illumination mapping


I've discussed illumination maps in the past, though not in any great detail.

An illumination map is an interesting addition which is, in my opinion, underutilized in Game-Guru games.   Effectively it is an additional step beyond to add luminosity to your levels. Take for instance this screen:

fs1
Courtesy of: https://blog.3dexport.com/making-of-final-stand/

Add an illumination map (which is simply a copy of the 3d model's texture with the bright spots lit up in white and the rest in black, renamed to texturename_i.dds):

fs2
Yes, this is my hackneyed attempt to make a point.

And you get this amazing difference in visual fidelity:

fs3
Courtesy of: https://blog.3dexport.com/making-of-final-stand/


What's important here is that while as of this writing Game-Guru lacks an 'emissive' lighting system such as Unreal/CryEngine has, it does however have a certain little bit of fudge.

emission example
Left - regular texture, middle - illumination mapped, right - emissive lighting
Emissive lighting is effectively self-illumination mapping which also spreads to the environment.

Bright lights really cause a sort of bleed-over with the bloom shader built in.  So if you put illuminated lights in and you turn up the bloom it gives the IMPRESSION that they are giving off light (note, this WILL EAT SOME FPS):

emissive fakery
From my lighting tutorial #3


Now at some point I wanted to  see if I could control the level of brightness in a game-guru illumination map.  Unfortunately it doesn't appear to have any granularity to it.  I had expected the ability to control 'how bright' something was, but alas it's either completely on (255/255/255) or completely off (anything else).  So be aware that when you're using your illumination mapped objects you need to go with an all or nothing approach.

Updated 11/27/2018 - Per Wolf this has been changed and it DOES function with gradients on the illumination map!
It's a fantastic find and I'm really happy to see it's functioning. He's also provided some great screenshots below.


As you can see the illumination mapping clearly supports gradients so make the best use of them.  Thanks again to wolf.  Make sure you visit his page over at seragalacaffeine.com for more great screenshots, tips and tutorials!

Static Light Mapping to Fake Light Emission


Going back to our previous example - what if you want that same scene to have an emissive effect around the lights?  Sure, you can crank the bloom up, but that only does a fudge on the lighting to make it appear like it's glowing.  The real trick here is to use a static light map.  For example here I have a simple room with a table and a lamp on it.  The lamp has  a static light under it and it should cast a nice 'normal room light glow'. 



lampstand 1
See the little lighter spot on the table? That's all I really wanted!

Hey... wait a minute!  That lamp object is casting a massive shadow now! What gives?  Well, if you're like me you spent hours trying to tweak your lights and configure them in such a way that it provides the best experience for your levels.  One little trick I have is to cut out unwanted shadows by placing clutter objects *AFTER* I place my lightmapping.  This way I can produce a much cleaner effect, especially in a well-lit room like this. 

lampstand 2
Now we've got the circle on the table and no shadow!
After I place my light and bake it using F3.  Now we no longer have a ridiculous shadow.

lampstand 3
Note: the darkness on the lamp is a result of my poor placement of a dynamic light. 

Now simply adding bloom will get your room to look more 'emissive' by blending the colors to provide a more natural effect.
Unfortunately, I cannot show this as I lost this level between when I wrote this a year ago and when I released this today.  So here's an example from an older lighting document:

And another courtesy of Wolf


Note the subtle blending of the colors in the textures.  That's due to the quasi-aliasing effect being performed by the bloom shader at lower levels.  Even having at 50 can provide a pretty nice blend though I don't recommend going above 70 in most cases.

Colors, combinations, and why your lights look like crap.



You might be wondering why some lighting examples look phenomenal, while others look lackluster.  There are several reasons for this.  The first (and foremost!) is that the stock color choices in Game-Guru are quite literally HOT GARBAGE.

It's true.  Due to the way the system 'adds' color to each texture, what you end up with if you use the stock White, Yellow, Blue, Red, Green, Magenta, Cyan, etc lights is a train wreck that is simply too much or too little depending on what you are attempting to accomplish.  You almost always will want to modify the colors to be something more realistic.  If you've read my previous articles you know that white translates to a 'brightness modifier', basically a clear color with a scale of how bright the individual texture's existing colors should be are!  Details make the difference, folks.

As some of you know, I have an artist as a wife (www.messinastudio.com) and she's very particular about her lighting.  As such, I've learned a good bit more than I expected and it's been quite telling!  For instance, did you know that natural/artificial lighting is measured on a 'kelvin' scale indicating how 'hot' it is?

kelvin chart
 courtesy of: https://ledcorporations.com/kelvin-aka-cct-correlated-color-temperature/
This coloration varies from a deep orange to a cool blue.  A little past the middle (Approximately 6500 kelvin) is natural lighting.  This is the reason I have special 200w 6500 kelvin florescent bulbs in her art studio.


This translates to the following tables from pixelemporium.com:




Light Source
Kelvin temperature
R G B Values
Color
Candle
1900
255, 147, 41

40W Tungsten
2600
255, 197, 143

100W Tungsten
2850
255, 214, 170

Halogen
3200
255, 241, 224

Carbon Arc
5200
255, 250, 244

High Noon Sun
5400
255, 255, 251

Direct Sunlight
6000
255, 255, 255

Overcast Sky
7000
201, 226, 255

Clear Blue Sky
20000
64, 156, 255


Light Source
R G B Values
Color
Warm Fluorescent
255, 244, 229

Standard Fluorescent
244, 255, 250

Cool White Fluorescent
212, 235, 255

Full Spectrum Fluorescent
255, 244, 242

Grow Light Fluorescent
255, 239, 247

Black Light Fluorescent
167, 0, 255



Light Source
R G B Values
Color
Mercury Vapor
216, 247, 255

Sodium Vapor
255, 209, 178

Metal Halide
242, 252, 255

High Pressure Sodium
255, 183, 76



In Game-Guru you'll find that often the best results can be achieved by simply blending and letting the engine handle it for you. Despite whatever adjustments you might make, or if you use all the coloring charts on the reference page that I have ... it really helps to simply put two different colors in a room and let them blend together when you compile the static lighting.

lighting example
From Wolf's WIP Game:Shavra
As you can see in the above example, you have two separate light colors.  One a sort of magenta while the other is a 'hot kelvin' type orange color.  While either of these could be used to set the tone by themselves, by shifting the color dramatically he's achieved a very unique effect that clearly separates the room for a person's eyes to see.

lighting example2
Also from Shavra


In the above picture you can see a more subtle delineation, allowing a cleaner combination of two similar colors.  It also helps draw attention to a critical point, where something vital is hiding (near some glowing mushrooms). 

use previous example to show blue/white colors and combination from lamp and overhead lamps.

In this example we've taken the lamp from the previous segment and put in a white overhead light for general room illumination and then underneath the lamp put in a bright blue light to give the simulation of varied lighting.  The result, I think, pays dividends.




This Week in GameGuru - 11/26/2018

Well, the American holiday of Thanksgiving has come and gone.  I do love it, not just for the food but the lessons it brings us.  If you're ever interested, take a look at the notes of the Pilgrims from that time.  There's a lot of lessons to be learned there, for sure.

Moving ahead, GameGuru has a lot of ground to cover this week. Let's get started...

Official GameGuru News

 

So it looks like we got a big release and they just updated the main news page with it.

https://www.thegamecreators.com/post/gameguru-november-update-released
This information is nothing new, if you've been following my blog.  All of these were covered in the PP release, which is now just following the natural effect of being deployed as a 'stable' version.  Time will tell but I expect some followup patching as it shakes out over a larger audience.

This overshadowed another update as well from earlier last week which was that the construction pack DLC got updated with more PBR textures.

Full details can be found here: https://www.thegamecreators.com/post/gameguru-construction-site-dlc-updated-3

What's Good in the Store


This week in the store we have a smattering of new items.  First we've got some interesting pulleys from Mad Lobster's Workshop: https://www.tgcstore.net/product/32169



I have to say I love the work he does on texturing.  I think this product marks a good departure from his more niche products to a more general line that can be used by a broader audience.  I for one welcome the move.

Reliquia's beautiful Toonland Car now is available in a well priced pack: https://www.tgcstore.net/pack/11060

Teabone continues his work both in modelling (this time on ingots) and on scripting (a mine arming/disarming script).

And lastly we have a Christmas Pack from Colosso who pretty much covers the ENTIRE Christmas spread with gifts, a tree, a snowman, a sled, an igloo and more!



Get the Christmas Pack here!




Third Party Tutorials and Tools


I didn't see any this week, but if I missed one let me know and I'll add it.

Free Stuff


Maiacombra provided some free textures that could easily be added to a terrain setup.
 

Random Acts of Creativity (WIPs)

VincentHendriks went with a totally different tactic this week, moving to a hitman-style spy shooter with a villa that you assault.  It's a solid first run through though it needs polish and testing.  So far though the results are promising.  https://www.youtube.com/watch?v=TjC9k1A0OOU

Note the clever use of an EBE building.

So far, so good. Good foliage, good coloration.  The building is a nice departure from the usual fare with in the bounds of EBE's limitations. 
 
Openload continues his work on 'Memory of Hedolan' (I covered it a few weeks ago here) with some new screenshots.  This is a really solid piece that looks like it's got some serious effort going into it.


The lighting is fairly on point and it looks like a solid effort, which I can always appreciate.

Additional screenshots and details can be found in this thread: https://forum.game-guru.com/thread/220223#msg2608734

So in a not-so-rare case of me tooting my own horn, I helped Len the Man with some advice on his cowboy shooter. I gave him a really rough copy of my subchapter on how to make deserts and he's really taken and run with it.  Check out this before and after comparison:


What an ENORMOUS difference.  There's still work to do, obviously - I'd add bigger and wider vegetation, maybe some rocks and foreground elements like small shrubs but overall this is miles better and significantly more immersive.  Nicely done Len!

In My Own Works


Well for starters, I updated the cover graphic for the twilight sky freebie I did a while back.  I am not sure how, but the graphic got all screwed up and made the demo picture look awful.  You can get that freebie here: https://www.tgcstore.net/product/30955

I also have a lighting tutorial I wrote up nearly a year ago that I cleaned up and will be releasing very shortly (like, later today!) ... and lastly I'm up to 126k words on my book.  I just finished covering how to make cutscenes in game and will be moving on to 'Advanced Engine Usage' which mostly will cover setup.ini configurations and tricks.  I'll admit I'm wearing out a bit on the heavier duty stuff I'm having to cover but it's getting there by god!

Thanks again for everyone's support and I look forward to a final release of this book which I believe will truly help you all bring your projects to fruition!

Monday, November 19, 2018

This Week In GameGuru - 11/19/2018

As you can see, I'll now be cross posted not only at gamedev.net and blogarama but also here on the GameGuru site itself, which is pretty awesome!

So for those of you who are not aware, I've been writing these reports for a very long time at my blog, spanning several years - all the way back to the FPSC Reloaded days.  There's a ton of extra content there such as my tutorial list: http://gamegurureport.blogspot.com/p/my-tutorialstechnique-evaluations.html

and the reference list of everything from FPE errors to light values: http://gamegurureport.blogspot.com/p/reference-list-for-gameguru.html
 
This is a relatively quiet week, so if you missed last week's update (Which is not listed on the GameGuru site as I needed to skip it to get caught up for future content) you can find it here: http://gamegurureport.blogspot.com/2018/11/this-week-in-game-guru-11122018.html

Official GameGuru News


This week was a huge update from the standpoint of actual Game-Guru news as you can see on the front page.  This week we got our third public preview update, which represents a sort of 'last beta' before it actually is released as a final release.  This public preview allows us to test thoroughly all the upcoming changes in the next major release.


https://www.thegamecreators.com/post/gameguru-public-preview-update-3

The list of changes is substantial and ranges from a better physics shapes, new model changes for better animating and physics responses, better importing, improved particles (a massive update), a HUGE AI update done by smallg & Lee, and of course the usual smattering of minor bugfixes.  It's completely worth taking a few minutes to review the huge list of updates on the actual news link above.

As always I recommend making a copy of your stable version of Game-Guru before downloading the PP update via steam so as to ensure you are secure in case of serious issues with the PP release.

What's Good In The Store


So this week we have some really excellent cartoon cars by Reliquia:

These should be part of a pack!


A very well priced (underpriced, even) monster by LOTGD(80 cents!)


Teabone's been steadily producing scripts for you to purchase now available as a reasonably priced pack:



And lastly, by 'Moshroom' - probably the coolest thing I've seen in a while - a full JRPG script kit!  It's on sale now for 13.00 which is a VERY reasonable price for such a complete script setup.


Get it here at: https://www.tgcstore.net/pack/11059

Free Stuff


Not much going on here this week but Maiacoimbra did do several colorings of the medieval weapons and the futuretek shotgun

Third party Tools and Tutorials


This week we have a tutorial on how to reduce polygons you can find here:
https://forum.game-guru.com/thread/219982
And some interesting image compression software I have yet to test out, might produce better results for DDS files:   https://forum.game-guru.com/thread/220248

Random Acts of Creativity(WIPs)


Graphix has been working on his particle weather effects and recently showed off his fog effects.  I'd love to integrate support for these into my weather system!
You can check out a video of it here:  https://youtu.be/IC__yQpDPp8

We also have an update by Vincent Hendricks on his medieval game which is coming together rather well:


Now for my personal favorite of the week.  Teabone made one of the coolest 'monster/trap' entities I've seen in a while, something I've loved for a long time since my early years playing DND:  The Gelatinous cube!


I absolutely love the gelatinous cubes.  They were always some of the most interesting and difficult monsters to fight; nothing worse than a giant living blob of acid to ruin your day!


In My Own Works


Well, I finally hit 120,000 words (122k, to be precise).  This does not mean the book is done, far from it.  I have two major sections to write:  The model importer and the advanced Lua code section.  Once those are done, I'll be sitting around 130,000 words, which I will probably trim down to 125-122k after editing.

After editing (should be wrapped up by mid-December) I'll then start taking the 150+ pictures I need for the book!

Then I get the joy of formatting it and typesetting it for the publisher, sending it to my editor for one last review, then sending it to the PUBLISHER's editor, then so on and so forth until it is finally accepted by the publisher (CRCPress) in February or so.

Still, I'm very happy with how this has come along recently and it's great to finally be making REAL progress on this.



Monday, November 12, 2018

This Week in Game-Guru - 11/12/2018

This week's update may actually make it to the Game-Guru news page, woohoo!

We'll see.  I've been in communication with TGC's marketing person and it's moving forward, albeit a bit slowly.

Official Game-Guru News

Well, it doesn't appear they have added anything new as of this writing, though typically news releases seem to be done later today or tomorrow.  In the interim I can say I found this site:
https://www.game-guru.com/news-posts?post_type=guest-authors
Which currently only has one post but hopefully yours truly will see the light of day there soon.

What's Good in the Store

This week we've got two entries.  One is a timely turkey, as it were, just in time for the grand American holiday of Thanksgiving were we gorge ourselves on copious amounts of food and then fall into a comatose state.
A little small, by 'murican standards.


Campana productions put this one together and you can find it here: https://www.tgcstore.net/product/32155

Next we have a really nicely done pack of snow-themed assets.



It's got everything from buildings to vehicles.  I'm also happy to see he included a few free models for you to trial as well.  It's well priced at $8.00 which is a bargain by any standards.

You can get your copy here: https://www.tgcstore.net/pack/11058

Free Stuff


In the realm of free stuff we're getting into the giving time of year and it shows!
Lafette, as mentioned, has a few free things on that pack you should grab.  He also made a train station too though.

You can get your copy of the 'Free old German train station' here: https://forum.game-guru.com/thread/220209

It appears GraphiX is making headway on his new kit, though I'm not sure if it will be free (though he keeps posting updates to the free forum so.. maybe?).  You can watch a video on this interesting sci-fi pack here: https://youtu.be/CToyFLW70d0

Mstockton released some free music over at his site.  Definitely head on over and make sure to like the page for him! https://michaelstockton.net/cartoon-casual-game-tracks-volume-1

Honkeyboy released some Lua code for Game-Guru that allows you to setup chatting NPCs relatively easily.  https://forum.game-guru.com/thread/220225#msg2608076
It's mostly to control the animations though so you'll still need to manage all the other elements such as sound and text. 

Third Party Tools and Tutorials

I found this ENORMOUS tutorial playlist on Game-Guru related topics on youtube over the weekend while doing book research: https://www.youtube.com/watch?v=HjSBCevTnYI&list=PLot9BTdhKKd4KV91P7WkIKVsybktHu1Za

Random Acts of Creativity(WIPs)

This has been an absolutely crazy week for updates so if I missed you, apologies.  I *THINK* I got them all.  So in no particular order....

Schneeky has a fairly well done Medieval project put together.  I'm curious how this will bear out.  https://forum.game-guru.com/thread/220228

Honkeyboy started a new project.  Not so sure about this one, but if he polishes it, maybe it'll take roots for him.  https://forum.game-guru.com/thread/220201#msg2607752

A new user "OPENLOAD" made an italian title that looks very promising "Il mio primo lavoro "Memory of the Hedolan": https://forum.game-guru.com/thread/220223

Of particular note is DVader, who crawled out of the woodwork to deliver a holiday-themed project.  Why this is noteworthy is DVader is actually a fairly competent coder so you can expect some interesting work from a technical standpoint in this project.  https://forum.game-guru.com/thread/220214

Ertlov released a slice of his game 'Into the Ice' for testing - check it out here: https://forum.game-guru.com/thread/206985?page=3#msg2608009

Bonesy continues to update Cyberfi and it's actually starting to look like a real game.  This is a great example of what happens when you focus, buckle down and actually WORK on your projects!


Granada's been working on some guns in Game-Guru and I have to say I love the exaggerated look!


In My Own Works


I'm drawing closer and closer to completing my book, now within striking range of my target for completion.  I'm at 110,000 words and counting.  Once I pass 120k I'll probably keep going to 125/130k and then remove about 3-5k for editing.

This week was all about advanced AI control, sales, marketing, and piracy.  Very preliminary editing work began with chapter reorgs and other things.

Further this week will be mostly Lua oriented as I wrap up the 'intro' chapter to Lua, then do a complete Lua command reference for Game-Guru, and if I have time work on the Advanced Lua chapter (which I will admit I am somewhat dreading).

See you next week!