GShadow: Resurrected v3 - RT actor shadows (31/8/20)

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
User avatar
TDRR
Forum Regular
Posts: 219
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela
Contact:

GShadow: Resurrected v3 - RT actor shadows (31/8/20)

#1

Post by TDRR » Fri Mar 13, 2020 11:40 pm

GShadow: Dynamic blob shadows for G/ZDoom!
Now universal! (in terms of mods that use Doom as the IWAD, anyways)

Download GShadow RV2!
Download GShadow RV3 (Universal)

"This is a tiny resource mod that allows to cast multiple dynamic shadows on both Software and Hardware renderer without need of shaders or any special stuff, pure DECORATE and ACS! You can use it for your own projects without asking for permission." -sonic_HD87, original GShadow dev.

Those who have seen GShadow and remember what it was like, may remember it was quite slow even on just IWAD maps, and it didn't work correctly on Zandronum (yet it still ate bandwidth like nothing else). However, GShadow: Resurrected aims to fix those issues, greatly speeding up performance, making it even easier to add to your own projects, adding compatibility with Zandronum (Because why not?), and some more.
Spoiler: Compatibility with other mods (Open)
The non-universal version is not compatible with all gameplay mods, only those that leave monsters and decorations intact. Only exception i know of is DUBG, if you enable Dehacked Compatibility, and possibly MetaDoom, but not sure if it's mod detection only detects DEHACKED patches.

