Commit Graph

306 Commits

Author SHA1 Message Date
Eric Wasylishen a3d55f905e qbsp: fix structural solid not eating other content types 2023-03-26 17:13:34 -06:00
Eric Wasylishen 6e064ae3c7 qbsp: restore detail to non-sealing 2023-03-26 16:20:10 -06:00
Eric Wasylishen 8130843fb3 qbsp: search for wad's relative to cwd 2023-02-26 23:27:38 -07:00
Eric Wasylishen 0f53fd0870 tests: change decompiler test to an easier to debug setup 2023-02-26 21:47:26 -07:00
Eric Wasylishen 505efbf885 tests: standardize map naming convention 2023-02-25 12:46:22 -07:00
Eric Wasylishen 096f347a12 qbsp: fix func_detail_fence/func_detail_wall with DETAIL set on brushes 2023-02-22 01:16:32 -07:00
Eric Wasylishen 2fb75ede17 tests: add q2 func_detail_wall and func_detail_fence test case 2023-02-22 00:11:30 -07:00
Eric Wasylishen 58da610207 tests: add func_detail_wall tjunc test (currently fails) 2023-02-21 19:49:36 -07:00
Eric Wasylishen f8b189c527 light: fix sample occlusion / object channel mask interaction 2023-02-20 01:03:12 -07:00
Eric Wasylishen dd6e49c89f light: support _object_channel_mask on func_group 2023-02-20 00:07:08 -07:00
Eric Wasylishen 8cc7b0e3f3 light: add test for sky getting an optimized lightmap 2023-02-17 00:24:08 -07:00
Eric Wasylishen 641fb780ac light: allow customizing _world_units_per_luxel on func_group etc. 2023-02-17 00:07:43 -07:00
Eric Wasylishen 1c16a467f1 testqbsp: add a basic lit water test 2023-02-04 14:41:26 -07:00
Eric Wasylishen 302d600f4c qbsp: strip _tb_ keys, convert __TB_empty to skip 2023-01-30 00:28:31 -07:00
Eric Wasylishen 439d0de7f2 testmaps: test case for hint brush causing faces to be deleted 2023-01-29 15:06:55 -07:00
Eric Wasylishen 6ede7925bc light: apply model offset to embree meshes
Fixes shadows in incorrect places when using shadow-casting rotators
Fixes https://github.com/ericwa/ericw-tools/issues/326
2023-01-24 20:18:14 -07:00
Eric Wasylishen 2d64108ea4 light: add basic test case for _sun 1 entities 2023-01-24 00:57:26 -07:00
Eric Wasylishen fa8af3845b light: fix default _sunlight angle to be pointing straight down 2023-01-24 00:52:28 -07:00
Eric Wasylishen a497254874 tests: add q2 light cone test 2023-01-08 20:26:32 -07:00
Eric Wasylishen a2399ab48c tests: add dirt / object_channel_mask interaction test
was already working correctly
2023-01-08 19:59:19 -07:00
Eric Wasylishen e9cd29a394 tests: add test case for WINDOW being non-mirrored 2023-01-06 12:07:30 -07:00
Eric Wasylishen 64c0d8c0c4 qbsp: fix AUX to be non-mirrorinside by default 2023-01-06 12:00:32 -07:00
Eric Wasylishen aa928e1515 tests: add q2 ladder test case 2023-01-03 17:40:56 -07:00
Eric Wasylishen a9a11159f4 light: add _surface_minlight_scale light key
for tweaking minlight given to faces matching surface light templates.

minlight = _surface_minlight_scale * light

