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

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

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

Postby TDRR » Fri Mar 13, 2020 5:24 pm

GShadow: Dynamic blob shadows for G/ZDoom!

Download GShadow RV2!

"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.

NOTE: This 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.

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)


Spoiler: Screenshots


Spoiler: How do i add this into my projects


Spoiler: Changelog


Spoiler: Implementation details


Link to the original topic, of GShadow Beta 2.
Last edited by TDRR on Sat Mar 28, 2020 11:52 am, edited 6 times in total.
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Redneckerz » Fri Mar 13, 2020 7:49 pm

I absolutely love this.

One of the more interesting mods as its something you would expect out of a renderer.

Impressive.
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

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

Postby TDRR » Sat Mar 14, 2020 7:17 pm

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.
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Ferretmanjcdenton » Sun Mar 15, 2020 4:24 pm

Hi ..
I use the newest version of Delta touch..so gz 4.2.2
And in the outside areas there is a shadow but only a square box ...
Any idea how to fix that?
Ferretmanjcdenton
 
Joined: 09 Mar 2020
Discord: Delatdoomguy84
Operating System: Other OS Not Listed Here
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: Not Listed

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

Postby TDRR » Sun Mar 15, 2020 5:10 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).

Ferretmanjcdenton wrote:Hi ..
I use the newest version of Delta touch..so gz 4.2.2
And in the outside areas there is a shadow but only a square box ...
Any idea how to fix that?

That's perfectly normal. Default shadow shape is just a rectangle, but i just added "shadowpacks" to fix the "issue". https://www.mediafire.com/file/q54k18zk ... m.pk3/file
Here's a link, this should be loaded AFTER GShadowRV2.pk3.

EDIT: Whoops, ConsolePlayerNumber does not work in ZDoom so that means the CVARs don't do anything there, a fix for that will be uploaded soon™.
EDIT2: Wait no nevermind that function just returns 0 in ZDoom so it still works, just not in multiplayer but i can't fix that anyways.
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Redneckerz » Mon Mar 16, 2020 7:58 am

TDRR wrote: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).

Ferretmanjcdenton wrote:Hi ..
I use the newest version of Delta touch..so gz 4.2.2
And in the outside areas there is a shadow but only a square box ...
Any idea how to fix that?

That's perfectly normal. Default shadow shape is just a rectangle, but i just added "shadowpacks" to fix the "issue". https://www.mediafire.com/file/q54k18zk ... m.pk3/file
Here's a link, this should be loaded AFTER GShadowRV2.pk3.

EDIT: Whoops, ConsolePlayerNumber does not work in ZDoom so that means the CVARs don't do anything there, a fix for that will be uploaded soon™.
EDIT2: Wait no nevermind that function just returns 0 in ZDoom so it still works, just not in multiplayer but i can't fix that anyways.

TDRR, can you add some screenshots of Doom actors with just the .pk3 and with a Shadowpack? I'd love to write about this on R667.

I could always make my own screenies using LZDoom, but i prefer author-made screencaps for that ''official'' seal of approval. If this is too much of a request, id understand though!
Last edited by Redneckerz on Mon Mar 16, 2020 12:47 pm, edited 1 time in total.
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

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

Postby Starman the Blaziken » Mon Mar 16, 2020 12:44 pm

I would like to see screenshots about the mod too, just to see what it has to offer before I look at it with anything.
Starman the Blaziken
 
Joined: 08 Mar 2019
Location: United States, MI
Discord: Starman The Blaziken#2417
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby TDRR » Mon Mar 16, 2020 12:57 pm

Redneckerz wrote:TDRR, can you add some screenshots of Doom actors with just the .pk3 and with a Shadowpack? I'd love to write about this on R667.

I could always make my own screenies using LZDoom, but i prefer author-made screencaps for that ''official'' seal of approval. If this is too much of a request, id understand though!


Starman the Blaziken wrote:I would like to see screenshots about the mod too, just to see what it has to offer before I look at it with anything.