The universal version is compatible with mods that use the same editor numbers for their replaced decorations as the original (in basic terms, it's compatible with any mod that works with regular Doom maps), but there's no restrictions in terms of monsters (except monsters with larger radius/height than a pinky don't cast shadows, which is intentional). Load order shouldn't matter, but try loading GShadow last if it doesn't work.
I've tested with the following mods successfully:
Brutal Doom v21 (if it works with this one, it should work with all of them lol)
Project Brutality REDUX
Death Foretold
Quake Champions: Doom Edition
Complex Doom
Doom 4 Vanilla
DUBG (plus the monsters addon, otherwise it was compatible with the non-universal version too)

Also, it's not compatible with any of the Shadowpacks (for reasons I hope are obvious enough), so shadows will appear square on all mods.
You can disable it mid-game by setting the gs_enable CVAR to 0 or FALSE.
You can also disable shadows being casted outdoors without any nearby light source with the gs_outdoorshadow CVAR.
Spoiler: Shadowpacks NEW (15/03/20) (Open)
What are "shadowpacks"? Shadowpacks are simply replacements for the default rectangular shadow to shadows that have the shape of the actual thing they are casted from, so if a Zombieman gets put in front of a light source, the shadow looks more like a silhouette of him, and not like just a rectangle. These don't work with the universal version.

Currently, there's only one available for vanilla Doom's monsters and player, but i may make one for FreeDoom and Heretic later.
Download vanilla Doom shadowpack
NOTE: The load order is GShadow main .pk3 first, and then your shadowpack of choice.
Spoiler: Screenshots (Open)
Image
Image
Image
Image
Image
Image
Spoiler: How do i add this into my projects (Open)
If you wanna add it into your project, you can copy all of the things in the .pk3, rename LICENSE.txt to GSHADOW-LICENSE.txt, and merge the contents of each file into your project's version of them (For example, if your project already has CVARINFO, then put the contents of the GShadow:R CVARINFO into that one).

Then, in every monster actor (that's not much bigger than a pinky so it doesn't look weird), add this line to the very start of the Spawn state:
TNT1 A 0 NoDelay A_GiveInventory("GS_SpawnShadow")

And this one at the very start of the Spawn state of static actors that should cast light:
TNT1 A 0 NoDelay A_GiveInventory("GS_SpawnLight")

And that's it, your project now has GShadow support integrated.
Spoiler: Changelog (Open)
v3 (31/8/2020)
-Added an universal version. Non-universal is still at v2, since anyways there's no changes on that front.

v2 (14/03/2020)
-Shadows are now displayed when outdoors and there's no nearby light source.
(Can be disabled with gs_outdoorshadow, customizable with LANGUAGE,
as shown in TEST_LANG.txt on the .pk3)

-Shadows can now be toggled from the clientside, as opposed to only being
toggled by the server host. (gs_enable CVAR controls this)

-Made it easier to change the shadow displayed, mostly for use with mods.

-Minor optimizations to online play.


From GShadow Beta 2 to GShadow: Resurrected v1 (13/03/2020)
-MASSIVE optimizations to all of the code, and there's only one shadow per
actor, instead of multiple.

-Practically all of the way shadows work has been completely rewritten.

-Works on all maps now.

-Runs in Zandronum now (It did before, but nothing worked).

-Code has been cleaned up with proper indentation, and removed various useless
actors and scripts.

-Toggleable with gs_enable, in case a mod implements this and you don't like
the effect or it just bogs down performance too much on your end.

-Now works online without latency skyrocketing.

-Fixed enemies spawning more shadows when they lose a target.

-Restored dynamic lights for the light sources, now the shadows actually
make sense.

-Greatly reduced shadow model polygon count from 216 (more or less if Noesis'
voxel converter isn't the same as ZDoom's) to just 2 polygons.
Software mode is still identical.

-Slightly offset model upwards so it wouldn't flicker when on a moving lift.

-Added compatibility with Heretic.

-Now licensed under the MIT license.
Spoiler: Implementation details (Open)
Compared to GShadow Beta 2, everything has been almost completely changed.

Most importantly the ShadowBrain and ShadowContainer actors have been completely cut from the equation, as I felt things could be done much faster cutting the middlemen and setting up things directly from the ShadowActor itself.

Now, there's only one ShadowActor per shadowcaster, since one of the major performance issues was caused by the fact that every actor had one ShadowContainer, but one ShadowActor per light source, which means that basically 80 monsters with 20 light sources is: 1600 shadow actors! Yeah, no wonder it was so slow!
While it may look very slightly less realistic in some situations, the gigantic (perhaps 20 times faster or more on average) increase in performance is well worth it.

And there are also some other minor performance optimizations here and there, most notably the monsters' shadows being updated 4 times less than the player's (Reducing the amount of times the size and alpha of the shadow has to be recalculated). All of this amounts to a quite lightweight shadow system, being far less of a trade-off compared to the already quite solid GShadow Beta 2, and making it more viable to be implemented in more heavyweight projects.
Link to the original topic, of GShadow Beta 2.
Last edited by TDRR on Wed Sep 02, 2020 5:54 pm, edited 5 times in total.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.

User avatar
Ivan
Addicted to Zandronum
Posts: 2219
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

Re: GShadow: Resurrected v1 - Real time actor shadows (13/03/20)

#2

Post by Ivan » Fri Mar 13, 2020 11:57 pm

While the technique used in here seems impressive it just doesn't look good enough. And I see problems with height changes in sectors in the video of your original topic link. Not sure if it's worth using at this state.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
TDRR
Forum Regular
Posts: 219
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela
Contact:

Re: GShadow: Resurrected v1 - Real time actor shadows (13/03/20)

#3

Post by TDRR » Sat Mar 14, 2020 2:41 am

Ivan wrote:
Fri Mar 13, 2020 11:57 pm
While the technique used in here seems impressive it just doesn't look good enough. And I see problems with height changes in sectors in the video of your original topic link. Not sure if it's worth using at this state.
Well, that's something the modder/user himself will have to decide. You can modify it to use a different image per actor, so it looks more convincing, but that's about it. If you don't like it, well, then unfortunately there's not much i can do since this is as good as it gets without source modifications to Zandronum itself.

About the height change issue, that isn't very common in the use cases i made it for, and anyways i prefer the option (because yes, it's optional for a reason) of having at least some sort of dynamic shadows over none.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.

User avatar
TDRR
Forum Regular
Posts: 219
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela
Contact:

Re: GShadow: Resurrected v2 - Real time actor shadows (14/03/20)

#4

Post by TDRR » Sun Mar 15, 2020 2:56 am

Updated!

Full changelog as follows:
-Shadows are now displayed when outdoors and there's no nearby light source.
(Can be disabled with gs_outdoorshadow, customizable with LANGUAGE,
as shown in TEST_LANG.txt on the .pk3)

-Shadows can now be toggled from the clientside, as opposed to only being
toggled by the server host. (gs_enable CVAR controls this)

-Made it easier to change the shadow displayed, mostly for use with mods.

-Minor optimizations to online play.

Download link in the first post, as always.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.

User avatar
TDRR
Forum Regular
Posts: 219
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela
Contact:

Re: GShadow: Resurrected v2 - Real time actor shadows (15/03/20)

#5

Post by TDRR » Sun Mar 15, 2020 11:27 pm

Added "shadowpacks", which provide properly-shaped shadows for each of the supported monsters. Currently, only one for vanilla Doom is available, and you can get it on the first post, under the "Shadowpacks" spoiler (first spoiler).
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.

User avatar
TDRR
Forum Regular
Posts: 219
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela
Contact:

Re: GShadow: Resurrected v2 - Real time actor shadows (15/03/20)

#6

Post by TDRR » Wed Sep 02, 2020 5:51 pm

Updated! I added an "universal" version to the first post. Still compatible with Zandronum, and should work perfectly fine with the vast majority of mods that are compatible with Doom maps out there.

However, be careful with it if you're gonna host it, as it's been completely untested online and I suspect the way support for any monster is implemented may cause heavy lag.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

Re: GShadow: Resurrected v3 - RT actor shadows (31/8/20)

#7

Post by Ænima » Sun Sep 06, 2020 6:03 pm

Great idea, creative implementation. Great work. :lol:


However, i can foresee this falling victim to the same problems as mods that make use of big flat models for blood pools or other decorations, whereas they appear to “float” over slopes and maps that use very shallow stairs.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Post Reply