Quake3World.com Forums
     Level Editing & Modeling
        State of the art Q3 lightmap building


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: State of the art Q3 lightmap building

surfaceparm nomarks
surfaceparm nomarks
Joined: 10 Aug 2009
Posts: 1010
PostPosted: 12-23-2021 01:21 AM           Profile Send private message  E-mail  Edit post Reply with quote


For a while now, nigrum has been developing a fork of GTKradiant, NetRadiant Custom: https://github.com/Garux/netradiant-custom
I'm sure many of you who still have an eye on Quake 3 map making have seen it already but I don't think it has been discussed on here. I'm toying around a bit with some mapping over the holidays and have been using this version of Radiant for the last couple days. It comes with some very convenient improvments such as wasd movement in the 3D-Viewport or better translation tools. I have also been making use of the zero effort external lightmaps feature which allows you to create external lightmaps just using a q3map2 switch. That in particular is quite a game changer for me.

Through dealing with this I have also discovered other q3map2 features such as -exposure which was introduced by the Urban Terror community already a long time ago (works similarily to -compensate). As a consequence I have asked myself what is a state of the art approach to Q3 map building in terms of light builds. Over the years there have been different approaches.

The most recent topic of discussion has probably been Lunaran's and KungFuSquirrel's You'll Shoot Your Eye Out using over 120 sunExt suns in their skybox shader to achieve a very sophisticated look of global Illumination. This is essentially, in my eyes, actively immitating scattered light through using a variety of "suns" and thus achieving a more "realistic" lighting that reminds of using HDRi lighting in modern day engines or rendering toolkits. The geometry of the level helps a little I guess, with the map being a space floater and light thus being able to enter from less steep angles into the lower parts of the map.
Another thing I have learned from this map is that the influence of level wide fog on the appearance of the lighting is immense. Of course the fog does not affect the lightmap but it does appear to highly affect the lower and upper ends of the lighting value range, greatly contributing to a less contrasty but yet not stale range of colors. I have done a quick comparison of fog and no fog in an entirely skybox lit map area:

Attachment:
File comment: Comparison: no fog and fog
01.jpg
01.jpg [ 200.61 KB | Viewed 127 times ]

Attachment:
File comment: Comparison: no fog and fog with lost information colored
02.jpg
02.jpg [ 278.68 KB | Viewed 101 times ]


In his Rustgrad level, Hipshot is following a very different approach as can be observed in the map source. He is relying on a single sun combined with a lot of individually placed lights and a high _minlight value in worldspawn to achieve the very distinct aesthetic of the map. The goal of it might have been similar to what You'll Shoot Your Eye out wanted to achieve: Eliminating those pitch black spots in the lightmap that do not provide any information. What I have (re-)learned here is that the color pallette of the textures you are using should be taken into consideration for the way you light the level. The way the lightmaps blend onto darker or brighter textures and how the game appears to handle overbright bits make different approaches necessary. At least that is my take on it.

A third approach I have tried this week is one I observe in modern day architecture visualization, especially interior. Since in reality the sunlight is much much more intense then any artificial light source, some methods of modern day archviz try to replicate that difference in intensity and use an high intensity on the sunlight or HDRi light image. With this approach however you run danger of loosing information at the upper end of the value spectrum (over exposure). Rendering engines like Blender's cycles solve this partially by using filmic color management profiles instead of sRGB (from what I understand). What I think you can do in q3map2 is make use of -compensate or -exposure switches to normalize the overbright parts of the lightmap. The advantage of this method (as I imagine it) is to get more out of q3map2's bounce lighting through the use of the higher intensity sun. However you still do not get as much out of it as you would expect from a global illumination as you find it in blender cycles or other renderers. The following example uses a single sunExt shader with an intensity of 2000 and a 600 intensity skylight along with _minlight 3 and a very faint level wide fog. No other light sources are used. Lightmaps are compiled with samplesize 8 and the light switches look like this:

Code:
[q3map2] -light -extlmhacksize 1024 -brightness 2 -bounce 16 -dark -dirtdepth 32 -dirtscale 3 -dirty -exposure 350 -patchshadows -samples 3 -bouncescale 1.2 -scale 1.2 -shade -cpma "[MapFile]"


Attachment:
File comment: Single sun test
shot0016 (Mittel).jpg
shot0016 (Mittel).jpg [ 258.23 KB | Viewed 87 times ]

Attachment:
File comment: Single Sun Test 2
shot0013 (Mittel).jpg
shot0013 (Mittel).jpg [ 281.91 KB | Viewed 88 times ]


In the following days I want to experiment a little more with -bouncescale and possibly see what adding more sunExt suns could do for me with regards to affecting bits that are still a bit too dark. Another thing I wanted to try is toying with _mighlight in combination with _color to see if subtle color information could be added to global shadows. You'll shoot your eye out manages to achieve these very nice blue'ish shadows but I am not sure whether that is a result of the skybox shader or if they do that with fog and _minlight. What approaches have you been following for lighting? I'd be curious.



