Facepunch / sbox-issues

176 stars 12 forks source link

Light cookies not baking to lightmap #834

Closed Glitchvid closed 3 years ago

Glitchvid commented 3 years ago

Describe the bug Light cookies are ignored when baking lightmaps, regression from HL:A branch.

To Reproduce

  1. Make a spotlight
  2. Set a cookie texture
  3. Bake lighting
  4. No light cookie on result!

Screenshots Half-Life Alyx: Hol632 s&box: Jl5129 in editor: Occ489

Additional context Compile cmd: H:\Games\steam\steamapps\common\sbox\bin\win64\resourcecompiler.exe -fshallow -maxtextureres 256 -dxlevel 110 -quiet -html -unbufferedio -noassert -i "h:/games/steam/steamapps/common/sbox/addons/glitchvid/maps/zoo_cookies.vmap" -world -bakelighting -lightmapMaxResolution 1024 -vrad3 -lightmapDoWeld -lightmapVRadQuality 1 -lightmapLocalCompile -lightmapCompressionDisabled 0 -phys -vis -nav -sareverb -sapaths -breakpad -nompi -nop4 -outroot "C:\Users\GLITCH~1\AppData\Local\Temp\valve\hammermapbuild\game"

samzanemesis commented 3 years ago

Our lightcookie system is a bit different from Alyx's, I have implemented baking support to it and it should be on Steam later today, you can close the issue if it all works fine image

Glitchvid commented 3 years ago

Thanks for looking at this!

Seems it uses the wrong cookie texture sometimes. 9yq910 gOV128 It should be using a circular cookie, but is instead using the box one. This sometimes happens inside the editor baked preview too.

Occasionally going to baked lighting preview crashes the editor now, I can provide the mdmp if needed (though I assume FP slurps those up and you already have it).

Here's the testmap and my custom cookies. hgissue_834.zip

This is on the manifest version 2381402311324099613

Glitchvid commented 3 years ago

Seems it uses the wrong cookie texture sometimes. 9yq910 gOV128 It should be using a circular cookie, but is instead using the box one. This sometimes happens inside the editor baked preview too.

Appears fixed as of manifest 1119092209049716197