|
by gsigms » Tue Aug 23, 2011 11:02 pm
I am working on a map at the moment. I am extensively using light emitting/non solid/detail/invisible brushes to create lights. this is done with the following shader: - Code: Select all
textures/test/inv_light { q3map_lightColor .1 .1 .3 q3map_surfacelight 300 q3map_nolightmap
surfaceparm nomarks surfaceparm nonsolid surfaceparm trans surfaceparm nolightmap surfaceparm detail
surfaceparm strip // :)
qer_editorimage textures/7g_light/blue.tga qer_trans 0.6
{ map $whiteimage rgbGen const ( 0.000000 0.000000 0.000000 ) blendFunc GL_ONE GL_ONE } }
what it looks like ig on a test room:

- unmodified
with r_showtris, we can see the light emitting brush:

- unmodified showtriss
after discussing this on cmm's irc, we wondered if using extensively that kind of brushes would impact fps, and since lights are calculated at compile-time if it was possible to get ride of those brushes. well it turns out that a "dirty/very likely to provoke the armagedon" implementation can be writtten in 10 lines of code inside q3map2 and an extra surfaceparm directive: with the modified q3map2:

- modified showtriss
-

gsigms
-
- Posts: 102
- Joined: Thu Aug 18, 2011 11:24 am
- Location: London, UK
by johnnyenglish » Wed Aug 24, 2011 4:01 am
I'm going to ask the obvious questions now.
Why might this be better than using a light entity?
Do you still need that shader listed in your shaders file afterwards?
-

johnnyenglish
- Space cake
-
- Posts: 733
- Joined: Wed Aug 17, 2011 9:23 am
- Location: Nottingham, England
by gsigms » Wed Aug 24, 2011 8:22 am
johnnyenglish wrote:I'm going to ask the obvious questions now.
Why might this be better than using a light entity?
Do you still need that shader listed in your shaders file afterwards?
This is just an opinion, light/invis brushes are very conveniant in some situations, for example, ambiant light in rooms and corridors: you don't need to place X light entities all along, and then when you need to modify that room/corridor, you just need to modifiy that light brush with it, adjusting the light amount is straighforward too, either in the shader, or by redimensionning the brush itself. As to the shader, you can remove it after compilation.
-

gsigms
-
- Posts: 102
- Joined: Thu Aug 18, 2011 11:24 am
- Location: London, UK
by xandaxs » Wed Aug 24, 2011 9:30 am
That's good for jump maps, I've tons of light entities already and I've to click 1 by 1 ....
-

xandaxs
-
- Posts: 903
- Joined: Wed Aug 17, 2011 5:22 pm
- Location: Oeiras, Portugal
by HappyDay » Wed Aug 24, 2011 10:36 am
I've used brushes like this in HappyWorldJumps but I wouldn't use it again. Some guys have reported issues with mitsu's build where the brushes are not invisible.
Have a happy day! 
-

HappyDay
-
- Posts: 43
- Joined: Sun Aug 21, 2011 9:33 am
-
by gsigms » Wed Aug 24, 2011 10:53 am
HappyDay wrote:I've used brushes like this in HappyWorldJumps but I wouldn't use it again. Some guys have reported issues with mitsu's build where the brushes are not invisible.
I think that would no longer be a problem, since the brushes are deleted from the bsp.
-

gsigms
-
- Posts: 102
- Joined: Thu Aug 18, 2011 11:24 am
- Location: London, UK
by Rylius » Wed Aug 24, 2011 12:57 pm
Uh... surfaceparm nodraw? lol And please rename the strip surfaceparm to q3map_strip since surfaceparms are game related
Rain - Blog - deviantArt<Delirium> I did like a reverse jizz <Delirium> in my pants <Delirium> my jeans went into my sack <Delirium> through my dick
-

Rylius
- King wiki
-
- Posts: 232
- Joined: Wed Aug 17, 2011 8:14 pm
- Location: Germany
-
by gsigms » Wed Aug 24, 2011 7:26 pm
Rylius wrote:Uh... surfaceparm nodraw? lol And please rename the strip surfaceparm to q3map_strip since surfaceparms are game related
checked what I told you on irc, nodraw faces can't emit light.
-

gsigms
-
- Posts: 102
- Joined: Thu Aug 18, 2011 11:24 am
- Location: London, UK
by Rylius » Wed Aug 24, 2011 7:38 pm
Now that's bullshit - maybe we should change that?
Rain - Blog - deviantArt<Delirium> I did like a reverse jizz <Delirium> in my pants <Delirium> my jeans went into my sack <Delirium> through my dick
-

Rylius
- King wiki
-
- Posts: 232
- Joined: Wed Aug 17, 2011 8:14 pm
- Location: Germany
-
by Delirium » Sat Aug 27, 2011 8:51 am
Lol who is this guy? and ry is correct about surfaceparm. looks legit. i wouldnt use it though. seeming lights are stripped from bsp too. adds for shader parameters though. good job
-

Delirium
-
- Posts: 363
- Joined: Sat Aug 27, 2011 8:37 am
- Location: Auckland, New Zealand
-
| |