SpriteShadow (Duke3D Shadows) v1.9

Post your example zscripts/ACS scripts/etc here.

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

Postby Tekish » Wed Dec 19, 2018 10: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 12:39 pm

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
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

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

Postby AFADoomer » Wed Dec 19, 2018 1: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 2: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 2: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 2: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
Maps of Chaos/RDND/DVV Overseer
 
Joined: 13 Mar 2009
Location: North Babylon, NY
Discord: Armaetus#8512
Github ID: GlaiceOldSchoolRTS
Operating System: Windows Vista/7 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

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

Postby m8f » Thu Dec 27, 2018 11: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
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

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

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

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
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

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

Postby Nash » Fri Dec 28, 2018 1: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
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

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

Postby m8f » Fri Dec 28, 2018 11: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
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

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

Postby Firebrand » Thu Jan 03, 2019 7: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 10: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 10: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
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

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

Postby Gez » Mon Jan 14, 2019 3: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 » Wed Jan 16, 2019 12:36 am

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
King of creative usernames
 
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 11: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
 
Joined: 02 May 2008
Location: Germany

PreviousNext

Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests