[0.2] GShadow: Real-time shadows for G/ZDoom

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Post Reply
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

[0.2] GShadow: Real-time shadows for G/ZDoom

Post by sonic_HD87 »

GShadow: Dynamic blob shadows for G/ZDoom!

Image

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.

The thing is that right now is somewhat primitive and needs some revision. If you want to contribute for it's development, feel free to do it and i will update the post. The code is documented so you can understand how to make it work, but remember that you need some .wad/pk3 edition tool like Slade if you want to do proper testing.
GShadowB02.pk3
GShadow BETA 0.2
(7.25 KiB) Downloaded 479 times
NOTE: To test it on-the-go on default Doom 1/2 maps, just type on the console:
summon shadowbrain. And if you want to see your own shadow: summon shadowplayer


Here's a video explaining how it works:



Here some screenshots:
Spoiler: Screenshots
Changelog:
Spoiler: Changelog
Last edited by sonic_HD87 on Tue Jan 31, 2017 8:07 pm, edited 3 times in total.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: GShadow: Real-time shadows for ZDoom and GZDoom

Post by Rachael »

The unfortunate side effect of cube clipping boxes in Doom. XD

This looks pretty neat, although if passing through a sprite I would probably draw an angled rotation as its shadow. Of course, that may require modifications to the source code, itself. >_>
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: GShadow: Real-time shadows for ZDoom and GZDoom

Post by sonic_HD87 »

Eruanna wrote:The unfortunate side effect of cube clipping boxes in Doom. XD

This looks pretty neat, although if passing through a sprite I would probably draw an angled rotation as its shadow. Of course, that may require modifications to the source code, itself. >_>
Well, in that sense, the shadow actor is a flat voxel. So i could make a shadow with the form of a fish if i want to. :lol:

Also, i ported the code to Github so everyone can contribute without need of making separate .pk3 files.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: GShadow: Real-time shadows for ZDoom and GZDoom

Post by Trusty McLegit »

This looks awesome! I tried it out though, but all I get after typing summon shadowbrain in the console is the numbers 7000 7001 7002 7003 7004 7005 7006 and 7007 printed out and a shotgun guy sprite for a second. What am I doing wrong? I'm using gzdoom 2.3.2 btw
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: GShadow: Real-time shadows for ZDoom and GZDoom

Post by sonic_HD87 »

Trusty McLegit wrote:This looks awesome! I tried it out though, but all I get after typing summon shadowbrain in the console is the numbers 7000 7001 7002 7003 7004 7005 7006 and 7007 printed out and a shotgun guy sprite for a second. What am I doing wrong? I'm using gzdoom 2.3.2 btw
Means that the ShadowBrain is working as expected. I made that on purpose so i can tell if it's working because most of my testing before that was just a guess game.

To visually see the shadows, type this before spawning the brain: summon shadowplayer and then go near a lightsource like a redtorch or column. Alternatively you can wait for enemies to get close to them.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: [Now on Github] GShadow: Real-time shadows for G/ZDoom.

Post by Trusty McLegit »

Cool, thanks!
User avatar
PandaDoomer
Posts: 107
Joined: Sun Apr 12, 2015 9:05 pm
Location: USA

Re: [Now on Github] GShadow: Real-time shadows for G/ZDoom.

Post by PandaDoomer »

I'm having the same problem McLegit was having, and I'm still having it. It works just fine in ZDoom, but not GZDoom.

Help!
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: [Now on Github] GShadow: Real-time shadows for G/ZDoom.

Post by sonic_HD87 »

PandaDoomer wrote:I'm having the same problem McLegit was having, and I'm still having it. It works just fine in ZDoom, but not GZDoom.

Help!
It seems that an odd behavior on GZDoom is not showing the shadows on sectors where height <= 0. However, from height = 1 to upwards it works fine.

And more weird is that that behavior also applies for other stuff i have (but only for voxels, not sprites). I'm trying to fix that.
User avatar
PandaDoomer
Posts: 107
Joined: Sun Apr 12, 2015 9:05 pm
Location: USA

Re: [Now on Github] GShadow: Real-time shadows for G/ZDoom.

Post by PandaDoomer »

Thanks for the quick response!

I'll try it out.

EDIT:

It didn't work.
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: [Now on Github] GShadow: Real-time shadows for G/ZDoom.

Post by sonic_HD87 »

PandaDoomer wrote:Thanks for the quick response!

I'll try it out.

EDIT:

It didn't work.
I didn't upload a fix yet.
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: [0.2] GShadow: Real-time shadows for G/ZDoom

Post by sonic_HD87 »

New update with some neat changes.

And well, after some testing, the glitch i've tried to fix ealier was indeed a bug on GZDoom itself when rendering voxels:

Image

I already reported that, so i can safely say that the glitch was on GZDoom 2.3.2 and not on this mod.
User avatar
PandaDoomer
Posts: 107
Joined: Sun Apr 12, 2015 9:05 pm
Location: USA

Re: [0.2] GShadow: Real-time shadows for G/ZDoom

Post by PandaDoomer »

sonic_HD87 wrote:New update with some neat changes.

And well, after some testing, the glitch i've tried to fix ealier was indeed a bug on GZDoom itself when rendering voxels:

Image

I already reported that, so i can safely say that the glitch was on GZDoom 2.3.2 and not on this mod.
Even with r_drawvoxels 0, the shadows still don't show up.

Does this also have to do with GZDOOM itself being weird? Just guess we (I?) Have to deal with it for now.
User avatar
sonic_HD87
Posts: 287
Joined: Sat Mar 23, 2013 4:32 pm
Location: Venezuela

Re: [0.2] GShadow: Real-time shadows for G/ZDoom

Post by sonic_HD87 »

PandaDoomer wrote:Even with r_drawvoxels 0, the shadows still don't show up.

Does this also have to do with GZDOOM itself being weird? Just guess we (I?) Have to deal with it for now.
Well, you can try this steps to test it:

1.- Check if you're not using a DRD build, use the official build instead (2.3.2 for GZDoom; 2.8.1 for ZDoom)
2.- Load DOOM.wad and go to the map E3M5.
3.- Type this on the console: "summon shadowplayer"
4.- Then type this on the console: "summon shadowbrain"

You should see your own shadow when you're close to the torches. If still persist, send me a PM to avoid bumping this post.
Post Reply

Return to “Resources”