One text light works, the other doesn't

One text light works, the other doesn't

Re: One text light works, the other doesn't Posted by DJ Arendee on Sun Apr 8th 2012 at 2:54am
DJ Arendee
4 posts
Posted 2012-04-08 2:54am
4 posts 0 snarkmarks Registered: Apr 8th 2012
Strange problem, I'm hoping it isn't a bug.

Im making a simple map in left 4 dead 2 with modular prefab hallways. The hallways are lit with texture lights, specifically dev/dev_interiorlight02b.

At first, things were going swell. I compile the map, the lights work. The map was very small at first.

Then I went prefab crazy and increased the size of the map by 400%. I compiled the map, I got 100 or so light bounces in vrad. It took a while but it compiled. When it was done I played the map. Only half of the map is lit. Its almost like vrad just sorta, gave up.

So I try something new, I replace all textures with the plain white texture, then apply the proper coding in lights.rad to emit light with that texture. It works just fine, compiles quickly.

I replace the textures back to dev_interiorlight02b and compile again. This time I get NO lights whatsoever.

Any idea what I can do?

Here is my lights.rad coding, and my latest compile log.

note: I had about 100 light bounces, which is unusual. It just kept computing them, I don't think it shows in the log.
lights.rad

xeno/crys_4b 255 160 128 40000
lights/white002 189 233 247 425
dev/dev_interiorlight02b 255 208 98 125
tools/toolswhite 255 241 187 200
compile log (normal bsp, fast vis, normal rad)

materialPath: F:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\materials
Loading F:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.vmf
Patching WVT material: maps/dw_entrance/dev/dev_blendmeasure_wvt_patch
fixing up env_cubemap materials on brush sides...
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing F:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.prt...Building visibility clusters...
done (0)
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (176859 bytes)
Cannot build Physics2 data
-----------
DataLinker total stream size 0.0 KiB
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 455 texinfos to 264
Reduced 33 texdatas to 26 (1534 bytes to 1317)
Writing F:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.bsp
0 seconds elapsed

4 threads
reading f:\program files\steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.bsp
max farz in all env_fog_controller entities: -1.000000 (used for radial vis)
reading f:\program files\steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.prt
558 portalclusters
1498 numportals
0...1...2...3...4...5...6...7...8...9...10Optimized: 16007 visible clusters (0.00%)
Total clusters visible: 199963
Average clusters visible: 358
Building PAS...
Average clusters audible: 555
visdatasize:78860 compressed from 80352
writing f:\program files\steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.bsp
0 seconds elapsed

[Reading texlights from 'lights.rad']
[4 texlights parsed from 'lights.rad']

