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
6ecdd444ca
light: optimize surface light generation
2021-05-21 22:01:09 -06:00
Eric Wasylishen
fbde6065fa
light: raise max verts in SubdividePolygon to 64 (for surface lights)
2021-04-11 20:57:30 -06:00
Eric Wasylishen
fea7849315
common: preserve order of key/value pairs
2021-02-10 00:05:53 -07:00
Eric Wasylishen
b5fcdec19e
cleanup: remove "byte" typedef
2021-02-07 14:02:35 -07:00
Eric Wasylishen
9124653156
common: move EntData_ function to common
2021-01-30 21:11:25 -07:00
Eric Wasylishen
94c30afac4
light: refactoring necessary to support embree3
2021-01-01 23:48:22 -07:00
Eric Wasylishen
6b1bbf25ae
light: fix order of settings loading for last commit
2019-10-31 00:51:56 -06:00
Eric Wasylishen
b132152891
light: allow starting assigning switchable styles before default of 32
2019-10-31 00:40:23 -06:00
Eric Wasylishen
4456020b30
light: remove 65536 ray limit, fixes #276
2019-10-28 01:12:23 -06:00
Eric Wasylishen
d4cc19afc5
light: rename _dome to _sunlight2/_sunlight3
2019-10-09 20:24:18 -06:00
Eric Wasylishen
fa62b20603
light: add a limited version of Lunaran's "_dome" light feature
...
that only supports domes oriented up/down like sunlight2/3
2019-10-09 02:12:04 -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
Eric Wasylishen
af4deba237
light: print key name for Key length > MAX_ENT_KEY-1 error
2019-08-10 20:42:16 -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
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
520ad485a4
Merge branch 'master' of https://github.com/ericwa/ericw-tools into q2-surfacelights
2018-05-08 15:50:45 +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
MaxED
00e60f923e
Q2 doesn't need .lit files ( #211 )
...
* Ignore embree
* Don't ignore embree...
* Q2 doesn't need .lit files.
Also fixed a typo.
2018-04-14 15:43:46 -07:00
Eric Wasylishen
f663792307
light: fix surface lights crash
2018-04-05 22:32:22 -06:00
Eric Wasylishen
8813d272cb
common, light, vis: change from bsp2_t to mbsp_t
2017-10-01 22:32:20 -06:00
Eric Wasylishen
f7635162c9
common: bspfile refactoring
2017-10-01 20:51:16 -06:00
MaxED
d86913aaaf
light: fixed "_sun" light direction was calculated incorrectly when using a light without a target and mangle
2017-08-27 14:20:43 -06:00
MaxED
15871d2531
light: add _spotlightautofalloff
2017-08-27 14:20:03 -06:00
MaxED
604aa92e6f
light: remove dead code
2017-08-27 14:08:18 -06:00
MaxED
fe1e040cd1
Added "_falloff" light property. Allows to set light falloff in map units.
2017-08-23 15:00:32 -06:00
Eric Wasylishen
1d12d6ab4e
Support multiple suns with "_sun" "1" entities.
...
Drop support for overriding properties of these entities with worldspawn keys.
2017-08-23 13:37:59 -06:00
Eric Wasylishen
e5ac4da8a2
Convert indentation to spaces
2017-08-23 12:43:29 -06:00
MaxED
97ab6fcdab
Added arghrad-style sun setup using light entity.
2017-08-23 14:18:10 +03:00
Eric Wasylishen
6e707130be
light: rename dynamic shadow stuff to switchshadstyle" for QC,
...
and "_switchableshadow" for the mapper.
2017-06-26 13:41:24 -06:00
Eric Wasylishen
b71f769c0a
light: experimental support for switchable bmodel shadows:
...
Current specs/limitations:
- only supported for sunlight and regular lights
- enabled with "_dynamicshadow" "1"
- writes the lightstyle to a "dynshadowstyle" entity key, hardcoded
- only handles one dynamic occluder for a given lightmap sample
- styled lights passing through a dynamic occluder turn non-styled
2017-06-25 20:06:46 -06:00
Eric Wasylishen
68b084a6c3
replace glm with qvec
2017-04-24 00:26:49 -06:00
Eric Wasylishen
60418ce9a7
light: add maximum switchable lights to log message
2017-04-22 11:53:55 -06:00
Eric Wasylishen
880ad3b381
bpsutil, common, light, vis: bounds check bsp->dfaces access
2017-03-18 16:31:52 -06:00
Eric Wasylishen
6f66473836
light: add mangle_from_vec
2017-02-14 23:45:38 -07:00
Eric Wasylishen
9aae46bd1c
light: adjust Light_PointInSolid to take a model param
2017-02-10 15:54:07 -07:00
Eric Wasylishen
29b420c7dd
light: move Light_PointInSolid to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
cc71ad024f
qbsp: origin brush support
...
light: allow model offset on any brush entity with "origin" key set, not just ones with a "rotate_*" classname
2017-01-24 21:39:03 -07:00
Eric Wasylishen
b46cba40a4
light: entity warnings: print bbox for bmodel entities
...
fixes https://github.com/ericwa/tyrutils-ericw/issues/120
2016-11-24 17:10:15 -07:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
722f753d8d
light: remove some unused vis-testing stuff
2016-09-19 19:21:04 -06:00
Eric Wasylishen
f7091c27f8
light: add some tests for the EntDict_Check* functions
2016-09-19 19:16:45 -06:00
Eric Wasylishen
26dcb4f10f
light: refactor warnings code. warn if an entity targets itself
2016-09-19 18:28:16 -06:00
Eric Wasylishen
12f55292f7
light: CheckTargetsMatched: for "targetname with no targetter" warning, allow any key to be the targetter
2016-09-19 16:08:08 -06:00
Eric Wasylishen
4ec0a62ce8
light: CheckEmptyValues: print entity classname and origin
2016-09-19 14:42:04 -06:00
Eric Wasylishen
d4395bc660
light: improved CheckTargets
2016-09-19 14:34:36 -06:00
Eric Wasylishen
63d2bcf91c
light: move empty values check to its own function
2016-09-19 14:28:50 -06:00
Eric Wasylishen
28bec79830
light: add more fuzz (25%) to the bbox size for vis approximation.
...
Not sure if this is necessary, but fixes a tricky case in lightstest1.map (infinite reach light casting a sharp shadow across a large room)
2016-09-19 12:27:02 -06:00