SpriteShadow v2.0 (now built into GZDoom 4.6.0!)

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
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.

Re: SpriteShadow: Duke3D-like Shadows v1.7a [performance upd

Postby Tekish » Wed Dec 19, 2018 9:20 am

When 1.7a is used with Universal Gibs, this happens whenever a monster is gibbed:

Image
Tekish
 
Joined: 28 Jun 2016

Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl

Postby Nash » Wed Dec 19, 2018 11:39 am

Update December 20th 2018 (version 1.8)

- Implemented max shadow distance to help performance with slaughtermaps
- Fixed a null pointer access

HolyHell.wad, MAP05 with 20,000 monsters, is now actually playable on my machine!
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: SpriteShadow: Duke3D-like Shadows v1.7a [performance upd

Postby AFADoomer » Wed Dec 19, 2018 12:33 pm

This line...
Code: Select allExpand view
      else if (caster.CheckIfSeen())

...causes an effect where if the centerline of a monster is out of the player's sight, but a portion of the body and/or the shadow is still in view, the shadow will freeze in the current location (despite the monster still moving) until the centerline of the monster is back in view. Maybe use CheckSightOrRange instead, so that the shadow always draws within a certain distance of the player?

EDIT: OK, that was with 1.7a, but 1.8 has the same issue...

EDIT2: I've changed the check to
Code: Select allExpand view
      else if (caster && caster.CheckSightOrRange(512))
with no issues - you could probably reuse the cvShadowDistance CVar here instead of 512.
Last edited by AFADoomer on Wed Dec 19, 2018 1:18 pm, edited 1 time in total.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl

Postby Tekish » Wed Dec 19, 2018 1:09 pm

Yes, I saw this happen in 1.8 as well.
Tekish
 
Joined: 28 Jun 2016

Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl

Postby Armaetus » Thu Dec 20, 2018 1:14 am

Oh nice, perhaps higher monster count monsters combined with Droplets would improve performance now :) Would actually be useful to me, especially when recording.
User avatar
Armaetus
RDND, Maps of Chaos and Obsidian Dev
 
Joined: 13 Mar 2009
Location: New York State
Discord: Armaetus#8512
Github ID: GlaiceOldSchoolRTS
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl

Postby m8f » Thu Dec 27, 2018 10:11 am

I wonder if there is any sane way to make shadows not be visible from below. Right now this is my only nitpick for this mod.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit

Re: SpriteShadow: Duke3D-like Shadows v1.7a [performance upd

Postby Nash » Fri Dec 28, 2018 11:25 am

AFADoomer wrote:This line...
Code: Select allExpand view
      else if (caster.CheckIfSeen())

...causes an effect where if the centerline of a monster is out of the player's sight, but a portion of the body and/or the shadow is still in view, the shadow will freeze in the current location (despite the monster still moving) until the centerline of the monster is back in view. Maybe use CheckSightOrRange instead, so that the shadow always draws within a certain distance of the player?

EDIT: OK, that was with 1.7a, but 1.8 has the same issue...

EDIT2: I've changed the check to
Code: Select allExpand view
      else if (caster && caster.CheckSightOrRange(512))
with no issues - you could probably reuse the cvShadowDistance CVar here instead of 512.


CheckSightOrRange call is quite expensive, though... think time shoots up a lot just by doing this.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Nash » Fri Dec 28, 2018 12:24 pm

Update December 29th 2018 (version 1.85)

- Declaring this mod to now require GZDoom version 3.7.0 to fully take advantage of JIT compiler
- Updated ZScript directive to 3.7.0
- Fixed shadows to update properly when partially blocked from your line of sight
- Even more optimizations, it runs even faster now!
- Don't draw shadows when your view is under them

m8f wrote:I wonder if there is any sane way to make shadows not be visible from below. Right now this is my only nitpick for this mod.


Let me know if what I added in v1.85 solves this issue.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby m8f » Fri Dec 28, 2018 10:05 pm

Wow, great!

Nash wrote:Let me know if what I added in v1.85 solves this issue.
Yes, it does.

One question: if early return is added after "bInvisible = true;", will it mess with clean-up? If not, it will probably improve performance even more.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Firebrand » Thu Jan 03, 2019 6:54 pm

This looks quite good :) and it doesn't add too much of a performance hit when being used on big maps, nice work!
User avatar
Firebrand
Korax' Heritage Team Member
 
Joined: 16 Jul 2003
Location: Mexico
Discord: Firebrand#4002

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Pompous Seed » Sun Jan 13, 2019 9:31 pm

Just noticed that all it takes for shadows to spawn is for an actor to have the +ISMONSTER flag. Some mods make use of this to achieve certain effects, so it might be worth adding other conditions that must be met before the shadows are spawned to avoid conflict with other mods. A flag like "+COUNTKILL" should do the trick.
Pompous Seed
 
Joined: 05 Aug 2016

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Nash » Sun Jan 13, 2019 9:48 pm

Pompous Seed wrote:Just noticed that all it takes for shadows to spawn is for an actor to have the +ISMONSTER flag. Some mods make use of this to achieve certain effects, so it might be worth adding other conditions that must be met before the shadows are spawned to avoid conflict with other mods. A flag like "+COUNTKILL" should do the trick.


Using a monster flag on something that's not meant to be a monster. Coming from this community; why am I not surprised?

This is the kind of stuff that makes Graf's blood boil... :mrgreen:
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Gez » Mon Jan 14, 2019 2:06 am

But then monsters that don't count for kills (and yeah, those exist and are legitimate, for example for passive wandering creatures, or invincible turrets, etc.) wouldn't get shadows. So it'd still not be compatible with mods.
Gez
 
 
 
Joined: 06 Jul 2007

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby Rip and Tear » Tue Jan 15, 2019 11:36 pm

I have found an issue: Hexen’s Stalkers still have shadows when they are underwater. I haven’t look into the code yet so I’m not sure, but I suspect that the +INVISIBLE flag not being accounted for.
User avatar
Rip and Tear
I <3 ZScript
 
Joined: 02 May 2017
Operating System: Mac OS X 10.8 or later
Graphics Processor: Intel (Modern GZDoom)

Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Postby NightFright » Wed Jan 16, 2019 10:17 am

Is it possible to have a version without the menu entries actually (maybe with values you can edit directly in the script files instead)? Somehow I preferred the "load and forget" approach from the 1.6 release. I like autoload stuff to be invisible.
User avatar
NightFright
Spotlight Team
 
Joined: 02 May 2008
Location: Germany

PreviousNext

Return to Graphic/Audio Patches

Who is online

Users browsing this forum: No registered users and 3 guests