Loading f:\program files\steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.bsp
2215 faces
2 degenerate faces
21802 square feet [3139554.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
2213 patches before subdivision
5963 patches after subdivision
232 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10transfers 532840, max 354
transfer lists: 4.1 megs
0...1...2...3...4...5...6...7...8...9...10 Bounce #1 added RGB(41969, 24893, 4239)
0...1...2...3...4...5...6...7...8...9...10 Bounce #2 added RGB(2676, 1577, 253)
0...1...2...3...4...5...6...7...8...9...10 Bounce #3 added RGB(226, 133, 20)
0...1...2...3...4...5...6...7...8...9...10 Bounce #4 added RGB(22, 13, 2)
0...1...2...3...4...5...6...7...8...9...10 Bounce #5 added RGB(2, 1, 0)
0...1...2...3...4...5...6...7...8...9...10 Bounce #6 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0011 sec>
0...1...2...3...4...5...6...7...8...9...10FinalLightFace Done
9 of 232 (3% of) surface lights went in leaf ambient cubes.
0...1...2...3...4...5...6...7...8...9...10Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 15/1024 720/49152 ( 1.5%)
brushes 408/8192 4896/98304 ( 5.0%)
brushsides 3349/65536 26792/524288 ( 5.1%)
planes 1566/65536 31320/1310720 ( 2.4%)
vertexes 3254/65536 39048/786432 ( 5.0%)
nodes 1217/65536 38944/2097152 ( 1.9%)
texinfos 264/12288 19008/884736 ( 2.1%)
texdata 26/2048 832/65536 ( 1.3%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 2215/65536 124040/3670016 ( 3.4%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 1276/65536 71456/3670016 ( 1.9%)
leaves 1233/65536 39456/2097152 ( 1.9%)
leaffaces 2413/65536 4826/131072 ( 3.7%)
leafbrushes 640/65536 1280/131072 ( 1.0%)
areas 2/256 16/2048 ( 0.8%)
surfedges 15567/512000 62268/2048000 ( 3.0%)
edges 9069/256000 36276/1024000 ( 3.5%)
LDR worldlights 232/8192 23200/819200 ( 2.8%)
HDR worldlights 0/8192 0/819200 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 168/32768 1680/327680 ( 0.5%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 3039/65536 6078/131072 ( 4.6%)
cubemapsamples 9/1024 144/16384 ( 0.9%)
overlays 0/512 0/180224 ( 0.0%)
LDR lightdata [variable] 245496/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 78860/16777216 ( 0.5%)
entdata [variable] 9179/393216 ( 2.3%)
LDR ambient table 1233/65536 4932/262144 ( 1.9%)
HDR ambient table 1233/65536 4932/262144 ( 1.9%)
LDR leaf ambient 3514/65536 98392/1835008 ( 5.4%)
HDR leaf ambient 1233/65536 34524/1835008 ( 1.9%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
Prop Hull Verts 0/0 0/0 ( 0.0%)
Prop Hull Blob 0/0 0/0 ( 0.0%)
Prop Hull Lists 0/0 0/0 ( 0.0%)
Prop Hulls 0/0 0/0 ( 0.0%)
Prop Hull trilist 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/12 ( 8.3%)
pakfile [variable] 874834/0 ( 0.0%)
physics [variable] 176859/4194304 ( 4.2%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 5936
Writing f:\program files\steam\steamapps\common\left 4 dead 2\left4dead2\maps\DW_Entrance.bsp
3 seconds elapsed
Re: One text light works, the other doesn't Posted by Orpheus on Sun Apr 8th 2012 at 12:17pm
Orpheus
13860 posts
Posted 2012-04-08 12:17pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
If I am reading this right...

Textured lights do not have the same value as entity lights. It takes a much higher value than you would expect to get it to shine.

You don't need 100 bounces. 5 or 10 usually suffice.

The best things in life, aren't things.
Re: One text light works, the other doesn't Posted by Riven on Sun Apr 8th 2012 at 5:41pm
Riven
1640 posts
Posted 2012-04-08 5:41pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
I'm not very familiar with the lights.rad file so I don't know the breadth of errors it may cause when editing it, but I understand what it does.

When you added those other prefabs, did any of them contain any actual light entities?

I think Source has a hard limit of up to six different named light sources converging on one another. Any more than that and it may just not compile VRAD. I know you're working with textured lights, but perhaps they have a hard limit to how many of them (named or not tied to an entity) can be converging on one another. I would test each of your edited texture lights in individual test maps, then all the lights in one box-test map, then with entity lights thrown in. If that doesn't work, change all your textured lights to the same color and see if that makes a difference. I understand Source may have an issue again with calculating too many colored lights converging too, I just don't know if there is a hard limit for that also.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: One text light works, the other doesn't Posted by DJ Arendee on Sun Apr 8th 2012 at 10:11pm
DJ Arendee
4 posts
Posted 2012-04-08 10:11pm
4 posts 0 snarkmarks Registered: Apr 8th 2012
Update:

I rearranged the map and through process of elimination I have found a prefab hallway that slants upward.

Basically imagine a complex straight hallway that I grabbed and skewed it upward, so I could connect one hallway to another hallway on a higher level.

so when I render the prefab ramp hallway by itself with all the other vis-groups turned off, it works just fine.

When I render the hallway connected to the rest of the map, it gives me 100 bounces against my will then in-game the entire map is dark. If I had to guess, I'd say something about the hallway being ramped upward makes the light rendering very difficult. Also, the texture lights are rotated 14 degrees each to match the incline. I'm clueless as to what exactly is going wrong. If I change the textlights to just dev_toolswhite, then it works just fine.

My map contains only texture lights. No spotlights, env_lights or dynamic lights. Just texture lights.

Here is a picture of the hallway
User posted image
Behind the "nodraw" blocks (which are actually func_dustclouds that are triggered) are func_breakable that the zombies break through in left 4 dead 2. So behind these walls is an inaccessible zombie-only hallway. The func_breakables are basically just the walls you see there, but I took the clip brush and carved a hole in as clean and optimized a way as possible.
Re: One text light works, the other doesn't Posted by DJ Arendee on Sun Apr 8th 2012 at 10:52pm
DJ Arendee
4 posts
Posted 2012-04-08 10:52pm
4 posts 0 snarkmarks Registered: Apr 8th 2012
Well, it works now, I fixed it.

I figured I'd try to optimize it. If you look at the ceiling you'll see rusty chunks. All of those were BSP brushes, which I turned into func_details. After compiling, it gave me some random leak that made no sense shooting through the floor. So I deleted the floor and started over and voila. Fixed. I also deleted every other cubemap.

Somewhere in here I did something right.
Re: One text light works, the other doesn't Posted by Riven on Mon Apr 9th 2012 at 12:27am
Riven
1640 posts
Posted 2012-04-09 12:27am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
When it comes to optimizing, it always helps to construct the BSP from the ground up and diable the func_detail vis group to see how much work the engine actually has to do. Making that more clean and with as few brushes as possible is a good habit to save time down the line with possible more complex errors.

Glad to hear that's all it was! :sherlock:
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202