lower default from 64 to 1 in q1 mode
2022-12-30 23:06:28 -07:00
Eric Wasylishen 710e70d74b testqbsp: add (failing) test case with off-grid geo and missing faces 2022-12-23 00:04:22 -07:00
Eric Wasylishen 1fb53cbe4d qbsp: fix area assignment on leaking q2 maps
reverts c9243d4fea
2022-12-21 21:18:06 -07:00
Eric Wasylishen 108d299482 test_ltface: test case for minlight surflight 2022-12-20 22:54:22 -07:00
Eric Wasylishen 35fe26b7a6 qbsp: fix FindTargetEntity (was breaking hiprotate) 2022-12-19 00:55:20 -07:00
Eric Wasylishen 6451a3f2aa qbsp: fix _mirrorinside 1 on func_detail_fence (q2) 2022-12-15 00:18:22 -07:00
Eric Wasylishen 8caaf7236f test: add q2 test case for alpha mask textures 2022-12-14 23:19:58 -07:00
Eric Wasylishen 82aa1e4396 light: make "_light_alpha 0" behave as expected (invisible to light) 2022-12-14 21:46:36 -07:00
Eric Wasylishen 8ce8b9233b light: _shadow_channel_mask defaults to _light_channel_mask if unset 2022-12-14 18:29:05 -07:00
Eric Wasylishen 513c47406b light: fix surface lights to check channel mask 2022-12-14 00:26:38 -07:00
Eric Wasylishen 287ac96363 light: fix sunlight to check object channel mask 2022-12-14 00:15:23 -07:00
Eric Wasylishen ccb72a3bf5 light: expand test case for light channels 2022-12-13 23:42:26 -07:00
Eric Wasylishen 8aa49699f8 light: rename channel mask keys
models:
_object_channel_mask

lights:
_light_channel_mask
_shadow_channel_mask
2022-12-13 23:20:27 -07:00
Eric Wasylishen 92d5c75424 light: experimental light channel mask feature 2022-12-13 19:13:58 -07:00
Eric Wasylishen 63cac32f88 light: quick experiment with a _light_group feature for lights that only affect linked bmodels 2022-12-11 15:36:08 -07:00
Eric Wasylishen bded0ab344 light: fix negative lights breaking when bounce in use 2022-12-10 15:10:36 -07:00
Eric Wasylishen a5b83e088b light: work around visblocking opaque liquids causing light artifacts with -visapprox vis
in cases when we actually want light to shine through these surfaces
2022-12-09 00:07:50 -07:00
Eric Wasylishen 924847661c test_ltface: add test for `-visapprox vis` issue with opaque liquids 2022-12-08 21:46:35 -07:00
Eric Wasylishen a70c8f4835 light: fix artifacting with translucent shadows
Embree is allowed to call the filter function more than necessary.
The previous implementation had side effects that would cause
the translucent shadows to get darker in this case.

