Product Chat / Lightmapping! (and an apology to Lee and the gang)

Author
Message
Wolf
Forum Support
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 4th Apr 2016 18:36 Edited at: 4th Apr 2016 18:37


Hello!!

I have just spent an entire day with removing a substantial amount of ivy and its roots from the garden and am tired, so I might have some typos in this. Don't want to pass this up until tomorrow because I wanted to get this out there for some time now.
You might have noticed how I have been going on relentlessly about the lightmapping, how important it was, how little people understood its necessity and how shader effects actually work and how broken the system present in Game Guru was.
Well, I am writing this to admit that I was wrong and to apologise to Lee, who actually must have spent quite some time giving us a fairly decent lightmapping system far superior to the one present in FPSCreator, for all my bratty ranting about how bad the present system was. It isn't. Its not perfect but its very well something we can all work with.

After the first version where rather broken I just assumed that it remained that way in the current issue of Game Guru but that is simply not the case.
While it needs a lot of tweaking to get desirable results and most will simply not know how to get them (or care...I have seen GG games on Steam that where perfectly fine with not having proper shadows...survival horror games at that. I can't really wrap my mind around that though).

Why is that?

Well, allow me to elaborate.

Why is lightmapping important?


If you are new to game design you might have wondered why lightmapping has been such a huge thing for many of us on here, well that is because as far as graphics and aesthetics go, lightmapping are 70%.
Yes, everything you concider next gen, visually impressive or "good graphics" is mostly due to how its lit.
So why have way more people voted on adding PBR rather than an improved lightmapping system? Because they don't know that. PBR has been hot in the game dev scene recently and is included and advertised in all the big engine, however, its absolutely useless without proper lighting...so are all visual benefits of DirectX11 and yet many have attributed the muddy graphics in some game guru games to it using DX9... This is simply entirely wrong and my little thread is likely not going to prevent people from doing these claims or demanding these features before the core as been improved but thats not what this is about. This little segment is about showing those people who like to learn and I'm always researching what makes a game look and feel good. Its almost never what is written about in the gaming press and what can be cranked up in the settings
Enough ranting, let me show you how great all your PBR, DirectX11/12 powered shaders and highpoly meshes look without equally qualitative lightmapping.

Current Gen Graphics with and without lights. Unreal Engine (none of these are my work!)


Ya see? I rest my case.

Sorry Lee! You did a good job


The new lightmapper is rough around the edges, yes. It needs a lot of improvments and lacks a few features..sure! But its very good at its core. Its actually the lightmapper I have always wished to have in FPSCreator and I was too incompetent and bratty to even see that.
What does it better than FPSC's? It can render higher quality lightmaps without crashing or flooding the mem-cap we all dreaded back in the day, it can bake huge scenes and the new system which renders in grids allows for more stability.
While baking the map can have plenty of assets look off, we still get the ability to have tons of entities with normal and specular mapping without them looking as ridicoulus as they mostly did in FPSC.
With the surface level feature we can actually tint and color our lightmaps in real time to set the mood which is a greatly useful feature.

Journey to figuring this out


After Lee mentioned in the twitch that we won't see visual improvments enginewise until winter I said to myself, in my previous more negative mindset, that I have got plenty of broken stuff to work in the past and get the results I wanted, lets tinker with the settings to get something at least somewhat ...lit.

My first result was... well, I managed to get rid of all the diffuse maps in game guru. This has proven to be somewhat useful because this way we can actually look at the effect and accuracy of our shader maps. A little accidental discovery.





I have managed to achieve that by editing the "dividetexturesize = 1" line to "0". You can, of course not, divide by zero. ...and having it set to 1 logically does not divide the texture resolution. What was I thinking?! This might of course be useful to everyone who experiments with Normalmapping.

That last screenshot is however showing strong colors and shadow in an indoor scene. Thats what I was after and after fixing the .ini and further improve the lightmapping quality settings I tried a sample map and it worked. It worked! The shadows where still a little blurry but none of the scaled models have been distorted, rescaled or even misplaced and there was no sunlight bleeding through the architecture as before.



Earlier attempts


I have found something in a state far enough to work with that has been sitting under my nose this whole time without me noticing. This thread is here in case you have missed it too.

Recent, more polished baked scenes






Fantasy themed lightmapping test map



Game work in progress "Acythian"


What to watch out for


There are plenty of good tutorials on how to light a good scene out there. Most are compatible with any engine you are working in but I have written one myself aeons ago. Those where for FPSCreator....but game guru is working similar and the spiritual successor anyway:

Lightmapping 1 If you are curious. Its partly outdated.

If you have models glitch out, rescale or distort:

Open them in fragmotion, uu3d or a toaster for all I care and remove all the bones. Static objects don't need them anyway.
Remove all .dbo files in the entitybank.
(untested) Someone mentioned that adding "resetlimbmatrix = 1" to the fpe helps in some cases. I can not verify this.

If you get models that reflect oddly or look like they are covered in wax or wet plastic

The lightmapper can react oddly to normalmaps in its current state, your normalmap might be too strong. replace it with a less intense version.

If you get bad results

Mess with the surface level settings and lower the ambience (depending on scene).
Increase settings in the setup.ini (advanced users only)
Check if the lights that are supposed the be static are static.

What I wish for the future


Just some suggestions. These aren't requests, just ideas.

Please bring back the old lightbulb. Those sun planes are a pain to place correctly.
Having directional and spotlights would be popular with some people.
If we would be able to select what grids to lightmap in test game. That way we can prevent guru from mapping the entire thing everytime we make a scene and save a lot of time
Please check why it reacts oddly to some props with bones. This is really inconvenient and unfixable for many users without 3D knowledge.
Please check why some normalmaps are displayed so extremely
Let us turn off the sun
Being able to switch diffuse maps off by pressing a button to check lights, shadows and normalmaps in test game.

Whew! I guess that was it for now! Let me know if I have missed something and please add anything you found out or think is relevant.
So lets get rid of that blurry, muddy look and add some well lit indoor scenes to our games


-Wolf
"When I contradict myself, I am telling the truth"
"absurdity has become necessity"
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Apr 2016 19:27
I tried a light map over the weekend but ended up cancelling it as it seems GG wants to render the entire map, rather than just the very, very small part I worked on. That's enough to keep me away, haven't got time to wait that long, especially when most the work being done is essentially useless. Either this is a bug with the light mapper, or possibly with the flat terrain. I have noticed a flat terrain is not exactly flat, with a definite glitch along the right hand edge.

Regarding the lightmapper. The results have looked pretty good for awhile. The main issue for me is the speed is worse afterwards. Light mapping is supposed to speed things up not slow them down. It did when it was first introduced, but over time it's actually got lower than real time by some margin.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Wolf
Forum Support
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 4th Apr 2016 20:07
That is true! It should increase performance but I am confident that this will most certainly be addressed at some point in development.
I adressed it baking the entire map when not needed above with the need to be able to select what part of the grid to be baked before test game. (Perhaps in some sort of advanced user mode?) and as far as the time is concerned? Eh! I'm fine with it but I can see why people have problems with it. (Personally I just get another cup of tea or coffee, do the dishes or whatever still needs doing around the house, come back and play my scene. That needs improvements but anything that teaches people some patience in these days is alright with me. )



-Wolf
"When I contradict myself, I am telling the truth"
"absurdity has become necessity"
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 4th Apr 2016 20:49
No need to apologise, game development is a fifty-year mission to learn just about everything you can, made interesting by the fact the stuff you need to learn keeps changing every six months Your screenshots look great, and I am looking forward to playing the finished game!

As to lightmapping slowing down your games, it's true. With lightmapping, you benefit from a quicker shader that does not use dynamic lighting, but you gain extra polygons for the floor shadows (cannot be part of the terrain shader as it's WAY too slow), you get the HIGHEST polygon levels of any entity that uses LOD, no matter how far in the distance they are, and you now have a chunk of extra light map textures in video memory which also need to be cached back and forth during a single game scene render. I have a few improvements in mind, but the voting board will be preventing me from dabbling in those areas for some time, and the prospect of PBR techniques augmenting (or replacing) the current real-time lighting system will also play a part in this delay. For the moment, a hard decision has to be made between creating a light mapped game with very strict controls on the content used, or a real-time lit game that does not depend too much on shadows to create the game mood. A third option is to import your own static graphics that have their lighting pre-baked into them, and use real-time lighting for the render method, but this requires some rather tricky pre-planning of your entire level so the shadows accurately represent the direct of the sun and in-game lighting.
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Wolf
Forum Support
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 4th Apr 2016 21:07
I was putting down your work before even adequately trying it out which is usually not my way. And thank you!