Done. The screenshots are FAR larger than the mod itself, hah, but i added 6 of em'. I'm not good at making screenshots look cool but i guess these are enough.

Red, if you end writing about this on R667, remember to mention it runs in Zandronum, it's not nearly as cool if you don't mention that! :wink:
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Redneckerz » Mon Mar 16, 2020 1:04 pm

Thanks for the screenies!
TDRR wrote:Red, if you end writing about this on R667, remember to mention it runs in Zandronum, it's not nearly as cool if you don't mention that! :wink:

I will. I know you like to thinker with older engines and getting the most out of them visually - You did a lot of stuff in GZDoom 1.8 if i remember correctly.

Very glad that you picked this up because i love mods like these that actually just add visuals like that.

Too bad there is no custom build though that has this stuff built-in right at the source. :wink:

PS: I am thinking - Can't movable objects also have this? Like a barrel that explodes or is on a conveyor belt could have something similar to an actor that way. Not sure if that's possible though, but food for thought.
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

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

Postby TDRR » Mon Mar 16, 2020 1:24 pm

Redneckerz wrote:Thanks for the screenies!

I will. I know you like to thinker with older engines and getting the most out of them visually - You did a lot of stuff in GZDoom 1.8 if i remember correctly.

Very glad that you picked this up because i love mods like these that actually just add visuals like that.

Yeah, I think the vast majority (If not all of them) of the projects i have released target GZDoom 1.8.6/Zandronum 3.0 as minimum, kinda out of a necessity i suppose with my crappy hardware and all.

In all honesty, I had picked this up because an upcoming project in Zandronum was looking (in my eyes at least) a bit too... "bland", so I fiddled around with this. The results weren't bad so I took the opportunity to also make it compatible with Doom itself.

Redneckerz wrote:Too bad there is no custom build though that has this stuff built-in right at the source. :wink:

Related to this, I toyed around with the idea to make it universal using ZScript, but there's no way of knowing how an object should be tagged as a "light emitter". The monsters part is already done, but I'm not releasing it until I figure out the light emitter identification. Should be easy, but I'm a real noob at ZScript.

Redneckerz wrote:PS: I am thinking - Can't movable objects also have this? Like a barrel that explodes or is on a conveyor belt could have something similar to an actor that way. Not sure if that's possible though, but food for thought.

Anything could cast a shadow if I wanted, but there's a point where it just gets unnecessarily complicated and everything casting a shadow is ridiculous, even more so considering very, very few objects are movable in Heretic, and how none at all are movable in Doom. Monsters are the bare essentials basically.

That being said, if anyone wants to do that when implementing GS:R into their mods, go right ahead! It's just that there's not much point in doing it in vanilla Doom environments.

Also, if you think this looks impressive for a Zandronum mod, you just won't believe your eyes when the next project is done! :wink:
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Redneckerz » Mon Mar 16, 2020 2:02 pm

TDRR wrote:Yeah, I think the vast majority (If not all of them) of the projects i have released target GZDoom 1.8.6/Zandronum 3.0 as minimum, kinda out of a necessity i suppose with my crappy hardware and all.

I support the low-end cause given my rig is equally crappy and probably worse than yours, so i love ideas like this.

I am sure you are aware of Nash's SpriteShadow thing that does something eerily similar, right?

TDRR wrote:Related to this, I toyed around with the idea to make it universal using ZScript, but there's no way of knowing how an object should be tagged as a "light emitter". The monsters part is already done, but I'm not releasing it until I figure out the light emitter identification. Should be easy, but I'm a real noob at ZScript.

Perhaps Marisa can help you out with this part? Its worth a try! But i can imagine a custom build is equally enticing for mods (Or Zandronum, haha) :)

TDRR wrote:Anything could cast a shadow if I wanted, but there's a point where it just gets unnecessarily complicated and everything casting a shadow is ridiculous, even more so considering very, very few objects are movable in Heretic, and how none at all are movable in Doom. Monsters are the bare essentials basically.

