• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Alpha Soft Shadows - Automatic (WIP Marketplace Asset)

HighlandCoo

Member
Thats awesome, I did something similar for a top down City where I drew a shadow onto a surface for each building and moved the shadow direction depending on the time of day. It was good looking but a framerate killer!

Id love to know how you did the shape-changing shadow though!? Buildings are easy, but I cant figure out how your done the above. :)
 

Hyomoto

Member
Not being a shared wizard myself, this is something I could find useful. Can it interact with the enviornment?
 

matharoo

manualman
GameMaker Dev.
Well, you are using a 2.5D perspective, so the walls at minimum and other actors if desired.
Oh, so you're talking about the shadows bending according to the walls & objects? Currently there is no support for that.
 

Hyomoto

Member
Just wanted to know, I have a project on the backburner I could use this for. Second question, how are the shadows drawn? Does it draw them to a different layer/surface? You have a depth setting, so I'm guessing an object is created to draw the shadows at that depth/layer?
 

matharoo

manualman
GameMaker Dev.
Just wanted to know, I have a project on the backburner I could use this for. Second question, how are the shadows drawn? Does it draw them to a different layer/surface? You have a depth setting, so I'm guessing an object is created to draw the shadows at that depth/layer?
The shadow manager object is placed at the given depth/layer, and that object draws the shadow surface.
 

CMAllen

Member
How does it do with more horizontal sprites? I've done something similar before, but it just didn't quite work properly for horizontal sprites.
 

Nux

GameMaker Staff
GameMaker Dev.
Does it support multiple views, and is it possible for the sources to be within a finite distance of the 'occluders' i.e. having shadows face different directions instead of all being parallel to one another?

Other than that, this is pretty nice!
 

matharoo

manualman
GameMaker Dev.
Thanks all for the kind words!

How does it do with more horizontal sprites? I've done something similar before, but it just didn't quite work properly for horizontal sprites.
This is for a top down perspective :) It depends on what kind of perspective you are talking about. If the game is top down, then it could work.

having shadows face different directions instead of all being parallel to one another?
Yes, if you read the documentation you'll see that there are two lighting modes: the first one uses point lights (as many as you want) and the second one uses a single direction (for simulating the sun).

Does it support multiple views
It is just a surface drawn inside the room, so multiple views/cameras should work fine.
 
G

Guest User

Guest
the further the light gets the more it looks like they're wearing a really long tophat that just keeps getting taller and taller...
anyway i recall seeing something like this for platformers, its a very intriguing technique. but that this one changes with the light position instead of just being from a static overhead lightsource is pretty cool :cool:
 

RangerX

Member
Does this work if I have the automatic drawing of the application surface off and that I draw it myself in a post draw event?
Many people making assets and shader aren't testing this.
 
  • Like
Reactions: Nux

Geoff Jones

Member
Not sure if it is something you can incorporate into this system, but generally, shadows will be sharper at the base of the subject and get more blurry as it goes out
 

matharoo

manualman
GameMaker Dev.
Does this work if I have the automatic drawing of the application surface off and that I draw it myself in a post draw event?
Many people making assets and shader aren't testing this.
Yes, it should work. It is drawn in the room.
Not sure if it is something you can incorporate into this system, but generally, shadows will be sharper at the base of the subject and get more blurry as it goes out
Yes, that is how I have made it.
 

Geoff Jones

Member
That's not what I mean.
upload_2018-4-8_17-39-46.png

Due to the way photons scatter , shadows at the base of the object should be harder than shadows at the tip. The amount of difference depends on the relative size and distance of the light.
See hwo the shadow is softer at the tip of the shadow in this image, and harder at the base?
 
Last edited:

matharoo

manualman
GameMaker Dev.
That's not what I mean.
View attachment 17561

Due to the way photons scatter , shadows at the base of the object should be harder than shadows at the tip. The amount of difference depends on the relative size and distance of the light.
See hwo the shadow is softer at the tip of the shadow in this image, and harder at the base?
Well, that effect is already in place for object shadows, but not cube shadows. I think the effect is not high enough in the GIFs, that's why you can't detect it. I will try to implement it in the cube shadows as well.
 
Top