_________________
Portfolio
Twitter


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12487
PostPosted: 12-23-2021 12:57 PM           Profile Send private message  E-mail  Edit post Reply with quote


I did a LOT of lighting experiments... mostly with global illumination. I forgot what I was trying to achieve with most of them, and I really wish that I had better documented them.

Attachment:
shot0003.jpg
shot0003.jpg [ 146.98 KB | Viewed 60 times ]


Here I was trying to work with normal maps and high resolution lightmaps. I was working with intentional oversaturation and coloured shadows to give the effect of looking really hot.

Attachment:
shot0004.jpg
shot0004.jpg [ 133.35 KB | Viewed 50 times ]


Attachment:
shot0005.jpg
shot0005.jpg [ 163.35 KB | Viewed 49 times ]


These two were probably me trying to dial in per-surface lightmap resolutions. The idea was trying to use really large lightmap pages for important surfaces while keeping others at lower resolutions for performance.

Attachment:
shot0006.jpg
shot0006.jpg [ 98.39 KB | Viewed 54 times ]


I don't remember what I was working with here. I think more oversaturation and contrast experiments. Pretty sure that dark texture rectangle walls had some normal map test going on at some point. I think I was trying to use overbright bits to create sun bleached surfaces.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2195
PostPosted: 12-28-2021 05:36 AM           Profile Send private message  E-mail  Edit post Reply with quote


What's good about lightmaps is that it's fake and can thus be improved if you have the proper tools/knowhow. It would be interesting to see good new ways of making these levels even better looking, not sure fog is the way to go. Fog looks like fog for me, but please prove me wrong.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

Insane Quaker
Insane Quaker
Joined: 16 Sep 2010
Posts: 391
PostPosted: 12-28-2021 08:41 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hipshot wrote:
What's good about lightmaps is that it's fake and can thus be improved if you have the proper tools/knowhow. It would be interesting to see good new ways of making these levels even better looking, not sure fog is the way to go. Fog looks like fog for me, but please prove me wrong.

I brought this up in the CPMA level design Discord, but I'll bring it up here too because I think it's worth discussing.

Lightmaps are just image files that are additively overlaid onto the level geometry, and can be exported and edited in an external program like Photoshop. So, in theory, you should be able to load the lightmap in Photoshop and make any adjustment you want to it, and then compile the map again with your modified lightmap. The use of fog for color grading, for example, might not be necessary if one loads up the lightmap and performs color balancing on it directly. And of course there's the multitude of other effects that can be applied in Photoshop, and the ability to fine-tune spots that might not look quite right since you have pixel-level control of the lightmap. It wouldn't completely replace light compile flags, since settings like -bounce and -dirty require the context from the actual level geometry to work, but color grading and contrast adjustment can probably be handled in Photoshop and with more control than what would otherwise be possible. (So basically a static post-processing effect)

If you convert the .bsp into a model file that can be loaded in Blender (or another modeling tool of choice) and then apply the lightmap as a texture then you could even preview it before actually compiling.



_________________
EmeraldProductions
http://emeraldproductions.weebly.com/index.html


Top
                 

Trainee
Trainee
Joined: 17 Dec 2016
Posts: 27
PostPosted: 12-28-2021 08:58 PM           Profile Send private message  E-mail  Edit post Reply with quote


Noesis can apparently do all of this:-
https://richwhitehouse.com/index.php?co ... ojects.php




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 43885
PostPosted: 12-28-2021 11:10 PM           Profile   Send private message  E-mail  Edit post Reply with quote


EmeraldTiger wrote:
Lightmaps are just image files that are additively overlaid onto the level geometry, and can be exported and edited in an external program like Photoshop. So, in theory, you should be able to load the lightmap in Photoshop and make any adjustment you want to it, and then compile the map again with your modified lightmap


I remember people have used this before. q3map2 does have the lightmap export/import function for this.




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2195
PostPosted: 12-29-2021 01:57 AM           Profile Send private message  E-mail  Edit post Reply with quote


Yea, it does, the feature is not new. As I see it, it's a messy thing to do, even if you simplify it down to a simple import/export switch, cause you need to "re-edit" every time you recompile, so it's only good as a final compile or as a test.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12487
PostPosted: 12-29-2021 06:19 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ideally, you could just write a better raytracer than what Q3Map2 has to offer (and preferably write it so that it enables GPU processing for faster compiles), but that would be quite a major undertaking.

The preprocessed megatextures in the submarine maps of Wolfenstein The New Colossus look amazing!






EmeraldTiger wrote:
Lightmaps are just image files that are additively overlaid onto the level geometry.


Subtractively. Blendfunc filter, or gl_dst_color gl_zero, or gl_zero gl_src_color.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2195
PostPosted: 01-06-2022 02:06 AM           Profile Send private message  E-mail  Edit post Reply with quote


Well, I hope no one does improve q3map2 too much, since it's quiet fun to sit and optimize and test things to get a good result =) It's a big part of the dev process for me.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group