[CS:S] Anvil does not compile any lights.

Started by the new easy, October 28, 2014, 04:43:28 PM

Previous topic - Next topic

the new easy

When I load my map in Counter-Strike: Source, the map has no lighting information; It is fullbright even though I've placed light entities. This happens for light and light_environment.

Entity properties are set to default. Anvil compile options are set to the default preset. My paths are set up for Counter-Strike: Source in settings. I am using Anvil 3.9 and VMF exporter 2.1 in 3ds Max 2015. There are no leaks in the map.

(Editor shown with one wall hidden.)


Map is fullbright. Light entity does not compile.



Code (Compile log) Select
Valve Software - vbsp.exe (May 15 2014)
8 threads
materialPath: D:\SteamLibrary\SteamApps\common\Counter-Strike Source\cstrike\materials
Loading D:\SteamLibrary\SteamApps\common\Counter-Strike Source\cstrike\custom\test_map.vmf
Could not locate 'GameData' key in d:\steamlibrary\steamapps\common\counter-strike source\cstrike\gameinfo.txt
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
Processing areas...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing D:\SteamLibrary\SteamApps\common\Counter-Strike Source\cstrike\custom\test_map.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
   skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
   skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
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) (2373 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 36 texinfos to 6
Reduced 3 texdatas to 3 (53 bytes to 53)
Writing D:\SteamLibrary\SteamApps\common\Counter-Strike Source\cstrike\custom\test_map.bsp
0 seconds elapsed
Valve Software - vvis.exe (May 15 2014)
8 threads
reading d:\steamlibrary\steamapps\common\counter-strike source\cstrike\custom\test_map.bsp
reading d:\steamlibrary\steamapps\common\counter-strike source\cstrike\custom\test_map.prt
   1 portalclusters
   0 numportals
BasePortalVis:       0...1...2...3...4...5...6...7...8...9...10 (0)
PortalFlow:          0...1...2...3...4...5...6...7...8...9...10 (0)
Optimized: 0 visible clusters (0.00%)
Total clusters visible: 1
Average clusters visible: 1
Building PAS...
Average clusters audible: 1
visdatasize:14  compressed from 16
writing d:\steamlibrary\steamapps\common\counter-strike source\cstrike\custom\test_map.bsp
0 seconds elapsed
Valve Software - vrad.exe SSE (May 14 2014)

      Valve Radiosity Simulator     
8 threads
[Reading texlights from 'lights.rad']
[2 texlights parsed from 'lights.rad']

Loading d:\steamlibrary\steamapps\common\counter-strike source\cstrike\custom\test_map.bsp
Setting up ray-trace acceleration structure... Done (0.00 seconds)
30 faces
25486 square feet [3670016.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
30 patches before subdivision
2214 patches after subdivision
1 direct lights
BuildFacelights:     0...1...2...3...4...5...6...7...8...9...10 (0)
BuildVisLeafs:       0...1...2...3...4...5...6...7...8...9...10 (0)
transfers 225566, max 243
transfer lists:   1.7 megs
GatherLight:         0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0006 sec>
FinalLightFace:      0...1...2...3...4...5...6...7...8...9...10 (0)
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 (0)
Writing leaf ambient...done
Ready to Finish

Object names       Objects/Maxobjs  Memory / Maxmem  Fullness
------------       ---------------  ---------------  --------
models                   1/1024           48/49152    ( 0.1%)
brushes                  6/8192           72/98304    ( 0.1%)
brushsides              36/65536         288/524288   ( 0.1%)
planes                  36/65536         720/1310720  ( 0.1%)
vertexes                41/65536         492/786432   ( 0.1%)
nodes                    6/65536         192/2097152  ( 0.0%)
texinfos                 6/12288         432/884736   ( 0.0%)
texdata                  3/2048           96/65536    ( 0.1%)
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                   30/65536        1680/3670016  ( 0.0%)
hdr faces                0/65536           0/3670016  ( 0.0%)
origfaces                6/65536         336/3670016  ( 0.0%)
leaves                   8/65536         256/2097152  ( 0.0%)
leaffaces               30/65536          60/131072   ( 0.0%)
leafbrushes              6/65536          12/131072   ( 0.0%)
areas                    2/256            16/2048     ( 0.8%)
surfedges              160/512000        640/2048000  ( 0.0%)
edges                   81/256000        324/1024000  ( 0.0%)
LDR worldlights          1/8192           88/720896   ( 0.0%)
HDR worldlights          0/8192            0/720896   ( 0.0%)
leafwaterdata            0/32768           0/393216   ( 0.0%)
waterstrips              2/32768          20/327680   ( 0.0%)
waterverts               0/65536           0/786432   ( 0.0%)
waterindices            24/65536          48/131072   ( 0.0%)
cubemapsamples           0/1024            0/16384    ( 0.0%)
overlays                 0/512             0/180224   ( 0.0%)
LDR lightdata         [variable]      129208/0        ( 0.0%)
HDR lightdata         [variable]           0/0        ( 0.0%)
visdata               [variable]          14/16777216 ( 0.0%)
entdata               [variable]         894/393216   ( 0.2%)
LDR ambient table        8/65536          32/262144   ( 0.0%)
HDR ambient table        8/65536          32/262144   ( 0.0%)
LDR leaf ambient         1/65536          28/1835008  ( 0.0%)
HDR leaf ambient         8/65536         224/1835008  ( 0.0%)
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/12       ( 8.3%)
pakfile               [variable]      105687/0        ( 0.0%)
physics               [variable]        2373/4194304  ( 0.1%)
physics terrain       [variable]           2/1048576  ( 0.0%)

Level flags = 0

Total triangle count: 76
Writing d:\steamlibrary\steamapps\common\counter-strike source\cstrike\custom\test_map.bsp
0 seconds elapsed

wallworm

Hmmm... not sure.

Here are the things I would test:

First, open the VMF in Hammer and see if the light entity exists in the VMF. If not, then I would check these scenarios:

1) Make sure that the VMF Exporter has the options for exporting Lights and Point Entities.
2) If the light is hidden, make sure to turn on the Hidden Objects export option or unhide the light.
3) Make sure the light is not in a layer named "VMF_Exclude".