As a limitation, we're back to only allowing 1 layer of glass per ray.
2022-12-07 00:23:26 -07:00
Eric Wasylishen 7ce14a376f qbsp/light: make liquids not cast shadows by default
previously opaque Q2 liquids (e.g. lava, opaque water) were casting shadows / dirt
2022-12-06 17:03:39 -07:00
Eric Wasylishen eae434736a light: support _minlightMottle on worldspawn 2022-12-06 15:18:16 -07:00
Eric Wasylishen 555f07ed61 test_lftace: add a test for an issue of wrapped luxels interacting with surface lights 2022-12-03 14:27:00 -07:00
Eric Wasylishen 1065adecc6 qbsp/light: implement _phong_group key, equivalent to Q2 "value" field 2022-12-01 00:25:05 -07:00
Eric Wasylishen 96bdf141bb light: block phong if certain surfflag bits differ between the two faces
this prevents liquids from phonging with solids
2022-11-30 22:15:58 -07:00
Eric Wasylishen abb92d4b0f qbsp: fix crash when using -omitdetail and an all-detail bmodel 2022-11-21 01:13:31 -07:00
Eric Wasylishen 5d3fab75b6 light: allow .wal_json metadata to contain "light": [ r, g, b ] to override emissive color
Use this to fix the "emissive lights" test case so it can run on CI without any texture data
2022-11-20 23:01:05 -07:00
Eric Wasylishen 0c4aab737d light: fix angled emissive surfaces not shining on adjacent faces 2022-11-19 14:57:56 -07:00
Eric Wasylishen 46d460277a ltface: support -world_units_per_luxel without -novanilla
first pass implementation - quality of vanilla LM is bad, due to nearest sampling
the decoupled lightmap
2022-11-14 23:58:31 -07:00
Eric Wasylishen d7acd046c3 light/qbsp: add _surflight_rescale key 2022-11-12 17:07:02 -07:00
Eric Wasylishen 93d059058f testqbsp: fix mirrorinside + bmodels in Q1 mode 2022-11-11 12:33:47 -07:00
Eric Wasylishen e6cec0eb5e qbsp: fix _mirrorinside 0 in q2 mode 2022-11-06 23:53:06 -07:00
Eric Wasylishen 5e0431adbd add testcase where detail causes a "vis leak"
this is due to detail sealing
2022-11-06 23:30:08 -07:00
Eric Wasylishen da5910e732 tests: first steps on a light test case 2022-10-30 15:32:41 -06:00
Eric Wasylishen 22b9329489 testmaps: add q2 lighting testmap 2022-10-29 20:35:10 -06:00
Eric Wasylishen 27045404d3 tests: add CSGFaces basic test 2022-10-23 19:20:19 -06:00
Eric Wasylishen 501ced4bfe qbsp: restore func_detail_wall support 2022-10-21 18:33:38 -06:00
Eric Wasylishen 74996f97d2 light_q2_translucent_shadow.map: add WINDOW test cases 2022-10-19 00:22:41 -06:00
Eric Wasylishen c78b0396a9 light: fix wrong opacity of trans33/trans66 translucent shadows
- support _light_alpha key in q2 mode
- add q2 translucent shadows testmap
2022-10-19 00:00:47 -06:00
Eric Wasylishen 8bfd11ba13 testqbsp: add a obj2map terrain test case
some terrain I created in Blender
2022-09-26 22:40:09 -06:00
Eric Wasylishen e081e36d28 testmaps: add retrojam1_ericw.map 2022-09-16 23:19:32 -06:00
Eric Wasylishen 68e2f97fbf qbsp: sync FindAreas to Quake-2-Tools version
fixes area portals in cases when area has no point entities in it
2022-09-10 15:49:17 -06:00
Eric Wasylishen a8a8966e28 test_qbsp: add failing test for 0.125 unit wide faces (currently not generated) 2022-09-08 23:51:51 -06:00
Eric Wasylishen c8c526ab57 qbsp: fix mist-clip intersection chopping up the faces
note it makes the simple_worldspawn_detail clipnodes count
test fail. Clipnode counts are way too high in general so this isn't
a huge issue yet.
2022-08-28 14:13:14 -06:00
Eric Wasylishen d9856230a6 testqbsp: q1_rocks: sky -> solid to simplify test case 2022-08-20 01:24:10 -06:00
Eric Wasylishen f3a2d99544 testqbsp: adjust q1_rocks test case
avoid potential ambiguity for BrushBSP over whether sky should split wall brushes
2022-08-20 00:22:21 -06:00
Eric Wasylishen 251a6dc7ca testmaps: add a more minimal q1_rocks that's just a cube 2022-08-19 22:55:27 -06:00
Eric Wasylishen 648ffab77b testqbsp: improve q1_rocks test 2022-08-19 22:10:16 -06:00
Eric Wasylishen 10051ceff5 testmaps: remove some accidental brushes in q1_hull_expansion_lip.map
testqbsp: more detailed q1_hull_expansion_lip tests for clipnodes

testqbsp: decompile hull1 of testmaps by default

testqbsp: corrections to the q1_hull_expansion_lip.map expectation

