Search This Blog

Showing posts with label Lighting. Show all posts
Showing posts with label Lighting. Show all posts

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.




Monday, April 16, 2018

This Week in Game Guru - 4/16/2018

Official Game-Guru News:


I really dig the constant release cycle we're seeing from Game-Guru and TGC now that it's gone to GitHub.  Here are the full details on the 04.14.18 PP (Public Preview) release available on steam:

https://forum.game-guru.com/thread/219574

This one seems to be more of a bugfix/legacy components fix and users are reporting good results.  That means we're inching closer to a production stable build.

There's also some good PBR work being done on Mega Pack 2 (one of my favorites) - get the info here: https://www.game-guru.com/news-post/gameguru-mega-pack-2-dlc-update

New Products On The Store:



Not a lot going on but some interesting stuff.  GraPhix continues his PBR work with a nice looking bus stop.  One thing that stands out is that the glass isn't suffering that awful 'everything past the second pane gets deleted' bug so it should work flawlessly by the look of it.

There's a house set if you're interested by relative newcomer 'Homewreckers studio' and some very nice snow decals by RoseMadder (I always love innovative uses of the decal system).

Lastly there's a Randomized Sound System by Corrosion, who continues his utility scripting.  This particular one looks really useful and I might consider getting it myself.  Definitely give it a view!

Free Stuff:


Honkeyboy has some free mechs (WOO!) here: https://forum.game-guru.com/thread/219571
Bod has revamped his old lighthouses (I'm super excited about this): https://forum.game-guru.com/thread/215012?page=16#msg2599005
JPH-Games keeps adding to his "Industrial PBR pack": https://forum.game-guru.com/thread/219529#msg2599080
Graphix has honestly got too much for me to list. See his megathread here: https://forum.game-guru.com/thread/217932?page=10



Third Party:

There's a pretty big update for AGK but that's really only useful for people using GG Loader, at least from this blog's standpoint.  Beyond that, apologies but I haven't sifted through the mountains of posts on the forum about updates.  Suffice it to say we should expect a lot of integration of utilities in the near future into GG public releases.

Random Acts of Creativity:

So this is the area I'm *MOST* excited about.  We have two mega updates here that need some attention.  Firstly, of course, is Dimoxinil's "Space Losers".  This game continues it's march towards completion and there's also a recipe for cooking eggs buried in there?  That's definitely a new one.
He's added a savegame feature, day/night transition, a friendly NPC, and a village.
Details here: https://forum.game-guru.com/thread/217908?page=4#msg2599091

Next I noticed on the Game-Guru Discord (Yes, that is a thing - it can be found here: https://discordapp.com/channels/332652927082692609/332652927082692609  )

That DuchenKuke had posted a pretty awesome update and test video for his upcoming fallout/STALKER style game.  You can watch that video here (highly recommended as it's informative just in the sense of learning how to use terrain effectively):

This is absolutely gorgeous and he's done a great job.  My comments in full can be found at the video.


In My Own Works:


Ugh.  Don't remind me that I have more work to do.  I added about 3000 words last week to my book, which is pushing 145 pages now, unformatted.  There is a ton of extra work to do.

Monday, April 9, 2018

This Week in Game-Guru - 4/9/2018

Apologies for last week.  I missed the update completely as my day job as Chief Linux Systems Engineer is reaching it's yearly crescendo (culminating in early May) and so I'm finding myself exceptionally busy, compared to what I would only term the 'off season' where it's much easier to focus on secondary tasks, which unfortunately this blog falls into.

As such you may notice for a few weeks a reduced focus on this blog but I promise you it will return as soon as I can steadily manage it.  I'd like to give a quick shout-out to Graphix for a freebie he sent me (unsolicited) as thanks for the blog.  Give his products a look here - he's been doing some great things with the new PBR system. 


OFFICIAL GAME-GURU NEWS:


Not sure what I can say here.  Work continues, Preben is doing a lot of fantastic things with the shaders for DX11 but there's some serious issues that are still being worked on.  So as such we're stuck with a more updated public preview edition but hopefully will see movement forward towards a stable 'release' sometime soon.  To be sure, this is not the upgrade path I'd have chosen if I were Lee.

NEW PRODUCTS IN THE STORE:




Teabone (the king of clutter objects, IMO) has released a few new pieces of high quality clutter objects, notably some paintings.

There's also some interesting medieval horror objects by Lafette that literally the first words out of my mouth were (and I quote): "Wow!  That's.. really really nice.  I mean that's absolutely top shelf stuff."  And the best part is?  They're EXTREMELY WELL PRICED.  I mean the entire pack is something like 7 dollars, US.   This is something on the level of Wizard of ID level of quality, for a fraction of the price.  Definitely worth the investment.


FREE STUFF:


There's a fairly large body of 'free stuff' to go through:
First of all, Bod has made some new PBR remakes of his old stuff that look great!
Second we have Lafette (same one as above) making some 'free little mountains' which honestly are fantastic!  I hope to be able to include them with my book!
Thirdly we have a 'free PBR industrial pack' by JPH Games
Here's a script for making a MOHAA (Medal of Honor, Allied Assault man I haven't played that game in a lonnnng time) style bomb script: https://forum.game-guru.com/thread/219519
And lastly there's a pretty great script set of RPG style functions. 

All in all, a pretty solid week for freebies!


THIRD PARTY TOOLS:


Some news:  The Heightmap Importation tool is being integrated into the GitHub source - eventually!  Still, this is a huge bit of news and I'm excited to see it finally getting it's day in the sun.

Also GG loader by Preben has gotten another update of some underwater shaders.  That guy has a lot of free time.  I don't know how he does it.


RANDOM ACTS OF CREATIVITY:
There's too much to cover (cries quietly)...*takes a deep breath*

Bugsy added cubemapping to some objects in his Redacted2 shooter - https://forum.game-guru.com/thread/216903?page=3#msg2595699

Murmia, that weird game by 'beanz' is coming along nicely: https://forum.game-guru.com/thread/218909?page=1#msg2597459

Death House of Barker Creek by new creator 'HellreaperX' looks like a solid first attempt: https://forum.game-guru.com/thread/219542

Urban Explorer by Tarkus1971 looks promising but needs some fine tuning: https://forum.game-guru.com/thread/219549

Lastly there's a really fantastic update by Cybernessence that needs to be seen to be believed for his Cogwheel Chronicles masterwork.  His day night transitions are looking good! https://forum.game-guru.com/thread/213870?page=4

IN MY OWN WORKS:


The book is making steady progress though a lot of the lower hanging fruit is taken.  One interesting tidbit I posted online which readers of this blog might find interesting is my analysis of what's wrong with using the base AI without a navigation mesh for it:

https://forum.game-guru.com/thread/219508#msg2598602

Check it out.  I'll discuss it in more depth in the book, by a large margin.

Monday, February 5, 2018

This Week In Game-Guru - 2/5/2018

ENGINE UPDATE PROGRESS REPORT


If you keep an eye on https://github.com/TheGameCreators/GameGuruRepo/issues you can get an interesting sense of what is being looked at and what isn't. Currently there isn't a huge amount of 'buy in' for the github repo but it is coming along and in 6-10 months I expect it to be trucking along fairly well.  There's a good body of issues being brought to the attention of Lee and company.  So we'll see but for now, mum's the word.





NEW PRODUCTS IN THE STORE


store graphic

What you see above is the whole of it.  Gtox is adding new weapons (this knife apparently has an alt-attack, which is pretty cool!) and M Stockton has done some great work making a skate parka nd some parking blocks.  High quality models are always good thing!




FREE STUFF


https://forum.game-guru.com/thread/219294 - DuchenKuke has offered a really great variety of free music from his old fallout work.  I love this type of thing and highly encourage people to use it to help differentiate their product from stock offerings.
https://forum.game-guru.com/thread/215012?page=15 - Bod has given us a great deal of things over the years and he continues to deliver.  This time it's a Mallard train, carriage, and a really fantastic looking train station (check out the picture below!).  Make sure you tell him how much you appreciate his work - I think he's getting fatigued a bit and it always helps to hear some encouraging words. 

bod's train station
This is a really brilliant new piece, in my opinion!


https://forum.game-guru.com/thread/219211 - In HonkeyBoy's thread about his survival system, there's a new Lathe that's been added by GraphiX which is pretty impressive and definitely worth a download.

THIRD PARTY TOOLS


Nothing really new and exciting here.  Preben did make an interesting change to GG Loader which apparently improved framerates significantly by reducing draw-calls.  Hopefully this will have some future implementation in Game-Guru.  I have more to do for my notepad API but it's going to be a bit.  I simply have too much on my plate at the moment..





RANDOM ACTS OF CREATIVITY


https://forum.game-guru.com/thread/219296 - DuchenKuke's new project looks promising. 

post apoc, DK style


I love post-apocalyptic games and this one looks like a solid piece.  It's interesting, I've asked him what his method is and he mostly just wings it.  I guess some do have a natural talent for level-building.  Lucky bastard was apparently gifted with it more than I was, apparently. 


https://forum.game-guru.com/thread/217908?page=3#msg2595102 - Dimoxiland has done some major reworking to his "Space Losers" game and I think it's really going places. 



Check out the above video for details.  Very cool stuff.  Check out how clean the scripting and game play is!  Definitely one to keep an eye on.


https://forum.game-guru.com/thread/219258 - Honkeyboy's latest creation - Death by Daylight shows a remarkable increase in level design and proficiency for Game-Guru's most prolific author.  He's got rapid development down to a science at this point and it's really starting to make strides.


https://forum.game-guru.com/thread/219277 - Teabone has done some... very curious...  things with scripting and automobiles in Game-Guru.  Definitely worth a look.

IN MY OWN WORKS


I've made some progress on the Camera system I'm working on.  I have 3 out of 4 of the major pieces I want before I release it.  Once I get the last piece in play, I will build a demo level, zip it up, and sell it (for about $4).  It'll start off on sale at 3.50.  The camera kit will have some very interesting components which I believe most will appreciate.  I may add some niceties to it but that's not required at this point so it may get added down the road. 

After that I have to finish my other two kits.  So keep an eye out for some interesting news there.