If the light does appear in Hammer, check the light's color in the Hammer properties. If the brightness (fourth value) is near zero or ridiculously high, it can mean that the lgith's Multipler is too high/low or that the VMF Exporter's light multiplier is too high/low.

Also check the default Ambient light settings in the vmf exporter.

Another possibility is that your materials are using the UnlitGeneric shader or a shader that isn't valid for brushes.

Let me know what you find.

the new easy

#2
Okay, I checked each of those scenarios and the lights still didn't work, but... After an interim of ~24hrs, during which I restarted my computer, I compiled the same map under the same settings and the lighting worked. Unfortunately since I let so much time pass I didn't have a controlled environment to tell me what exactly fixed the problem, but if I come across it again I'll post here and try to get a better grasp of what's causing it.

On a side note: Does rotating the light_environment entity in the viewport change the angle of the sunlight in game? I know there's yaw pitch and roll entity properties in the command panel.

wallworm

I'm glad it works now.

Sometimes restarting Steam or the SDK can alleviate random problems. Perhaps this was one of those.

For all point entities, the angles are derived from the entity transform inside 3ds Max. I haven't personally found this to be an issue as I'm used to working in a non-Hammer workflow. In the future, I may add a two-way bind to the max transform and entity angles property (so you can see the angle value correctly or rotate the Max object by typing in the values manually). But at the moment, it is just the object's actual orientation that is used. (Off the top of my head, I think that brush entities do use the angles field, but it won't affect how the object is oriented in Max.)

The exception is with props parented to func_tracktrain entities. In that scenario, wwmt proxies will always export aligned to the world if they are linked children of a func_tracktrain entity. This has to do with requirement of prop orientations in Source using those entities.

In terms of lights, there are many entity properties that are controlled with the native light properties. The color of the native light is used over the entity, though changing one should change the other in Max. The brightness of a light is determined by the light's multiplier property times the VMF Exporter's light multiplier. The hotspot and falloff of a Max spot light control the inner/outer limits of the entity.

There is a quirk with lights that I may modify in the future: If you enable the Use Near Attenuation setting in the light's native parameters, the near attenuation's Start/End override the 50 percent falloff distance (Start) and 0 percent falloff distance (End). I did this because it is a native property with a visualize in the viewport if you hit the Show checkbox. Also, if you enable the Use Far Attenuation, the End distance will override the Maximum Distance property. Again, this is for a visual gizmo.

I may change this last set of overrides because the Attenuation settings in Max do not work as identical properties in Max/Source. I simply did this for convenience in visualizing the distances, but it has led to some confusion (partly because I haven't documented it well).

SMF spam blocked by CleanTalk