Eric Wasylishen
10581327b3
build: remove some unneeded includes from bspfile.hh
2023-06-25 16:35:26 -06:00
Jonathan
caa7418375
async threading for map progress, etc. no cancelling yet
2023-06-19 15:38:16 -04:00
Jonathan
08db6e9bf9
remove fastbounce, add emissivequality
...
emissivequality affects both emissives
2023-06-19 09:54:25 -04:00
Jonathan
1fbe12767e
decouple lightmapping state from emissive state
...
allow sky to skip lightmapping if lightgrid is enabled in Q2 mode again
2023-06-19 04:11:20 -04:00
Eric Wasylishen
0dfb4e52ab
entdata.cc: avoid exception-throwing std::stod/stoi
...
mostly because it's annoying when debugging with "break on first
exception thrown"
2023-06-11 23:20:13 -06:00
Jonathan
1a27cc025d
infer the name of wal json from the name of the file being loaded
2023-06-09 17:58:58 -04:00
Eric Wasylishen
9c6f6c2589
common: change FError to throw an exception
2023-06-03 22:24:20 -06:00
Eric Wasylishen
317bf32671
common: use "bright black" for percent text color
...
the "blue" one was hard to read with the Windows legacy terminal color scheme
2023-05-31 22:27:32 -06:00
Jonathan
c3461a107b
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-05-29 04:38:08 -04:00
Jonathan
6c2b4f6f04
sky rendering (still needs work)
...
wireframe slightly easier to work with
2023-05-29 04:37:23 -04:00
Eric Wasylishen
2533e7e40d
qbsp: support _mirrorinside 0 in Q1 mode
...
to disable mirroring water surfaces
2023-05-28 14:00:08 -06:00
Eric Wasylishen
ed7a684583
qbsp: remove dead code contents_are_mirrored()
2023-05-28 11:43:30 -06:00
Eric Wasylishen
2d60b017d7
lightpreview: support FACENORMALS bspx lump
2023-05-23 22:44:13 -06:00
Jonathan
3f3b765780
use STB for TGA as well
2023-05-21 23:20:49 -04:00
Eric Wasylishen
698a492822
bspinfo: factor out lightmap atlas generation from .obj writer
2023-05-20 13:05:22 -06:00
Eric Wasylishen
b7f4a2759b
imglib: clear texture cache between tests
2023-05-19 00:51:14 -06:00
Eric Wasylishen
9e1ead5f78
common: move load_textures() from light.cc into common/imglib.cc
2023-05-19 00:50:31 -06:00
Eric Wasylishen
f14f327a9a
common: more robust hexen2 detection
...
Fixes #355
2023-05-13 00:46:02 -06:00
Random
c6ea63ba95
made CMake relative for use as a sub-project within other CMake projects ( #356 )
2023-05-10 19:45:51 -06:00
Jonathan
0ab3aae111
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# common/bspfile.cc
2023-05-08 17:47:12 -04:00
Jonathan
1548f25daf
allow individual brush chop control
...
allow passing _surflight_targetname to set targetnames for switchable lights on bmodels
2023-05-08 17:44:32 -04:00
Eric Wasylishen
c9e41ab4db
style: remove GLM_ prefix (no longer using glm)
2023-05-07 21:44:29 -06:00
Eric Wasylishen
18a7df1a1b
style: reformat
2023-05-07 21:44:29 -06:00
Jonathan
39a54abfc6
add support for a region brush (code needs to be cleaned up a bit though)
...
allow _surflight_style on brush models
2023-04-28 13:31:50 -04:00
Jonathan
e9539eff82
oops I should have tried compiling
2023-04-24 02:21:04 -04:00
Jonathan
6035290c70
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# include/common/imglib.hh
# light/entities.cc
# light/light.cc
# light/surflight.cc
2023-04-24 02:19:04 -04:00
Jonathan
dddc48e98b
simplify `needs_write` for surfflags
...
add `_surflight_color` key; allows overriding surface light color on an entity basis
load the .wal from wal_json and use the values as a base, if they exist
allow `_surflight_minlight_scale` to be specified on entities
2023-04-24 02:16:39 -04:00
Eric Wasylishen
a2d89e3307
qbsp: q1: fix visportals being created to solid leafs
...
fixes crash on ej3_cc.map
2023-04-17 23:42:00 -06:00
Eric Wasylishen
cd2926534f
qbsp: q1: fix so just DETAIL is considered is_empty
2023-04-17 21:10:28 -06:00
Eric Wasylishen
ed756bd602
common: add support for writing .rst documentation from settings
2023-04-16 14:55:43 -06:00
Eric Wasylishen
e069d7b9b8
style: update settings api to follow current coding style
2023-04-16 11:55:38 -06:00
Eric Wasylishen
93f985a9e5
tests: add q1_lightignore.map test
2023-04-12 00:04:56 -06:00
Eric Wasylishen
3997e8c9bc
imglib: add jpg/png loading using stb_image
2023-04-10 13:47:33 -06:00
Jonathan
00bcead0fb
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-04-03 05:26:49 -04:00
Eric Wasylishen
ab2569486d
qbsp: q1: fix sky + detail_solid not sealing
2023-03-27 23:13:40 -06:00
Eric Wasylishen
68eaf37e40
qbsp: q1: fix detail to be non-sealing again
2023-03-27 21:43:54 -06:00
Jonathan
50f391311e
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-03-26 19:21:14 -04:00
Eric Wasylishen
a3d55f905e
qbsp: fix structural solid not eating other content types
2023-03-26 17:13:34 -06:00
Jonathan
1dcfe58563
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-03-26 18:29:41 -04:00
Jonathan
5daaeee6fb
allow `surflight_minlight_scale` to be specified per brush
2023-03-26 18:29:37 -04:00
Eric Wasylishen
6e064ae3c7
qbsp: restore detail to non-sealing
2023-03-26 16:20:10 -06:00
Eric Wasylishen
4ed4181962
prtfile: WriteDebugPortals: write .prt files in text mode
...
TB requires this
2023-03-23 09:53:33 -06:00
Eric Wasylishen
7a8898c9a0
decompiler: fix q1 decompiler
...
Decompiling a leaf in Q1 can output more than one brush, because of texturing.
Previously we were outputting 1 invalid brush.
2023-02-26 22:06:42 -07:00
Eric Wasylishen
c5efefd4b7
tests: allow disabling threading when debugging tests
...
with `-threads 1`
2023-02-25 23:50:35 -07:00
Eric Wasylishen
60dea4af4c
qbsp: fix func_detail_wall in q2 mode
2023-02-22 00:57:31 -07:00
Eric Wasylishen
b17633f746
cleanup: set PackConstructorInitializers: Never
2023-02-20 10:23:59 -07:00
Eric Wasylishen
dd6e49c89f
light: support _object_channel_mask on func_group
2023-02-20 00:07:08 -07:00
Eric Wasylishen
eda6155844
cleanup: run ./clang-format-all.sh
...
clang-format version 15.0.7
2023-02-18 22:59:43 -07:00
Eric Wasylishen
caf8fe9cbd
bsputils: remove Light_PointInSolid bounds check hack
...
it was returning points outside of the level as "non-solid" which is
wrong for sealed maps
2023-02-18 19:04:56 -07:00
Eric Wasylishen
7d6ed20dc1
unused includes cleanup
2023-02-18 16:14:11 -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
03b5537c80
imglib: document "color" key of .wal_json
2023-02-13 20:55:38 -07:00
Eric Wasylishen
f5fad41402
light: add debug visualization for octree lightgrid
2023-02-12 16:35:46 -07:00
Eric Wasylishen
7e6337027a
bsputils: add Model_BoundsOfFaces
2023-02-12 12:46:22 -07:00
Eric Wasylishen
92eb58d715
bsputils: fix ClusterToLeafnumsMap
2023-02-08 01:05:17 -07:00
Eric Wasylishen
a8af353461
light: add another experimental LIGHTGRID_PERCLUSTER bspx lump
...
lower lightgrid_dist default from 64 to 32
2023-02-08 00:12:22 -07:00
Eric Wasylishen
f0852092ac
bsputils: prototype DecompressAllVis
2023-01-30 19:56:46 -07:00
Eric Wasylishen
8f49cf3894
refactor: Mod_Q1BSP_DecompressVis -> DecompressVis
2023-01-30 19:56:40 -07:00
Eric Wasylishen
912dd0cdeb
vis: migrate CalcPHS from DecompressRow to Mod_Q1BSP_DecompressVis
2023-01-30 19:56:37 -07:00
Eric Wasylishen
e490eb3ade
refactor: move Mod_Q1BSP_DecompressVis to bsputils.cc
2023-01-30 19:56:34 -07:00
Eric Wasylishen
302d600f4c
qbsp: strip _tb_ keys, convert __TB_empty to skip
2023-01-30 00:28:31 -07:00
Eric Wasylishen
9edad10b0f
common: add convenience version of EntData_Parse
2023-01-30 00:08:45 -07:00
Eric Wasylishen
e722ff14c9
fs: hack around directory called "light" in CWD blocking use of a texture called "light"
2023-01-29 21:35:15 -07:00
Eric Wasylishen
837524999b
fs: handle filesystem_error in directory_archive::load()
...
we were hitting this on CI when attempting to load a texture called
"light"; file_size() was throwing because it was attempting to
get the file size of a directory called "light".
2023-01-29 18:56:24 -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
ff09b4c31e
qbsp: fix comment about vanilla tools
2023-01-06 12:14:08 -07:00
Eric Wasylishen
64c0d8c0c4
qbsp: fix AUX to be non-mirrorinside by default
2023-01-06 12:00:32 -07:00
Eric Wasylishen
54ada5be6d
bspinfo: don't crash if light data is missing
2022-12-21 20:58:08 -07:00
Eric Wasylishen
fe5ce3765a
test: add a few more area-related assertions
2022-12-21 20:56:18 -07:00
Eric Wasylishen
ba155a3bf5
build: avoid msvc-only constructor
2022-12-20 23:51:56 -07:00
Eric Wasylishen
f652af9c7d
bsputils: add .lit loader
2022-12-20 22:46:20 -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
Jonathan
15b9a78fd1
fix gate being incorrect
...
add surflight grouping
fix minlight on color'd _surface lights
2022-12-05 20:35:44 -05:00
Eric Wasylishen
f66e4790a4
qbsp/light: add no_phong texinfo flag (currently not used/exposed)
2022-12-01 01:16:17 -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
ab78b43c52
decompile: BuildInitialBrush_Q2: prefer earlier brush sides
...
fixes issue with bevels sometimes being used to texture faces,
which have randomly wrong texture projections
2022-11-26 19:34:25 -07:00
Jonathan
96e88cfab1
allow a .map to be updated with a .ent file as input using replace-entities
2022-11-25 04:51:00 -05:00
Eric Wasylishen
f7370db0be
decompile: avoid generating three points from micro-faces
2022-11-25 01:05:41 -07:00
Eric Wasylishen
8b82460201
decompile: output source brush number
2022-11-25 00:32:31 -07:00
Eric Wasylishen
743e177694
decompile: BuildInitialBrush_Q2: fix handling of redundant planes
2022-11-25 00:32:18 -07:00
Eric Wasylishen
04adb17b1b
qbsp: fix -nodetail in q2 mode
2022-11-21 00:10:26 -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
91a0c8e86a
test_ltface.cc: add assertions to catch command line options leaking
...
across tests
2022-11-19 18:41:46 -07:00
Eric Wasylishen
c9111b2a6c
Merge pull request #337 from TTimo/colorcodes
...
Enable support for ANSI color codes on Windows 10 and newer, without …
2022-11-19 09:10:24 -08:00
Eric Wasylishen
9ab4ea8176
Move SetConsoleMode() call to logging::preinitialize(); helper
...
Don't do ENABLE_VIRTUAL_TERMINAL_INPUT as it breaks arrow key history
navigation in Windows Terminal after running one of the ericw-tools exe's.
2022-11-19 10:05:14 -07:00
Eric Wasylishen
4c218f5e91
common: factor out LMSCALE_DEFAULT = 16.0;
2022-11-15 23:52:34 -07:00
Eric Wasylishen
629f86625e
log.cc: use fmt::group_digits to avoid locale manipulation
...
this is to get thousands separators, e.g. 10000 prints as 10,000
the `auto old = std::locale::global(std::locale("en_US.UTF-8"));` line was throwing
on Win8.1
2022-11-13 18:58:08 -07:00
Eric Wasylishen
d7acd046c3
light/qbsp: add _surflight_rescale key
2022-11-12 17:07:02 -07:00
Eric Wasylishen
e6cec0eb5e
qbsp: fix _mirrorinside 0 in q2 mode
2022-11-06 23:53:06 -07:00
Eric Wasylishen
928bbf3dee
default -lowpriority to true
...
makes no difference to tool runtime (31.9s -> 31.4s for a light run), avoids unnecessarily making
Windows unusable
2022-11-06 17:06:35 -07:00
Eric Wasylishen
ca45f06bdf
bspinfo: fix format string
2022-11-04 00:53:34 -06:00
Eric Wasylishen
221ea65efb
light: fix -world_units_per_luxel on sloped faces
2022-11-03 23:45:47 -06:00
Eric Wasylishen
ca0efbf3d3
light: wip -world_units_per_luxel and DECOUPLED_LM BSPX lump
2022-11-03 02:39:15 -06:00
Eric Wasylishen
eb2d697cef
faceextents_t: refactor to store world <-> lm matrices rather than tex space <-> lm
2022-11-02 09:39:20 -06:00
Eric Wasylishen
1f01b65873
faceextents_t: rename texextents/texmins
2022-11-02 09:27:41 -06:00
Eric Wasylishen
02202b81bb
faceextents_t: move texmins out of structure
2022-11-02 09:21:42 -06:00
Eric Wasylishen
f3cc0907c8
faceextents_t: refactor to remove lightmapshift member
2022-11-02 00:56:23 -06:00
Eric Wasylishen
c39ee38454
qvec: add 3x3 matrix inverse, row major factory method
2022-11-02 00:32:06 -06:00