Simple Blob Shadows?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
AtomicLugia
Posts: 36
Joined: Thu Oct 06, 2016 7:58 am
Location: Germany

Simple Blob Shadows?

Post by AtomicLugia »

I already heard about the GShadow thing, but I just want generic non-dynamic blob shadows beneath players and monsters with 3D-floor-support. Is this possible via DECORATE (and ACS if neccessary)?

Here's an example (non-DOOM):
Image

Thanks in advance!
User avatar
Rachael
Posts: 13555
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Simple Blob Shadows?

Post by Rachael »

The simplest way to do this is via GLDEFS. (Note: I did not invent this technique, I saw it used in Blade of Agony, but this is a recreation without looking at BOA's source files so their's is obviously a bit different)

The following goes into GLDEFS:

Code: Select all

pointlight BLOBSHADOW
{
	subtractive 1
	color 0.5 0.5 0.5
	size 30
	offset 0 2 0
	dontlightself 1
}

object MBFHelperDog
{
	frame DOGS { light BLOBSHADOW }
}

object Zombieman
{
	frame POSS { light BLOBSHADOW }
}
Change the "Zombieman" to your class name and change "POSS" to whatever your class's sprite names are. You can do multiples, obviously, as shown with "MBFHelperDog".

To see it in action, type "summonfriend MBFHelperDog" and "summon Zombieman" in the console with it loaded, or use whatever your own class names are.
User avatar
AtomicLugia
Posts: 36
Joined: Thu Oct 06, 2016 7:58 am
Location: Germany

Re: Simple Blob Shadows?

Post by AtomicLugia »

Not a bad idea, but I want the shadow to stay at the floor/3D floor beneath the actor, for example when it's a flying actor. And when another actor stands beneath the said actor, would be very dark. I mean simple blob shadows like in old 3D platformers.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Simple Blob Shadows?

Post by Marisa the Magician »

What you want is actually doable in ZScript, if that's an option. Just using flatsprites and a function to update their position and alignment to slope every tic. Though at the moment, with how flat sprites handle depth, the shadow would draw over the actor that casts it.
User avatar
AtomicLugia
Posts: 36
Joined: Thu Oct 06, 2016 7:58 am
Location: Germany

Re: Simple Blob Shadows?

Post by AtomicLugia »

Well, I'm a complete noob to ZScript but I know that this is like DECORATE on steroids. Good to hear that this is doable.
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Simple Blob Shadows?

Post by Pixel Eater »

Nash invented something cool that's similar: SpriteShadow. The shadow isn't a blob but it does stick to the floor. Could be a good starting point for what you want.
Post Reply

Return to “Scripting”