Commit Graph

200 Commits

Author SHA1 Message Date
Eric Wasylishen 2fc1e9099a light: remove dead / non-working code for non-embree light tracing 2021-10-02 21:12:12 -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 8fd1d89b8d Fix double-delete
Fix typo
2021-09-05 17:39:17 -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 3b629f3ce9 light: fix q2 lightstyles 2021-01-01 00:14:52 -07:00
Eric Wasylishen d8b30c1080 light: don't throw an error on -v (passed by quark) 2020-12-29 16:40:09 -07:00
Julian Priestley 1b714108cd
Add ability to set phong in worldspawn #267 (#305) 2020-11-30 00:42:42 -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 03ed0697a4 light: add -litonly option for re-lighting a bsp without modifying it 2020-08-03 00:40:13 -06:00
Eric Wasylishen 22469857f0 light: rename new -light flag to -radlights, because it was clobbering
the existing -light flag for setting minlight
2019-12-11 01:17:53 -07:00
Eric Wasylishen b132152891 light: allow starting assigning switchable styles before default of 32 2019-10-31 00:40:23 -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 c6386c8ec0 light: fix format string warnings 2018-07-23 23:12:03 -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 ebb508c7db light: remove transparent lightmaps spam 2017-12-28 12:50:32 -07:00
Eric Wasylishen 69879b4104 light: add -highlightseams flag 2017-12-05 15:09:34 -07:00
Eric Wasylishen b8b17123d1 light: don't set up bounce lights in debug modes 2017-12-04 23:37:43 -07:00
Eric Wasylishen d9f112a97f light: add -phongdebug_obj flag 2017-11-25 23:12:23 -07:00
Eric Wasylishen 8ce7a682b1 light: add -debugneighbours 2017-11-23 23:45:15 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen 2dc22b7088 common: add loadversion to mbsp_t 2017-10-03 14:17:42 -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
Eric Wasylishen 8813d272cb common, light, vis: change from bsp2_t to mbsp_t 2017-10-01 22:32:20 -06:00
Eric Wasylishen c5370b16eb light: update -help text 2017-06-27 19:31:19 -06:00
Eric Wasylishen fef1142808 light: add shadowworldonlylist 2017-06-27 13:13:32 -06:00
Eric Wasylishen 78ed70e2a5 light: modelinfo_t: take bsp param 2017-06-27 12:59:17 -06: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 902c45c946 all: make VectorCompare take an explicit epsilon 2017-04-26 14:20:45 -06:00
Eric Wasylishen 68b084a6c3 replace glm with qvec 2017-04-24 00:26:49 -06:00
Eric Wasylishen b911c70372 light: do bounce after phong 2017-03-19 14:20:47 -06:00
Eric Wasylishen 880ad3b381 bpsutil, common, light, vis: bounds check bsp->dfaces access 2017-03-18 16:31:52 -06:00
Eric Wasylishen 461afbc15d light: remove ltface2.cc/hh 2017-03-01 13:20:09 -07:00
Eric Wasylishen b163f766bb light: drop unneeded light2.cc/hh 2017-02-27 19:10:55 -07:00
Eric Wasylishen 69d5669773 light: delete some dead code 2017-02-27 17:43:56 -07:00
Eric Wasylishen 6c946038ee light: move edgeToFaceMap_t stuff to phong.hh/cc 2017-02-25 14:44:59 -07:00
Eric Wasylishen 21fa5c5949 Revert "light: rewrite -debugface picking code"
This reverts commit 20c92fc676.
2017-02-16 15:55:13 -07:00
Eric Wasylishen ea9c456367 Revert "light: Face_Pick: make more lenient"
This reverts commit 5292728fe3.
2017-02-16 15:55:01 -07:00
Eric Wasylishen 5292728fe3 light: Face_Pick: make more lenient 2017-02-14 23:46:10 -07:00
Eric Wasylishen 20c92fc676 light: rewrite -debugface picking code 2017-02-13 13:33:11 -07:00
Eric Wasylishen 7300aacdff light: Add -debugoccluded 2017-02-11 22:22:26 -07:00
Eric Wasylishen 5fe4f23371 light: add a debug mode for showing contributing faces 2017-02-11 15:45:30 -07:00
Eric Wasylishen 71a3dd769a light: clean up LightFace() function 2017-02-10 15:52:12 -07:00