Eric Wasylishen
6b707b6d5a
light: use DecompressAllVis() for getting visdata
2023-01-09 00:43:49 -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
Jonathan
cde7fd2908
add back in `_bouncestyled` in worldspawn; default to true on Q2 mode
2022-12-06 21:23:05 -05:00
Eric Wasylishen
185d12996b
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-12-06 15:19:46 -07:00
Eric Wasylishen
eae434736a
light: support _minlightMottle on worldspawn
2022-12-06 15:18:16 -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
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
37ced86cec
tests: fix light settings not clearing across tests
2022-11-19 19:02:55 -07:00
Eric Wasylishen
4c218f5e91
common: factor out LMSCALE_DEFAULT = 16.0;
2022-11-15 23:52:34 -07:00
Eric Wasylishen
d7acd046c3
light/qbsp: add _surflight_rescale key
2022-11-12 17:07:02 -07:00
Eric Wasylishen
a5125583fa
light: clear global data so light can run multiple times per process
2022-11-11 16:52:07 -07:00
Eric Wasylishen
74269a0269
light: new Mottle implementation based on world-space "value noise"
2022-11-08 22:18:54 -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
2bd2515792
all: cleanup unused includes (Clion - detect not directly used)
2022-10-31 21:37:34 -06:00
Eric Wasylishen
0924423c20
light: header -> source move
2022-10-31 21:21:28 -06:00
Eric Wasylishen
da5910e732
tests: first steps on a light test case
2022-10-30 15:32:41 -06:00
Eric Wasylishen
35ffc00462
all: add LIGHT_/QBSP_/VIS_ prefixes to epsilons where necessary
2022-10-30 15:08:10 -06:00
Eric Wasylishen
636b376577
squash brushbsp-compilation-speedup branch
...
move function implementations out of headers
2022-10-21 18:00:58 -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
986f7da366
adjust default bouncescale to match older compiles
2022-09-03 14:06:11 -04: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
3564f6085d
merge surface lighting and bounce code (wip)
2022-08-30 15:46:14 -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
335db1c0e4
move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow
2022-08-05 23:17:15 -04:00
Jonathan
24168c8e40
clang pass
2022-08-02 21:57:33 -04:00
Jonathan
26a18d5cc3
add logging::header/funcheader to easily and consistently print function or "active routine" headers
...
add OOP percent_clock wrapper to make printing percents easier, not used yet
2022-08-01 09:35:21 -04:00
Jonathan
1d8a0c1df3
clang-format pass
2022-07-28 06:14:54 -04:00
Jonathan
da9546e260
change settings semantics to be simpler and more clear:
...
- no more "isLocked" - use getSource directly (locked is a confusing name)
- no more split parse/setValue functions. there's only one entry point each now, and all they do is pass along the source passed to it from its parser.
- no separate setters, use setValue(value, source)
- add a "game target" source, which is low priority and indicates to the user that the value would have been default but was changed to a better value for the game target
2022-07-14 09:03:59 -04:00
Eric Wasylishen
d32d6ea81d
light: rename options -> light_options
2022-07-10 17:28:28 -06:00
Jonathan
2a70cafa32
kinda fix overbrightness? still needs work..
...
allow lmshift force on light
2022-07-10 13:31:38 -04:00
Jonathan
865217c655
adjust final output warning
2022-07-09 01:36:26 -04:00
Jonathan
0e4066f312
fix LMSTYLE containing 16-bit values sometimes
2022-07-09 01:36:26 -04:00
Jonathan
56e1e2dde0
adjust lightstyle overrun warnings to be less annoying
...
fix potential overrun in lightstyle writing
2022-07-09 01:36:26 -04:00
Jonathan
7f64c9dfeb
simplify saving
2022-07-09 01:36:25 -04:00
Jonathan
88905d4a69
secondary fix to lmstyle code
2022-07-09 01:36:25 -04:00
Jonathan
b1a30496c3
fix bspx_lightmap not getting output by bspinfo
...
fix LMSTYLE getting output when there's no need for it from -novanilla
2022-07-09 01:36:25 -04:00
Jonathan
adc54dac61
fix bug with output of lmstyle/lmoffset lumps
...
bspinfo will output proper atlasses now
use faceextents_t everywhere
2022-07-08 02:06:07 -04:00
Jonathan
705ab73169
rename light option `lmscale` to `lightmap_scale` to reflect its qbsp usage (a forced replacement of the "default" lightmap scale)
...
allow qbsp to be passed an `-lmscale` to facilitate a global lmscale change for BSPX
fix code paths for writing both lightmap sizes out
# Conflicts:
# include/qbsp/qbsp.hh
2022-07-08 02:06:06 -04:00
Jonathan
0483db5c55
remove sky visibility stuff; not necessary with the approx methods
...
show sky hits in light points stats
merge surface light stuff (minlight, etc)
default surface lights with radiosity to spotlight, to match Q2
(cherry picked from commit defa4cafce )
2022-07-04 20:47:06 -04:00
Jonathan
a0d81372d1
improved path detection (and overriding) routines
...
(cherry picked from commit 32f33fb4b3 )
2022-07-03 18:23:40 -04:00
Jonathan
0bcd92300a
bounce lighting fix
...
change defaults for Q2 to look a bit closer to how it looked before
(cherry picked from commit b8bb4cdd2a )
2022-07-03 14:21:25 -04:00
Jonathan
cc16b886a4
move "points" instead of copying
...
pre-offset points
remove double calculation for pos/dir in lightface (didn't seem to have any visual effect on the output)
2022-07-02 08:49:34 -04:00
Jonathan
9f734ff976
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# common/bspfile.cc
# include/common/bspfile.hh
# light/trace.cc
2022-06-30 05:23:05 -04:00
Jonathan
03ee5c52e8
add an entry point for specifically loading meta-only file formats, like .wal; used for discerning replacements from their source material (since replacements are often larger than the default, we need the scale info)
...
add a new meta format, which is just a JSON representation of the metadata contained in a .wal
simplify texture loading in `light`
fix `light` not handling replacement textures very well
string_iequals take string_view like the others
move averageColor to be alongside pixel data, where it belongs
2022-06-29 12:59:33 -04:00