adjust gitignore
2022-08-19 20:49:59 -06:00
Eric Wasylishen 832ab0ee94 testqbsp: q1_hull_expansion_lip.map: move detail to world as a temp workaround
for -debugexpand only expanding world brushes
2022-08-19 01:14:38 -06:00
Eric Wasylishen 8ce72efba2 testmaps: add q1_hull_expansion_lip.map
which is getting incorrectly expanded
2022-08-16 00:35:47 -06:00
Eric Wasylishen d88bedd153 testqbsp: add q1_rocks.map test with obj2map style brushes 2022-08-15 01:07:47 -06:00
Eric Wasylishen 244399b6f7 testqbsp: make q1_hull1_content_types seal in hull1/2 2022-08-14 21:40:49 -06:00
Eric Wasylishen 0642ad16d3 testqbsp: start a hull1 content type test 2022-08-14 18:14:56 -06:00
Eric Wasylishen 35859a6ea4 tests: add q1_wad_mapname test 2022-08-14 13:45:31 -06:00
Eric Wasylishen 995ac04673 tests: add a few clipnode count tests
adjust qbsp_simple_worldspawn_detail.map so it seals in hull1/2
2022-08-13 20:11:22 -06:00
Eric Wasylishen e05a2bdf75 qbsp: "-add additional.map" feature 2022-08-01 19:13:10 -06:00
Eric Wasylishen f665cd5cb6 testqbsp: rename our copy of base1.map to base1-test.map
for easier loading in game in Q2
2022-07-31 21:29:25 -06:00
Eric Wasylishen a2451a41fb qbsp: rewrite of q1 contents representation in bspfile.cc
use q2-like bitflags so we can represent mixes like (water | mist), which we need within the compiler
2022-07-27 02:31:49 -06:00
Eric Wasylishen 7f955a5247 testmaps: add q1_tjunc_angled_face 2022-07-13 00:59:46 -06:00
Eric Wasylishen 6d847fed85 testqbsp: rename quake map source to have -test suffix, for easier loading in an id1/maps directory
otherwise vanilla engines will load the original .bsp's from the pak files
2022-07-12 23:13:46 -06:00
Eric Wasylishen 54a6762a05 qbsp: add edge sharing test 2022-07-10 01:25:28 -06:00
Eric Wasylishen c2a2890240 testqbsp: add texture metadata for some of the base1.map special textures
so we can compile a working version of the map
2022-07-07 01:21:50 -06:00
Eric Wasylishen 862d9bd5f2 testqbsp: add q1_clip_func_wall
Ensure submodels that are all "clip" get bounds set correctly
2022-06-30 00:53:02 -06:00
Eric Wasylishen 84263ef1a1 testqbsp: add model bounds test map 2022-06-22 22:11:40 -06:00
Eric Wasylishen 98e27cf620 testqbsp: improve water_detail_illusionary test 2022-06-21 01:16:55 -06:00
Eric Wasylishen 59d6169b3d qbsp: add a test of just a cube 2022-06-19 16:04:54 -06:00
Eric Wasylishen bf36bd56f7 qbsp: fix qbsp_q1_sealing test case 2022-06-14 02:03:50 -06:00
Eric Wasylishen a309e8467b testmaps: add qbsp_q1_sealing.map 2022-06-14 00:44:50 -06:00
Eric Wasylishen 4e7ecbf9ff testqbsp: add qbsp_q2_detail_seals 2022-06-13 22:50:01 -06:00
Eric Wasylishen 1cddbf1ad9 testqbsp: add qbsp_q2_seal_empty_rooms 2022-06-13 22:39:04 -06:00
Eric Wasylishen 2c8de8b877 q2_liquids.map: add lava/water covering each other tests 2022-06-11 14:07:19 -06:00
Eric Wasylishen 121c6384fe q2_liquids.map: "un-default" content/surface flags in TB so they don't require a baseq2 dir to compile correctly 2022-06-10 22:15:20 -06:00
Eric Wasylishen 28c6489968 q2_liquids.map, q2_water_trans.map from Paril 2022-06-10 22:11:59 -06:00
Eric Wasylishen ce1c2c2c19 qbsp_q2_detail: translate map so center doesn't get chopped in q2 tools 2022-06-10 20:18:35 -06:00
Eric Wasylishen c8841fb1bf testqbsp: add lavawater test 2022-06-08 01:01:17 -06:00
Eric Wasylishen ad8e6a7a75 testqbsp: bmodel collision issue where world and bmodel are interfering 2022-06-07 17:05:03 -06:00
Eric Wasylishen e3892617ed testqbsp: add testmap for q2 lava intersecting clip (fails currently) 2022-06-03 23:29:23 -06:00