I understand that there is a lot on your plate and am content with working on something more controlled and confined with what is available now, gathering experience to create something bigger with the advanced features later. It is clear that there is a lot guru needs before we get too deep into the graphical aspect of things. On second glance I can say that I am statisfied with how things are evolving.



-Wolf
"When I contradict myself, I am telling the truth"
"absurdity has become necessity"
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Apr 2016 21:49
the screen shots look amazing, a real showcase of how much shadows/lighting can really add to a level.
it would be nice to see the same scenes in real time just to really show the difference

i am curious how you managed to get some of the shadows so dark, is this only possible with baked lights? i always feel the shadows are far too subtle in real time.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Apr 2016 21:54 Edited at: 4th Apr 2016 21:54
Unfortunately for me, leaving a bake to finish would more likely leave me free to undertake a small holiday Especially when it renders the entire map. It certainly didn't do that in earlier versions and as I say, I think it may be something to do with the default flat terrain not being entirely flat. In my test this weekend it finished the map I had made in a few minutes, but insisted on baking all the rest of the flat unused area, which would have taken hours and hours

I was looking forward to seeing how it looked baked as well Perhaps I will have to experiment with manually flattening the rest of the map, or doing some tests on another one entirely.

I include an image of the issue I mean regarding the default map. I'm pretty sure this may well be causing the overzealous bake settings.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Attachments

