Lighting Problems

soylent robot

L420: High Member
May 26, 2009
499
394
I'm having some lighting issues, as you may have guessed.

displacementproblem.jpg


The first is my displacements aren't being lit up by certain lights. They're fine with light from the skybox, but here they wont be lit up. Im using light and light_spot entities on each of the lamps you can see. They light up the rocks and other props, and players, but not the displacements. It there something Ive missed with the displacements or lights, or is this a leak or cubemap issue?

rockproblem.jpg


My second problem is that this particular prop (and only this prop) refuses to be lit up by anything. The prop is cliff_wall_05 as a prop_static. I've used it elsewhere in my level and it's fine there, it's just this particular one. I think the problem might be that I've surrounded it with clip blocks (the red, block everything clip, not player_clip) to stop players wandering through it, but I dont see how because clip isn't supposed to block light, right?

Any help is much appreciated
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
The first issue is most likely caused by a leak so you should post a compile log. The second issue is due to the default way models are lit in the engine. Models are lit up by their origin (the little yellow cross) so if it's placed within an object then it will appear black or unusually dark. This can be rectified by compiling with some extra commands added to VRAD which you can read about here.
 

soylent robot

L420: High Member
May 26, 2009
499
394
Ive fixed the second problem with that tutorial, thanks!

Here's the compile log


** Executing...
** Command: "c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk\bin\orangebox\bin\vbsp.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\darkerthedragon\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads"

Valve Software - vbsp.exe (May 19 2009)
3 threads
materialPath: c:\program files (x86)\steam\steamapps\darkerthedragon\team fortress 2\tf\materials
Loading C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.vmf
Patching WVT material: maps/ctf_loggerheads/dev/dev_blendmeasure_wvt_patch
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (1)
**** leaked ****
Entity prop_static (-3370.00 -728.00 -990.00) leaked!

FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (5120.0 3584.0 118.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4608.0 4096.0 118.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (3584.0 4096.0 118.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4160.0 2048.0 -928.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4230.0 2048.0 -928.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4678.0 2048.0 -928.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4160.0 2048.0 166.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:


FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (4230.0 2048.0 166.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:

*** Suppressing further FindPortalSide errors.... ***
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 572 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
*** Error: Skybox vtf files for skybox/sky_trainyard_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file skybox/sky_trainyard_01 to build the default cubemap!
*** Error: Skybox vtf files for skybox/sky_trainyard_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file skybox/sky_trainyard_01 to build the default cubemap!
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) (458500 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9..Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!
.10
Water found with no water_lod_control entity, creating a default one.
Compacting texture/material tables...
Reduced 2439 texinfos to 1359
Reduced 104 texdatas to 100 (2129 bytes to 2016)
Writing C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.bsp
7 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk\bin\orangebox\bin\vvis.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\darkerthedragon\team fortress 2\tf" -fast "C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads"

Valve Software - vvis.exe (May 19 2009)
fastvis = true
3 threads
reading c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.bsp
reading c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.prt
LoadPortals: couldn't read c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.prt


** Executing...
** Command: "c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk\bin\orangebox\bin\vrad.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\darkerthedragon\team fortress 2\tf" -noextra "C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads"

Valve Software - vrad.exe SSE (May 19 2009)

Valve Radiosity Simulator
3 threads
[Reading texlights from 'lights.rad']
[34 texlights parsed from 'lights.rad']

Loading c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.bsp
No vis information, direct lighting only.
Setting up ray-trace acceleration structure... Done (6.37 seconds)
5617 faces
1641892 square feet [236432480.00 square inches]
65 Displacements
250991 Square Feet [36142808.00 Square Inches]
54 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (22)
Build Patch/Sample Hash Table(s).....Done<0.0960 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (6)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (34)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 21/1024 1008/49152 ( 2.1%)
brushes 1280/8192 15360/98304 (15.6%)
brushsides 9261/65536 74088/524288 (14.1%)
planes 6272/65536 125440/1310720 ( 9.6%)
vertexes 13095/65536 157140/786432 (20.0%)
nodes 3012/65536 96384/2097152 ( 4.6%)
texinfos 1359/12288 97848/884736 (11.1%)
texdata 100/2048 3200/65536 ( 4.9%)
dispinfos 65/0 11440/0 ( 0.0%)
disp_verts 8801/0 176020/0 ( 0.0%)
disp_tris 14848/0 29696/0 ( 0.0%)
disp_lmsamples 577460/0 577460/0 ( 0.0%)
faces 5617/65536 314552/3670016 ( 8.6%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 3337/65536 186872/3670016 ( 5.1%)
leaves 3034/65536 97088/2097152 ( 4.6%)
leaffaces 7426/65536 14852/131072 (11.3%)
leafbrushes 2974/65536 5948/131072 ( 4.5%)
areas 2/256 16/2048 ( 0.8%)
surfedges 41059/512000 164236/2048000 ( 8.0%)
edges 27618/256000 110472/1024000 (10.8%)
LDR worldlights 54/8192 4752/720896 ( 0.7%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 2/32768 24/393216 ( 0.0%)
waterstrips 910/32768 9100/327680 ( 2.8%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 16665/65536 33330/131072 (25.4%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 24/512 8448/180224 ( 4.7%)
LDR lightdata [variable] 9355176/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 0/16777216 ( 0.0%)
entdata [variable] 26954/393216 ( 6.9%)
LDR ambient table 3034/65536 12136/262144 ( 4.6%)
HDR ambient table 3034/65536 12136/262144 ( 4.6%)
LDR leaf ambient 23993/65536 671804/1835008 (36.6%)
HDR leaf ambient 3034/65536 84952/1835008 ( 4.6%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/34892 ( 0.0%)
pakfile [variable] 721/0 ( 0.0%)
physics [variable] 458500/4194304 (10.9%)
physics terrain [variable] 25806/1048576 ( 2.5%)

Level flags = 0

Total triangle count: 16503
Writing c:\program files (x86)\steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.bsp
1 minute, 9 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Program Files (x86)\Steam\steamapps\darkerthedragon\sourcesdk_content\tf\mapsrc\ctf_loggerheads.bsp" "c:\program files (x86)\steam\steamapps\darkerthedragon\team fortress 2\tf\maps\ctf_loggerheads.bsp"

I have a feeling it's to do with those FindPortalSide entries
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
You're right! :p In Hammer click Map > Load Pointfile (it's on the top toolbar) and then follow the red line that will appear somewhere. It should lead to a gap in your world brushes that is causing a leak. Close it up, recompile, then keep fixing the leaks until it compiles without any errors.
 

soylent robot

L420: High Member
May 26, 2009
499
394
Ive fixed a few of the gaps, but Ive run up against this weird one. It doesnt seem to be going to or from anything.

redline.jpg


I tried select all, which didnt reveal any misplaced origin points. its really weird :blink:

also, whats that "Material NATURE/BLENDGROUNDTOGRASS007 uses unknown detail object type tf_forest_grass!" about?
 

xzzy

aa
Jan 30, 2010
815
531
I'd assume that that barrel near the point where the line ends is what's leaking. Why it's leaking, I can't tell from the image. Either the origin is outside the map, or there's something wrong with the sealing brush (the one with the nodraw texture).

Delete or move the barrel, see what happens. If you're 100% sure the barrel's origin is inside sealed geometry, the compiler is probably deleting your brush. There will probably be hints to why in the compile log.