Eric Wasylishen
9c6f6c2589
common: change FError to throw an exception
2023-06-03 22:24:20 -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
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
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
Eric Wasylishen
3e446e6ea6
qbsp, light: fix inheriting minlight from worldspawn
...
Update q2_light_group.map to support this
2023-05-07 21:44:29 -06:00
Random
b49d4879f2
include cstdint in vec.hh to fix build ( #354 )
2023-05-03 19:13:45 -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
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
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
3997e8c9bc
imglib: add jpg/png loading using stb_image
2023-04-10 13:47:33 -06:00
Jonathan
a0e98242a4
fix hintskip; when loading a hint brush, mark all other sides as hintskip
2023-04-03 05:26:41 -04: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
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
641fb780ac
light: allow customizing _world_units_per_luxel on func_group etc.
2023-02-17 00:07:43 -07:00
Eric Wasylishen
f5fad41402
light: add debug visualization for octree lightgrid
2023-02-12 16:35:46 -07:00
Eric Wasylishen
48fe527955
light: add _lightgrid_hint point entity key for customizing lightgrid bounds
...
use it as a info_null key: "_lightgrid_hint" "1"
2023-02-12 15:03:08 -07:00
Eric Wasylishen
7e6337027a
bsputils: add Model_BoundsOfFaces
2023-02-12 12:46:22 -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
71a0ce77ac
qbsp: q2: set leaf 0's cluster to -1
...
leaf 0 is the invalid placeholder leaf, but we were giving it
cluster 0 which is valid. instead, give it cluster -1
2023-02-07 23:17:55 -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
91c678254a
light: tweaks to _cone support in q2
2023-01-08 19:57:25 -07:00
Eric Wasylishen
fe5ce3765a
test: add a few more area-related assertions
2022-12-21 20:56:18 -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
82aa1e4396
light: make "_light_alpha 0" behave as expected (invisible to light)
2022-12-14 21:46:36 -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
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
0c4aab737d
light: fix angled emissive surfaces not shining on adjacent faces
2022-11-19 14:57:56 -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
37b901a915
fmtlib 7.1.3 -> 9.1.0
2022-11-13 18:55:35 -07:00
Eric Wasylishen
d28f97e655
cmdlib: use <bit> include unconditionally
2022-11-12 20:10:58 -07:00
Eric Wasylishen
d7acd046c3
light/qbsp: add _surflight_rescale key
2022-11-12 17:07:02 -07: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
Eric Wasylishen
388cd39821
common: parser: fix compile time of parser_source_location
2022-10-31 23:06:20 -06:00
Eric Wasylishen
728fafde8c
light: remove dead code
2022-10-30 18:00:48 -06:00
Eric Wasylishen
34f32f851c
common, qbsp: more functions moved from header -> source
2022-10-26 23:29:54 -06:00
Eric Wasylishen
501ced4bfe
qbsp: restore func_detail_wall support
2022-10-21 18:33:38 -06:00
Eric Wasylishen
636b376577
squash brushbsp-compilation-speedup branch
...
move function implementations out of headers
2022-10-21 18:00:58 -06:00
Jonathan
315ab418d2
fix warning
...
only enable the clock counter errors in debug
2022-10-02 16:20:27 -04:00
Eric Wasylishen
72ad52647b
cmdlib.hh: add missing include
2022-09-30 00:37:18 -06:00
Eric Wasylishen
df46f7af82
cmdlib.hh: add missing include
2022-09-30 00:36:03 -06:00
Eric Wasylishen
45fae91a0f
cmdlib.hh: add missing include
2022-09-30 00:34:56 -06:00
Eric Wasylishen
cb3467b049
log.hh: add missing include
2022-09-30 00:34:17 -06:00
Eric Wasylishen
1726f95484
use <fmt/core.h> instead of <fmt/format.h>
...
Should lighten compile times.
The only loss here is we'll no longer inherit e.g. "float" format specifiers for qvec3f.
2022-09-29 19:49:48 -06:00
Eric Wasylishen
acf334daee
cleanup: rename surfflags_t::is_skip to is_nodraw
...
This is a break to the .json format
2022-09-18 15:47:14 -06:00
Jonathan
6713fedcbc
allow changing a brushes' lightmap color scale with `lightcolorscale`
2022-09-10 19:04:17 -04:00
Jonathan
4ecd945587
use kmq2 flag instead of 33 | 66, which no engine supports
2022-09-10 07:49:06 -04:00
Eric Wasylishen
b19527c3fd
qbsp: don't use brush sides to texture a portal if they're not coplanar
2022-09-08 21:20:49 -06:00
Jonathan
075481a36f
add -nocolor for TB, etc
...
fix crashes on vis and light for invalid options
fix TB and others not receiving output
2022-08-31 12:58:04 -04:00
Jonathan
f581c071e8
fix merge
2022-08-25 19:02:26 -04:00
Jonathan
4a85131f45
fix sky_surface being multiplied by 255 twice (normalize it as a color first)
2022-08-25 16:47:10 -04:00
Jonathan
384f74a0eb
add separate "surflightskyscale" to handle the scale of sky lights; to help with doubling up with _sun
...
allow setSetting to report errors
print warnings on invalid worldspawn key values for light
fix setting_mangle not handling "pitch yaw" or "pitch" correctly
2022-08-25 16:30:15 -04:00
Jonathan
5fb0d56da7
maxlight
...
# Conflicts:
# include/common/bspfile.hh
2022-08-24 21:50:11 -04:00
Jonathan
f6601a7c85
clean up the output table for BSPs
...
add a specialized stream buffer which just tracks how much would be written to it; used to get the output size of the texture lump, since that's no longer tracked
display dmodel byte size
display BSPX lumps a bit differently (no need to repeat BSPX per line)
add header to both lists, to make it more obvious what's coming up
2022-08-22 13:02:58 -04:00
Jonathan
e7ae158a10
split up BrushBSP and CountLeafs stat prints
2022-08-21 21:54:16 -04:00
Jonathan
282c5ec69f
stat printing adjustments
2022-08-21 15:01:45 -04:00
Jonathan
1aaa513368
collapse certain map face issues into loggable warning stats to lessen maps spamming warnings on things that legacy compilers allow
...
adjust the wording of certain warning messages
don't display face crunching on bmodels/hulls by default
2022-08-20 20:13:27 -04:00
Eric Wasylishen
c0c146d47c
bsputil: move decompiler to common
2022-08-19 20:49:34 -06:00
Eric Wasylishen
f5a8bc7b99
bsputils: add a helper struct for checking clipnode identity
2022-08-15 23:06:00 -06:00
Jonathan
f7b8f85ece
use an optional<uint8_t> to store hull number, which gets rid of special -1 collision hull number.
...
fixed no-hull always chopping even with chop off
2022-08-15 06:13:30 -04:00
Jonathan
97665d15a9
fix slight mistype in Brush_LoadEntity
...
make ~settings_container virtual so light_t can be freed properly
reset visible to false on all brush sides
2022-08-15 03:37:38 -04:00
Eric Wasylishen
e7adc1108a
qbsp: reset more settings between test cases
2022-08-13 20:38:57 -06:00
Jonathan
de7c8b42b4
fix hybrid at()
2022-08-13 20:57:58 -04:00
Eric Wasylishen
9baf161fc0
work around macos bug (std::atomic_size_t::value_type missing)
2022-08-13 13:12:23 -06:00
Eric Wasylishen
1844f0810f
fix linux build
2022-08-13 12:40:11 -06:00
Jonathan
2059835a47
use a more optimized version of SplitBrush for CheckPlaneAgainstVolume that doesn't require allocating/freeing a lot of memory
2022-08-13 06:39:30 -04:00
Eric Wasylishen
06a116670b
winding_t: make non-copyable
2022-08-12 02:06:23 -06:00
Jonathan
8b9c1bd784
fix missing includes
2022-08-12 02:42:52 -04:00