q3map2n + half lambert angle attenuation

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

q3map2n + half lambert angle attenuation

Post by jal_ »

I've put together a test build of q3map2n (rev. 421) with the added switch for using Valve's half lambert curve for light angle attenuation so you can give it a try by yourselves. Quoted from the screenshots thread:
I'm giving a try to using Valve's halflambert ramp for light angle attenuation in q3map2 (for those who don't know what this is: q3map angle attenuation would be lambert attenuation, lambert is also used for lightingDiffuse in quake, HL2 uses what they call halflambert for models, I'm unaware if they use it at all in the map compiler or not. More info here and more specifically here).
The most important effect of the falloff change is that walls receive sun light better, as suns are frequently close to straight looking down, which is perpendicular to wall normals, which makes walls not receive their light since it was inhibited by the strong angle attenuation.

Test build binaries (windows only):

http://www.warsow.net/dev/jal/q3map2n-lightanglehl.zip

Code changes: here

To enable the lighting change add -lightanglehl 1 to your -light cmd line.

The lighting change can be very subtle, close to invisible depending on the map light. If you want to verify the switch was activated you can look in the build log for: "Enabling half lambert light angle attenuation".

Example shots:

Comparison (old/new):

[lvlshot]http://www.foopics.com/showfull/d955611 ... e72d7bd28e[/lvlshot]
[lvlshot]http://www.foopics.com/showfull/b86d537 ... a21c231e69[/lvlshot]

Comparison (old/new):

[lvlshot]http://www.foopics.com/showfull/7e56f7e ... 139f7379e3[/lvlshot]
[lvlshot]http://www.foopics.com/showfull/9a1ca5a ... a7107ba60b[/lvlshot]
Last edited by jal_ on Mon Feb 15, 2010 1:21 pm, edited 1 time in total.
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: q3map2n + half lambert angle attenuation

Post by sock »

I am glad you have split this off into a seperate thread, it will get buried in the screenshot thread. I did not realise your first screenshots were lightmap only, probably explains why they were so bright white and giving me a suntan. The second set certainly show off the idea alot better as I can clearly see the sunlight going down the wall and connecting to the floor highlight properly. Looks very cool :)

I was curious to see what this would look like in my current map project, so I downloaded your new q3map2 exe and tried to compile my map. I got this error:

Code: Select all

************ ERROR ************
safe_malloc failed on allocation of 330301440 bytes
So I tried to compile a small section of the map and all the shaders were broken. I imagine I am missing some paths or something but I cannot see any clues in the log file. I can compile the map fine with the previous q3map2. I will have to experiment a bit more with setup.

Can you post an example compile setup? what settings do you normally use?
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: q3map2n + half lambert angle attenuation

Post by jal_ »

Hmm... that's coming from the differences between q3map2 and q3map2n. Probably a memory bug in q3map2n. I guess I could compile a stock q3map2 with this change too.

The settings I used (keep in mind this is for Warsow, it's slightly different, and the -lightanglehl is enabled by default in that case):

Generic ones
-game qfusion -fs_basepath [EnginePath] -fs_game [GameName]
etc
-meta -samplesize 8 -mv 65000 -mi 65000
-vis -saveprt
-light -deluxe -patchshadows -v -fast -fastgrid -samplesize 8 -samples 4 -bounce 3 -fastbounce -bouncegrid -bouncescale 2.25 -dirty -dirtdepth 72 -dirtgain 1.75 -nolightmapsearch

(I know the bounce settings are a bit weird, but I don't feel like waiting forever)

Are you using -lomem? I suspect -lomem is broken in q3map2n.
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: q3map2n + half lambert angle attenuation

Post by jal_ »

Try with this one. It isn't exactly q3map2 2.5.17, but has very little changes from it. Some fixes to the models clipping and the light thing. Should do it well where q3map2 was doing well.

http://www.warsow.net/dev/jal/q3map2_2. ... nglehl.zip

EDIT: I patched the light changes into some old source I had in the HD. I didn't even test a single build, but it should be fine. :paranoid:
Delirium
Posts: 102
Joined: Mon Apr 27, 2009 10:05 am

Re: q3map2n + half lambert angle attenuation

Post by Delirium »

jal_ wrote:-mv 65000 -mi 65000
what does this do?
[url=http://gotdelirium.com/][img]http://www.gotdelirium.com/stuff/gdd.png[/img][/url]
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: q3map2n + half lambert angle attenuation

Post by jal_ »

Sets a higher limit for max vertices per surface and max indexes per surface.
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: q3map2n + half lambert angle attenuation

Post by Silicone_Milk »

that's hot.
Post Reply