SpriteShadow v2.0 (now built into GZDoom 4.6.0!)
Forum rules
The Projects forums are only for 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.
The Projects forums are only for 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.
-
- Posts: 154
- Joined: Tue Jun 28, 2016 6:31 pm
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl
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!
- 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!
-
- Posts: 1337
- Joined: Tue Jul 15, 2003 4:18 pm
Re: SpriteShadow: Duke3D-like Shadows v1.7a [performance upd
This line...
...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 with no issues - you could probably reuse the cvShadowDistance CVar here instead of 512.
Code: Select all
else if (caster.CheckIfSeen())
EDIT: OK, that was with 1.7a, but 1.8 has the same issue...
EDIT2: I've changed the check to
Code: Select all
else if (caster && caster.CheckSightOrRange(512))
Last edited by AFADoomer on Wed Dec 19, 2018 1:18 pm, edited 1 time in total.
-
- Posts: 154
- Joined: Tue Jun 28, 2016 6:31 pm
Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl
Yes, I saw this happen in 1.8 as well.
-
- Posts: 1256
- Joined: Fri Mar 13, 2009 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10 Home
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Location: New York State
Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl
Oh nice, perhaps higher monster count monsters combined with Droplets would improve performance now Would actually be useful to me, especially when recording.
-
-
- Posts: 1446
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
Re: SpriteShadow (Duke3D Shadows) v1.8 [slaughtermap friendl
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.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SpriteShadow: Duke3D-like Shadows v1.7a [performance upd
CheckSightOrRange call is quite expensive, though... think time shoots up a lot just by doing this.AFADoomer wrote:This line......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?Code: Select all
else if (caster.CheckIfSeen())
EDIT: OK, that was with 1.7a, but 1.8 has the same issue...
EDIT2: I've changed the check towith no issues - you could probably reuse the cvShadowDistance CVar here instead of 512.Code: Select all
else if (caster && caster.CheckSightOrRange(512))
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
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
- 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
Let me know if what I added in v1.85 solves this issue.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.
-
-
- Posts: 1446
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
Wow, great!
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.
Yes, it does.Nash wrote:Let me know if what I added in v1.85 solves this issue.
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.
-
- Posts: 58
- Joined: Wed Jul 16, 2003 10:54 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
- Location: Mexico
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
This looks quite good and it doesn't add too much of a performance hit when being used on big maps, nice work!
-
- Posts: 212
- Joined: Fri Aug 05, 2016 8:41 am
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
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.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
Using a monster flag on something that's not meant to be a monster. Coming from this community; why am I not surprised?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.
This is the kind of stuff that makes Graf's blood boil...
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
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.
-
- Posts: 186
- Joined: Tue May 02, 2017 3:54 pm
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
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.
-
- Spotlight Team
- Posts: 1375
- Joined: Fri May 02, 2008 12:29 pm
- Location: Germany
Re: SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]
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.