Eric Wasylishen
8a7164791e
light: fix "don't do this on Q2" logic for 0 light faces
2021-10-02 21:00:45 -06:00
Eric Wasylishen
f7c0c80a26
qbsp, light: allow _minlight to go up to 510 instead of 255 on func_detail/etc.
2021-09-25 13:11:15 -06:00
Jonathan
00efa6e67d
Fix operator<
...
Introduce gamedef, to reduce rewriting of data in bspversions
fix name of needs_subdivision
include value in texinfo, in prep for Q2
2021-09-07 01:41:32 -04:00
Jonathan
437459a4dd
Finish using game everywhere
2021-09-06 18:09:13 -04:00
Jonathan
3bc9b1b0f8
Instead of directly comparing BSP version pointers just for game type, I compacted quake2/hexen2 into a single enum.
...
Feature check in bspver for colored lightmaps, which replaces the many "version == q2 || version == qbism || version == hl".
2021-09-06 17:13:37 -04:00
Jonathan
dad0e61f63
Fix for texinfo/miptex searching routines
...
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Jonathan
eaa86c71c6
Q2BSP + QBSP ( #313 )
...
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.
* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP
* Fix light
* _qbsp_ -> _qbism_
* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
- bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
- bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
- vis/rad on anything major (I still can't run rad due to embree being weird)
- bsputil conversion of Q1-esque maps
2021-08-23 09:56:33 -06:00
Eric Wasylishen
b5fcdec19e
cleanup: remove "byte" typedef
2021-02-07 14:02:35 -07:00
Eric Wasylishen
94c30afac4
light: refactoring necessary to support embree3
2021-01-01 23:48:22 -07:00
Eric Wasylishen
cce0fd98f9
light: document some intersection vs occlusion trace choices
2021-01-01 22:58:09 -07:00
Eric Wasylishen
3b629f3ce9
light: fix q2 lightstyles
2021-01-01 00:14:52 -07:00
Eric Wasylishen
2d15d20410
light: q2: avoid black seams on geometry near sky
2020-12-29 15:58:40 -07:00
Eric Wasylishen
b35cb8eb7e
light: fixes for bjptools skip faces (which have no associated model)
2020-08-20 12:08:46 -06:00
Eric Wasylishen
5ca74ec8b3
light: don't apply AO when gathering light to bounce
2020-08-04 19:18:14 -06:00
Eric Wasylishen
263f6301a6
light: change switchable shadows to only block style 0
...
The interactions with switchable/flickering lights were bad, previously
(a switched-off light would become "on" after passing through a switched
off shadow)
2020-08-04 18:14:01 -06:00
Eric Wasylishen
a0e7f1eccb
light: refactor last commit's std::pair to a custom struct
2020-08-04 18:05:54 -06:00
Eric Wasylishen
1b53d458f4
light: support bounce and switchable shadows
...
fixes #251
2020-08-03 23:53:07 -06:00
Eric Wasylishen
03ed0697a4
light: add -litonly option for re-lighting a bsp without modifying it
2020-08-03 00:40:13 -06:00
Eric Wasylishen
4e9e94e7bd
ltface: GetLightContrib: handle light right on top of sample point
2020-06-25 00:03:38 -06:00
Eric Wasylishen
2d3aa22242
light: add _nostaticlight key
2019-12-26 17:13:21 -07:00
Eric Wasylishen
a4c1ce6ff6
qbsp, light: support _lightignore on func_detail/group
2019-12-09 00:09:20 -07:00
Eric Wasylishen
4456020b30
light: remove 65536 ray limit, fixes #276
2019-10-28 01:12:23 -06:00
Eric Wasylishen
70336339ca
light: fix "_suntexture" interaction with -bounce
2019-10-09 00:59:49 -06:00
Eric Wasylishen
f220b2f531
light: support "_suntexture" key on "_sun" "1" entities to limit them
...
to being cast from a specific sky texture.
Fixes #110
2019-10-09 00:47:39 -06:00
Eric Wasylishen
d2ecc73db3
light: support "style" / "targetname" on "_sun" "1" entities.
...
Fixes #253
2019-10-08 23:43:22 -06:00
Shpoike
89365949bc
Squashed commit of the following:
...
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:54:23 2019 -0600
fix linker error (radlights is in 2 .cpp files)
commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:53:57 2019 -0600
add clarification comment
commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:30:27 2019 -0600
fix tests compilation
commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:59:25 2019 -0600
hlbsp: use q_snprintf
commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:56:21 2019 -0600
Reformat
commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:28:06 2019 -0600
Merge remote-tracking branch 'origin/master' into hlbsp
# Conflicts:
# include/qbsp/qbsp.hh
commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 02:18:16 2019 +0000
Misc HLBSP tweaks
Added support for multiple -wadpath args.
Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
Support 'bevel' and 'null' textures for compat with zhlt.
commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:59:42 2019 +0000
Support for halflife-style .rad surface lights (probably too bright, but the basics work).
commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:56:27 2019 +0000
Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.
commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 21 04:51:24 2019 +0000
First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen
ba7bdf86a1
light: increase max sky distance to 1M
2019-04-20 12:27:27 -06:00
Eric Wasylishen
b343b9504a
qbsp, light: support _minlight_exclude on func_group, detail, etc.
2019-04-05 21:14:39 -06:00
Eric Wasylishen
cf4a491de8
light: fix black faces with sunlight pointing straight down
...
The angle < 0 check was too aggressive because the sun vector
didn't end up being exactly Z=-1, it had a bit of X component.
2019-03-10 18:27:22 -06:00
Eric Wasylishen
fa06716545
common: make VecStrf/VecStr threadsafe
2018-07-24 00:18:43 -06:00
MaxED
07447a633e
Rewritten parts of surface light logic. Should resemble qrad3 looks a bit more now...
...
Added "surflightscale", "surflightbouncescale" and "surflightsubdivision" cmdline/worldspawn settings.
Fixed: a face should not be skipped when it has both sky and nodraw texinfo flags.
Fixed some non-windows compilation errors.
2018-05-25 14:59:22 +03:00
MaxED
0661098bc5
Quake 2 support: area lights, palette/texture loading, transparent/sky/fence face flags.
2018-05-08 15:50:01 +03:00
Eric Wasylishen
c3183429fb
light: fix for inalid_texture_axes.map
2018-01-15 20:33:52 -07:00
Eric Wasylishen
ebb508c7db
light: remove transparent lightmaps spam
2017-12-28 12:50:32 -07:00
Eric Wasylishen
3675805f54
light: add some disabled code
2017-12-11 00:40:41 -07:00
Eric Wasylishen
91abc7362d
light: add flood-filling to fix black seams in detailwall.map when no -extra/-extra4 used
2017-12-11 00:39:04 -07:00
Eric Wasylishen
701589ffe9
light: rewrite -highlightseams code
2017-12-11 00:30:11 -07:00
Eric Wasylishen
fb18881a5b
light: fix color->greyscale conversion to be compatible with MarkV
...
Unfortunately this means .bsp's released with the previous code
will look different in MarkV.
2017-12-10 17:27:52 -07:00
Eric Wasylishen
33bc1ee05e
light: wip work on CalcPointNormal
2017-12-06 23:38:59 -07:00
Eric Wasylishen
71d9f8ce8a
light: move NeighbouringFaces_new to phong.cc
2017-12-06 00:23:21 -07:00
Eric Wasylishen
69879b4104
light: add -highlightseams flag
2017-12-05 15:09:34 -07:00
Eric Wasylishen
cf9344f684
light: try to make -debugneighbours more useful
2017-12-05 00:34:32 -07:00
Eric Wasylishen
92bacbe7e1
light: FacesOverlappingEdge: return the edge that overlaps
2017-11-24 14:22:54 -07:00
Eric Wasylishen
8ce7a682b1
light: add -debugneighbours
2017-11-23 23:45:15 -07:00
Eric Wasylishen
7170aac1c3
light: FacesOverlappingEdge
2017-11-23 23:45:05 -07:00
Eric Wasylishen
b85d627c8f
change branding to ericw-tools
2017-10-19 16:35:37 -06:00
Eric Wasylishen
41527a1c39
light: don't discard near-black lightmaps in q2
2017-10-03 18:16:28 -06:00
Eric Wasylishen
2dc22b7088
common: add loadversion to mbsp_t
2017-10-03 14:17:42 -06:00
Eric Wasylishen
71d675ce09
light: factor out TEX_SPECIAL tests to Face_IsLightmapped
2017-10-03 14:10:57 -06:00
Eric Wasylishen
dff71edfe9
light: very early q2 support. half of the faces seem to be saved without lightmaps for some reason
2017-10-03 00:33:14 -06:00