Static prop lighting issue

Any aspects of level design for the Source engine.

Static prop lighting issue

Postby Statua on Fri Jun 06, 2014 12:51 am

I'm having some issues with my map. In large areas, static props are only being lit by the ambient value of the light_environment. Yet the same props in other areas are being lit by both. It's not the props themselves or the origin. I've tried fixing that with the lighting origin setting. It seems that if a static prop is in that specific area, it doesn't receive sun rays, only ambient rays. There are no brushes to explain why this is occurring. I compiled with -staticproppolys and -textureshadows on full and final. It also seems that while I do have staticproppolys enabled, static props do not cast shadows on the ground, at all. Dynamic entities such as prop_dynamic or props you spawn in garrysmod don't seem to be affected by this issue.

Image
The trees behind the fence are in the 3D skybox. The pine trees in the 3D sky are lit because I'm fairly certain the texture on the model is unlitgeneric.


Here's a compile log:

Code: Select all
================== VBSP ==================



materialPath: C:\Program Files (x86)\Steam\SteamApps\common\Half-Life 2\ep2\materials
Loading C:\mapsrc\rp_rockford_v0p.vmf
ConVarRef mat_reduceparticles doesn't point to an existing ConVar
Can't find surfaceprop asphalt for material OCRP/URBAN/ROAD_1_02, using default
material "ajacks/ben_paintblue" not found.
Material not found!: AJACKS/BEN_PAINTBLUE
Warning in .VMT file ($envmaptint): no ']' or '}' found in vector key "$envmaptint".
Did you forget to surround the vector with "s?
Could not locate 'GameData' key in c:\program files (x86)\steam\steamapps\common\half-life 2\ep2\gameinfo.txt
Patching WVT material: maps/rp_rockford_v0p/nature/blendmilground008b_2_wvt_patch
Patching WVT material: maps/rp_rockford_v0p/nature/blendgrassdirt01_noprop_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...
Merged 3358 detail faces...done (1)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (5)
writing C:\mapsrc\rp_rockford_v0p.prt...Building visibility clusters...
done (0)
Can't load skybox file skybox/painted to build the default cubemap!
Can't load skybox file skybox/painted to build the default cubemap!
Finding displacement neighbors...
Found a displacement edge abutting multiple other edges.
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (2) (2661060 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 10673 texinfos to 6476
Reduced 1677 texdatas to 1487 (88537 bytes to 79556)
Writing C:\mapsrc\rp_rockford_v0p.bsp
28 seconds elapsed

================== VVIS ==================




8 threads
reading c:\mapsrc\rp_rockford_v0p.bsp
reading c:\mapsrc\rp_rockford_v0p.prt
3270 portalclusters
8375 numportals
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10Optimized: 17164 visible clusters (0.82%)
Total clusters visible: 2091332
Average clusters visible: 639
Building PAS...
Average clusters audible: 2523
visdatasize:1763911  compressed from 2720640
writing c:\mapsrc\rp_rockford_v0p.bsp
2 hours, 15 minutes, 9 seconds elapsed

================== VRAD ==================




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

Loading c:\mapsrc\rp_rockford_v0p.bsp
Loaded alpha texture materials\models\props_foliage\cedar01_mip0.vtf
Loaded alpha texture materials\models\props_foliage\arbre01.vtf
Loaded alpha texture materials\Models\props_wasteland\fence_alpha.vtf
Error! Unable to load file "models/props_foliage/urban_streettree01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_pot_large01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_small_palm01.dx80.vtx"
Loaded alpha texture materials\models\props_foliage\Mall_trees_branches01.vtf
Error! Unable to load file "models/props_foliage/mall_big_plant01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_bigleaves_plant03.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_bush02.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_pot_squarexl01.dx80.vtx"
Error! Unable to load file "models/props_foliage/urban_tree_giant01_skysphere.dx80.vtx"
Loaded alpha texture materials\models\props_forest\FenceBarbedWire_Wire.vtf
Loaded alpha texture materials\models\props_forest\FenceBarbedWire_Wire2.vtf
Error! Unable to load file "models/props_foliage/urban_tree_giant01.dx80.vtx"
30565 faces
22 degenerate faces
23960970 square feet [3450379776.00 square inches]
729 Displacements
8164477 Square Feet [1175684736.00 Square Inches]
30543 patches before subdivision
565693 patches after subdivision
1071 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10transfers 80329404, max 2082
transfer lists: 612.9 megs
0...1...2...3...4...5...6...7...8...9...10   Bounce #1 added RGB(829839, 776389, 667952)
0...1...2...3...4...5...6...7...8...9...10   Bounce #2 added RGB(311629, 254043, 184465)
0...1...2...3...4...5...6...7...8...9...10   Bounce #3 added RGB(130400, 99871, 65654)
0...1...2...3...4...5...6...7...8...9...10   Bounce #4 added RGB(58981, 42966, 25838)
0...1...2...3...4...5...6...7...8...9...10   Bounce #5 added RGB(29331, 20785, 11473)
0...1...2...3...4...5...6...7...8...9...10   Bounce #6 added RGB(14703, 10047, 5069)
0...1...2...3...4...5...6...7...8...9...10   Bounce #7 added RGB(7907, 5244, 2409)
0...1...2...3...4...5...6...7...8...9...10   Bounce #8 added RGB(4216, 2686, 1121)
0...1...2...3...4...5...6...7...8...9...10   Bounce #9 added RGB(2355, 1447, 547)
0...1...2...3...4...5...6...7...8...9...10   Bounce #10 added RGB(1302, 765, 262)
0...1...2...3...4...5...6...7...8...9...10   Bounce #11 added RGB(742, 418, 129)
0...1...2...3...4...5...6...7...8...9...10   Bounce #12 added RGB(419, 225, 63)
0...1...2...3...4...5...6...7...8...9...10   Bounce #13 added RGB(242, 124, 31)
0...1...2...3...4...5...6...7...8...9...10   Bounce #14 added RGB(139, 68, 16)
0...1...2...3...4...5...6...7...8...9...10   Bounce #15 added RGB(81, 38, 8)
0...1...2...3...4...5...6...7...8...9...10   Bounce #16 added RGB(47, 21, 4)
0...1...2...3...4...5...6...7...8...9...10   Bounce #17 added RGB(27, 12, 2)
0...1...2...3...4...5...6...7...8...9...10   Bounce #18 added RGB(16, 6, 1)
0...1...2...3...4...5...6...7...8...9...10   Bounce #19 added RGB(9, 4, 0)
0...1...2...3...4...5...6...7...8...9...10   Bounce #20 added RGB(5, 2, 0)
0...1...2...3...4...5...6...7...8...9...10   Bounce #21 added RGB(3, 1, 0)
0...1...2...3...4...5...6...7...8...9...10   Bounce #22 added RGB(2, 1, 0)
0...1...2...3...4...5...6...7...8...9...10   Bounce #23 added RGB(1, 0, 0)
0...1...2...3...4...5...6...7...8...9...10   Bounce #24 added RGB(1, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.4621 sec>
0...1...2...3...4...5...6...7...8...9...10FinalLightFace Done
Computing detail prop lighting : 0...1...2...3...4...5...6...7...8...9...10
0 of 0 (0% 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                  99/1024         4752/49152    ( 9.7%)
brushes               7308/8192        87696/98304    (89.2%) VERY FULL!
brushsides           50789/65536      406312/524288   (77.5%)
planes               19400/65536      388000/1310720  (29.6%)
vertexes             58906/65536      706872/786432   (89.9%) VERY FULL!
nodes                 9596/65536      307072/2097152  (14.6%)
texinfos              6476/12288      466272/884736   (52.7%)
texdata               1487/2048        47584/65536    (72.6%)
dispinfos              729/0          128304/0        ( 0.0%)
disp_verts           46673/0          933460/0        ( 0.0%)
disp_tris            72096/0          144192/0        ( 0.0%)
disp_lmsamples     4537620/0         4537620/0        ( 0.0%)
faces                30565/65536     1711640/3670016  (46.6%)
hdr faces                0/65536           0/3670016  ( 0.0%)
origfaces            19996/65536     1119776/3670016  (30.5%)
leaves                9696/65536      310272/2097152  (14.8%)
leaffaces            38643/65536       77286/131072   (59.0%)
leafbrushes          17205/65536       34410/131072   (26.3%)
areas                   11/256            88/2048     ( 4.3%)
surfedges           202623/512000     810492/2048000  (39.6%)
edges               149438/256000     597752/1024000  (58.4%)
LDR worldlights       1071/8192        94248/720896   (13.1%)
HDR worldlights          0/8192            0/720896   ( 0.0%)
leafwaterdata            4/32768          48/393216   ( 0.0%)
waterstrips              0/32768           0/327680   ( 0.0%)
waterverts               0/65536           0/786432   ( 0.0%)
waterindices             0/65536           0/131072   ( 0.0%)
cubemapsamples         586/1024         9376/16384    (57.2%)
overlays                49/512         17248/180224   ( 9.6%)
LDR lightdata         [variable]    37939916/0        ( 0.0%)
HDR lightdata         [variable]           0/0        ( 0.0%)
visdata               [variable]     1763911/16777216 (10.5%)
entdata               [variable]      930489/393216   (236.6%) VERY FULL!
LDR ambient table     9696/65536       38784/262144   (14.8%)
HDR ambient table     9696/65536       38784/262144   (14.8%)
LDR leaf ambient     45755/65536     1281140/1835008  (69.8%)
HDR leaf ambient      9696/65536      271488/1835008  (14.8%)
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/2458060  ( 0.0%)
dtl prp lght          [variable]           1/275114   ( 0.0%)
HDR dtl prp lght      [variable]           1/4        (25.0%)
static props          [variable]           1/274862   ( 0.0%)
pakfile               [variable]      479634/0        ( 0.0%)
physics               [variable]     2661060/4194304  (63.4%)
physics terrain       [variable]      205561/1048576  (19.6%)

Level flags = 0

Total triangle count: 61319
Writing c:\mapsrc\rp_rockford_v0p.bsp
47 minutes, 1 second elapsed


I've tried rebuilding the 3D skybox. I've tried rebuilding the entire maps skybox. I've tried lighting origin. I've tried creating clean new static prop entities (instead of copypasta props). I've tried not using any compile prarmeters.

Any ideas?
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby beach on Fri Jun 06, 2014 6:46 pm

Hi,
you can try to put info_lighting in the truck and link him with the prop_static
In source engine the lighting of a static prop is define by the object's origin. So if the origin of the tree is in the ground it appears black.
Image
beach
Member
Member
 
Joined: Mon May 19, 2014 7:17 pm

Re: Static prop lighting issue

Postby Statua on Fri Jun 06, 2014 9:08 pm

I've tried lighting origin, as I've mentioned in the OP.
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby beach on Fri Jun 06, 2014 10:15 pm

Oh sorry, i think i have skip this part

I found this in your log

Code: Select all
entdata [variable] 930489/393216 (236.6%) VERY FULL!

It's a lot of entities ..

Code: Select all
Found a displacement edge abutting multiple other edges.

I dont know if it's really an error but if it's about your floor displacement you should worry about that.

Code: Select all
Error! Unable to load file "models/props_foliage/urban_streettree01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_pot_large01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_small_palm01.dx80.vtx"
Loaded alpha texture materials\models\props_foliage\Mall_trees_branches01.vtf
Error! Unable to load file "models/props_foliage/mall_big_plant01.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_bigleaves_plant03.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_bush02.dx80.vtx"
Error! Unable to load file "models/props_foliage/mall_pot_squarexl01.dx80.vtx"
Error! Unable to load file "models/props_foliage/urban_tree_giant01_skysphere.dx80.vtx"


Custom model ? Or CS:GO models ? Did your black tree model is in this list ? If it is, you should fix this by compiling your model properly i think ( Did someone still use Dx8 ? )

Code: Select all
22 degenerate faces

Usually it's not a dangerous error but who knows ? Sometimes source is hard to understand.
Image
beach
Member
Member
 
Joined: Mon May 19, 2014 7:17 pm

Re: Static prop lighting issue

Postby Riomaki on Sun Jun 08, 2014 4:57 pm

Y'know, I think I've heard about degenerate faces sometimes causing something like this, although I've never witnessed it myself. The Interlopers error page states:

"Rarely, this error can cause all the lighting in your level to become black. If this happens, you will have to track down the degenerate face(s)."

The other errors I wouldn't worry about. I don't know enough about your mod to know if the missing textures are harmful or not, but I'll assume you've already investigated that. A few other things you might check:

- When you tried the lighting origin approach, did you try tying all of these things to the same origin that you knew was in a brightly lit place?
- If your 3D skybox contains geometry or models, did you make sure to Disable Shadows on all of it?
- What arguments are you sending into VRAD (i.e. "StaticPropPolys")?
Riomaki
Regular
Regular
 
Joined: Sun Jul 14, 2013 12:28 am

Re: Static prop lighting issue

Postby Statua on Mon Jun 09, 2014 6:00 pm

When I did lighting orgin, I tried doing it on a select few trees but no result. I havent changed the properties of the 3D sky models so ill give that a go. As for VRAD, I mentioned earlier i used -staticproppolys and -textureshadows
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby beach on Mon Jun 09, 2014 8:00 pm

Did you find the degenerates faces ?
Image
beach
Member
Member
 
Joined: Mon May 19, 2014 7:17 pm

Re: Static prop lighting issue

Postby Statua on Mon Jun 09, 2014 11:53 pm

Update: I figured out a pattern in this. Any static prop that is in line of sight of the light_environment entity is lit by it. All others are only lit by the ambience. I'm going to try putting the entity in the 3D skybox and see what happens.
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby Statua on Wed Jun 11, 2014 1:40 am

I compiled it with the light_environment in the skybox, it's confirmed that the lighting pattern of the 'brightness' keyvalue lights all static props that can 'see' the light_environment entity (by see i mean with visleafs, not geometry) I moved the light_environment entity from the main world to the 3D skybox. All the prop_static entities in the 3D skybox are now lit by the brightness keyvalue, but the prop_static entities in the rest of the world are only lit by the ambient keyvalue.

Image

I'm going to look into the 22 degenerate faces...
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby Statua on Thu Jun 26, 2014 4:13 am

No idea how but in my laziness, I wanted to change the lighting to HDR like my Ineu Valley 2 map so I just copied the sun from there. Fixed this problem.

Wtf source engine.... wtf....
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby ErikKiller on Thu Jun 26, 2014 1:55 pm

Statua wrote:...so I just copied the sun from there...

One does not NOT paste-special in Source.
Image
Image
First rodeo? Use the Source SDK Documentation for reference!
User avatar
ErikKiller
May Contain Skills
May Contain Skills
 
Joined: Sun Sep 09, 2007 4:05 pm
Location: Estonia

Re: Static prop lighting issue

Postby Statua on Fri Jun 27, 2014 12:59 am

ErikKiller wrote:
Statua wrote:...so I just copied the sun from there...

One does not NOT paste-special in Source.
Wait what? It's my map.... You made me confused.
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Re: Static prop lighting issue

Postby Statua on Thu Jul 03, 2014 6:14 am

Ok just for the record, in case anyone gets this error again, here's what was causing it cause I just caused it again. If you add the keyvalue 'targetname' to your light_environment entity for daynight cycle use, it can cause this.
Statua
Dumpling
Dumpling
 
Joined: Fri Jun 06, 2014 12:48 am

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users