That being said, if anyone wants to do that when implementing GS:R into their mods, go right ahead! It's just that there's not much point in doing it in vanilla Doom environments.

Something more related to this - It is stated that this is pure Decorate and ACS, no shaders, and runs on ZDoom aswell - So basically it can run without any hardware acceleration. What's the performance penalty really with these shadows (Which i assume, like the original revolve around a Shadowbrain actor)?

TDRR wrote:Also, if you think this looks impressive for a Zandronum mod, you just won't believe your eyes when the next project is done! :wink:

You have me at normal mapping support :lol: Kidding, i am just saying, i love your works and your dedication to the low end userbase, and putting mileage out of older builds - Like with your QEffectsGL port to Zandro, if i recall.
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

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

Postby TDRR » Mon Mar 16, 2020 2:25 pm

Redneckerz wrote:I support the low-end cause given my rig is equally crappy and probably worse than yours, so i love ideas like this.

I am sure you are aware of Nash's SpriteShadow thing that does something eerily similar, right?

Yeah, I am. Never been a big fan of the effect however, and anyways i only ever tried it very, very few times, requiring at least LZDoom while I use ZDoom32 and Zandronum the most. (LZDoom is 2slow4me!)

I don't think your rig is worse or equal to mine, tho, you got an Nvidia GPU (I got this awful Intel Baytrail thingy that has GL 4.0 but at a horrible performance), and probably a CPU not meant for power-saving laptops (Rockin' a Celeron 1.4GHz here :lol: )

Redneckerz wrote:Perhaps Marisa can help you out with this part? Its worth a try! But i can imagine a custom build is equally enticing for mods (Or Zandronum, haha) :)

Actually, about the custom build thing... I got an idea for a zandronum.pk3 hack that may do the job, gimme 30 minutes and let's see if I can get anything out of it!
I guess I'll ask him/her if I can't manage to get the hack working, prolly a good idea.

Redneckerz wrote:Something more related to this - It is stated that this is pure Decorate and ACS, no shaders, and runs on ZDoom aswell - So basically it can run without any hardware acceleration. What's the performance penalty really with these shadows (Which i assume, like the original revolve around a Shadowbrain actor)?

I tried my best to simplify it as much as possible, and I stripped down the system to just 2 actors: ShadowTarget and ShadowActor. Since there's only one shadow, there's no need for a ShadowBrain anymore, and all possible targets are added up to an array which is then accessed by the ShadowActor to know which one of the ShadowTargets are the closest, and then proceed to face it and do the size/alpha calculations relative to it's distance.

With that in mind, the performance penalty is very small. In all vanilla maps I'm usually getting a solid 60fps at 1280x720, as opposed to GShadow Beta 2, which would easily dip down into the 10's even in very simple maps. I haven't done any real benchmarks nor any real testing beyond IWAD or Vanilla-compat maps, but given all tests have had very successful results in terms of performance, I'm plenty sure most maps will run fine on most computers.

Redneckerz wrote:You have me at normal mapping support :lol: Kidding, i am just saying, i love your works and your dedication to the low end userbase, and putting mileage out of older builds - Like with your QEffectsGL port to Zandro, if i recall.

Never really ported QEffectsGL to Zandro, I have nearly zero programming experience unless you were to count ZDoom and SRB2 scripting, which probably doesn't really count, It was just a config file I posted that made the errors look less... terribly obvious! There won't be any normal mapping support, heh, but do expect something fairly similar to specular maps, and "ghetto parallax mapping" :lol:
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Redneckerz » Mon Mar 16, 2020 2:38 pm

TDRR wrote:Yeah, I am. Never been a big fan of the effect however, and anyways i only ever tried it very, very few times, requiring at least LZDoom while I use ZDoom32 and Zandronum the most. (LZDoom is 2slow4me!)

I don't think your rig is worse or equal to mine, tho, you got an Nvidia GPU (I got this awful Intel Baytrail thingy that has GL 4.0 but at a horrible performance), and probably a CPU not meant for power-saving laptops (Rockin' a Celeron 1.4GHz here :lol: )

