#Intraveinous 2 shadows is exactly what I want for my topDown 2D game. How do I acheive this in Godot
1 messages · Page 1 of 1 (latest)
You want occluders
The occluders would give you the dark cones. The shadow cast on the ground would be different... i'm not sure how you would do that
Might also be occluders, i guess, if they can simulate being "below" the light source
Thx but I know about occluders, as far as I know they cast infinite shadows in 2D. My question was about the finite shadows cast on the ground whose length, color and shape vary depending on the distance from the light source
Okay, it's hard to tell sometimes where a person is coming from, how much they already know
I think this might be easier to do in 3D and then pixelate the result
If you really wanted to do it in 2D, it would probably require a shader that did a bunch of 3D projections to stretch out the shadows and make them look 3Dish
The more i look at those images, the more i am seeing 3D effects... or at least, they put a lot of work into making a 2D effect look 3D
For example, this shelf appears to be lower than the shelves around it. It is receiving shadows from them, but it is not completely shadowed (as it would be if it were on the floor). I think that indicates there are height values encoded somehow
I think that means you can't just take the sprite, make it black and blurred, and stretch it out behind the original sprite
Maybe you could achieve this with a mix of 2D and 3D. Set everything up in a 3D scene with basic models for all of your objects. Then put the sprites over the top of your models
Then you would get 3D lights and shadows, but you could keep the pixel art (and would only have to model very basic shapes)
Yes I do believe there is a height value, but I also believe it's actually 2D and not 3D.
For example the shadow in this picture is not realistic enough to be actual 3D. In 3D, the shadow of the arm would start further away from the actual sprite
That's true... maybe the static objects had baked lighting so that they would appear more 3D
My best bet yet would be a shader that takes a height value from each sprite and each light, but I know very little about shader
Yeah, you could achieve something like this with shaders, but it would be a challenge. Fragment shaders (which i think is what you would need here) run once per frame for every pixel. When you're editing a pixel, you can get information from other places, but you can only change the value of that single pixel
That means that a pixel can't cast shadows onto other pixels, since that would require changing the value of another pixel. Rather, each pixel would need to check the height values around it to see if it should be in shadow. That could end up getting really expensive
(I think it would basically be like ray tracing in 2D)