Login to view attachments
display mode error
8
Years of Service
User Offline
Joined: 25th Nov 2015
Location:
Posted: 4th Apr 2016 22:59 Edited at: 4th Apr 2016 23:00
Quote: "Unfortunately for me, leaving a bake to finish would more likely leave me free to undertake a small holiday Especially when it renders the entire map. It certainly didn't do that in earlier versions and as I say, I think it may be something to do with the default flat terrain not being entirely flat. In my test this weekend it finished the map I had made in a few minutes, but insisted on baking all the rest of the flat unused area, which would have taken hours and hours
"


The longest I had to wait was about half an hour. Just remember to turn your screensaver off. It seems to bug Game Guru out while light mapping and causes the program to freeze.

also it seems to do funny things with certain objects...

Just sit back, relax, make yourself a cup of tea and watch the 'bake off' begin! :p
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 5th Apr 2016 02:17
Thanks, Wolf, I checked out your tutorial in the old forums and now I am sold on lightmapping! I haven't been using it at all because of the performance drain, but really, my computers are more than adequate to work with it. I'm just not really artistically inclined by nature, but even I can see the difference it makes. In fact, when I just opened GG and tried it, static lights wouldn't map. (use it or lose it?). I did a file integrity check, and they work again. I'm off to play with lights!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 5th Apr 2016 02:27
In FPSC there was a key you could press to view the wireframe of everything. Perhaps this could be reintroduce to also have an option to show diffuse textures disabled.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 5th Apr 2016 03:08
I am having trouble getting a static light to create shadows inside a building.
In the screen shot below the static light is not creating shadows and is lighting faces the should not get light.
Any suggestions? Also what settings are you changing in the ini file and where is the file located?
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Apr 2016 03:30 Edited at: 5th Apr 2016 03:40
The file is the setup.ini file in the Game Guru root folder.

The lightmapping settings look like this.
lightmappingquality=500
lightmappingblurlevel=100
lightmappingsizeterrain=2048
lightmappingsizeentity=512
lightmappingsmoothangle=45

The above are the default settings.

I would play around with these on a few models at a time till you figure which settings are good for your scenario.
Higher settings will increase light mapping times.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 5th Apr 2016 03:35 Edited at: 5th Apr 2016 04:35
A couple of more recent efforts, always saw the potential in it even before you could increase the quality. Nice to see someone else views it in a more positive light I am sure once the performance issues get ironed out it will be well used and no harm in creating your levels with it in mind for future reference since it changes your level appearance dramatically.

Increased the entity lightmap quality and decreased the terrain lightmap size since it isn't being used in an indoor level, this cuts out the time terrain lightmapping takes when baking since it isn't required.