You don't want to bet against me!
Athlon X2 215
3 GB DDR2
Geforce 6150 SE IGP (Yes, that bad).

I guess ill outrank your rig on CPU performance, but on GPU, i think you beat me, certainly with the feature levels support though! Surprised LZDoom does not run that well - Here it works pretty fine, but perhaps i need to start using ZDoom32 to see the difference. :wink:

Besides, i love talking about this kind of stuff, so feel free to hit me up on Discord and discuss things further. Ill always provide a listening ear if needed.

TDRR wrote:Actually, about the custom build thing... I got an idea for a zandronum.pk3 hack that may do the job, gimme 30 minutes and let's see if I can get anything out of it!
I guess I'll ask him/her if I can't manage to get the hack working, prolly a good idea.

I reckon so! It could be fun to have such a build laying around, or to use it along side your other mods. You have been heavily involved in these communities anyways - So a custom build is not out of the extraordinary, even if its a quick hack.

TDRR wrote:I tried my best to simplify it as much as possible, and I stripped down the system to just 2 actors: ShadowTarget and ShadowActor. Since there's only one shadow, there's no need for a ShadowBrain anymore, and all possible targets are added up to an array which is then accessed by the ShadowActor to know which one of the ShadowTargets are the closest, and then proceed to face it and do the size/alpha calculations relative to it's distance.

With that in mind, the performance penalty is very small. In all vanilla maps I'm usually getting a solid 60fps at 1280x720, as opposed to GShadow Beta 2, which would easily dip down into the 10's even in very simple maps. I haven't done any real benchmarks nor any real testing beyond IWAD or Vanilla-compat maps, but given all tests have had very successful results in terms of performance, I'm plenty sure most maps will run fine on most computers.

Interesting stuff. Perhaps you can add this to your OP as an explanation of how this differs from the original GShadow? That one had a beyond excellent video tutorial, but considering the difference, might be worth while to add :)

TDRR wrote:Never really ported QEffectsGL to Zandro, I have nearly zero programming experience unless you were to count ZDoom and SRB2 scripting, which probably doesn't really count, It was just a config file I posted that made the errors look less... terribly obvious! There won't be any normal mapping support, heh, but do expect something fairly similar to specular maps, and "ghetto parallax mapping" :lol:

Yeah that .ini file is what i meant - Found it interesting non the less.

Specular maps and Parallax maps? I like the sound of this. QZandronum, when? :lol:

(And yes, i know Rachael has had a repo with that name in case someone wants to mention that, haha)
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

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

Postby Awez » Mon Mar 16, 2020 3:49 pm

What does your GZDOOM config look like? I cannot for the life of me get this mod to work, it's being loaded and will give errors if put in the wrong order, but in game I have nothing. Toggling the console commands has no effect. I'm running GZDOOM 4.3.3 on Windows 7, OpenGL renderer and dynamic lights enabled. Any clue?
Awez
Lurking
 
Joined: 03 Jun 2016
Location: 'Murrica

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

Postby TDRR » Mon Mar 16, 2020 4:03 pm

Awez wrote:What does your GZDOOM config look like? I cannot for the life of me get this mod to work, it's being loaded and will give errors if put in the wrong order, but in game I have nothing. Toggling the console commands has no effect. I'm running GZDOOM 4.3.3 on Windows 7, OpenGL renderer and dynamic lights enabled. Any clue?

Do note that the effect is fairly subtle, easiest way to try is going to Doom 2 MAP15, and make sure to check if the enemies outdoors are casting a shadow. I tried myself in GZDoom 4.3.3 and everything works as intended.
User avatar
TDRR
A living work in progress
 
Joined: 11 Mar 2018
Location: Venezuela
Discord: TDRR#5820
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: Intel (Modern GZDoom)

Next

Return to Gameplay Mods

Who is online

Users browsing this forum: Simple Pie [RSS], Valherran, Yebudoom and 21 guests