I see no point to including terrain in lightmapping unless for a lit night scene or similar, so the option to exclude it completely would help a lot with render times.





Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 5th Apr 2016 03:37
Okay, I had no idea we could actually achieve that type of lighting at this point. I generally avoid the lightmapping due to the length of time it takes to render.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Apr 2016 03:42
Those screen shots look great Rolfy.
So does your Wolf.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 5th Apr 2016 04:32
Great thread, good read.
Define R4, i7, 8g, R7 360
PM
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 5th Apr 2016 17:22
Are you suggesting something like "lightmappingexcludeterrain=1" which would skip the generation of any terrain shadow geometry, thus reducing polygon count for rendering in this mode. Let me know, pretty easy to sneak this one in
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 5th Apr 2016 19:10
Even water, if you do not use it in your map (indoor scene). ("lightmappingexcludewater=1") .
Thanks Lee for gives the official version of the thinghs.

Nice shots Wolf and Rolfy.
Eh! Wolf, quite useful tuto, nice info about how lights working, and good tips, thanks.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
synchromesh
Forum Support
10
Years of Service
Recently Online
Joined: 24th Jan 2014
Location:
Posted: 5th Apr 2016 19:27
Why not " lightmappingmodelsonly =1"
Why complicate things
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 5th Apr 2016 19:33
synchro, your words make me think about some quetion:

If any day we do have this feature, and even we are able to make underwater level, does we'll can hide terrain, and use it to LM just the water, but not the terrain?

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
synchromesh
Forum Support
10
Years of Service
Recently Online
Joined: 24th Jan 2014
Location:
Posted: 5th Apr 2016 19:44
Quote: "If any day we do have this feature, and even we are able to make underwater level, does we'll can hide terrain, and use it to LM just the water, but not the terrain?"


Quite true ... Although i have no idea how the water would looked lightmapped
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 5th Apr 2016 19:58
Quote: "Quite true ... Although i have no idea how the water would looked lightmapped"

With a nice environment, uhmmm. I would like to see too.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Wolf
Forum Support
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 6th Apr 2016 12:05
Hello! I see that this has found some interest

@smallG:
Quote: "the screen shots look amazing, a real showcase of how much shadows/lighting can really add to a level.
it would be nice to see the same scenes in real time just to really show the difference"


Thank you! I can upload some. Do you mean with the static lights replaced with dynamic ones or just completely switched off?

Quote: "i am curious how you managed to get some of the shadows so dark, is this only possible with baked lights? i always feel the shadows are far too subtle in real time."


I have completely turned down the ambience, this should also work with real time lightmapping

@DVader:
Quote: "but insisted on baking all the rest of the flat unused area, which would have taken hours and hours"

That is a bother, yes, but I never had to wait longer than like 30 minutes. If you don't use the terrain in your map you can turn down terrain-lighting quality to speed things up.
@Jerry Tremble:
Quote: "Thanks, Wolf, I checked out your tutorial in the old forums and now I am sold on lightmapping! I haven't been using it at all because of the performance drain, but really, my computers are more than adequate to work with it. I'm just not really artistically inclined by nature, but even I can see the difference it makes. "


One of the more wondrous things of game development is that it brings the art and the tech crowd together, which is always nice. I'm glad to see my thread had an effect on you

@Teabone:
Quote: "In FPSC there was a key you could press to view the wireframe of everything. Perhaps this could be reintroduce to also have an option to show diffuse textures disabled. "


I second that It makes debugging our maps much easier.

Quote: "Okay, I had no idea we could actually achieve that type of lighting at this point. I generally avoid the lightmapping due to the length of time it takes to render."


Same with me before, thats why I made this thread.

@rolfy Very atmospheric scenes! By the way, did you notice how similar these two men in the paintings look?

Quote: "Increased the entity lightmap quality and decreased the terrain lightmap size since it isn't being used in an indoor level, this cuts out the time terrain lightmapping takes when baking since it isn't required."


This is solid advice! Thanks!

@PirateMyke
Quote: "Those screen shots look great Rolfy.
So does your Wolf."


Thanks!

@LeeBamber
Quote: "Are you suggesting something like "lightmappingexcludeterrain=1" which would skip the generation of any terrain shadow geometry, thus reducing polygon count for rendering in this mode. Let me know, pretty easy to sneak this one in "


Yes! Please! That would add a lot of speed to things.



-Wolf
"When I contradict myself, I am telling the truth"
"absurdity has become necessity"

Login to post a reply

Server time is: 2024-11-16 23:53:29
Your offset time is: 2024-11-16 23:53:29