milon wrote: ↑Wed Sep 21, 2022 4:37 pm
EDIT: Just for funsies, here's a modified version where the light source follows the mouse instead.
Was useful to really let the "example" shine.
pgimeno wrote: ↑Wed Sep 21, 2022 7:40 pm
Put simply, it's what can be done using slant and size alone, which is what the OP specified.
Yeah, it even exceeded expectations with the glare and everything else ReFreezed added
In fact, slant does not produce correct results even admitting that the object is 2D. Since the light is a point, each side of the object should have a different angle with respect to the light, resulting in a shape for the shadow with diverging sides, not parallel.
I was thinking of a way to explain it, and yeah, this is what I was imagining. The shadow should ...slant? I'll just let my pictures do the talking.
So any way to make it diverge like that?
Attachments
Straight(ish) shadow
straight.png (1.43 KiB) Viewed 3381 times
more natural slant
slant.png (1.55 KiB) Viewed 3381 times
The risk I took was calculated,
but man, am I bad at math.
With a point the shadow will get wider, not narrower tho.
If the lightsource is an area it may work to fill this area with source points and create a few dozen half transparent shadows instead one based on all these points.
That should look natural.
BrotSagtMist wrote: ↑Wed Sep 21, 2022 10:24 pm
With a point the shadow will get wider, not narrower tho.
Yeah, I guess. Though I think it depends sometimes (like maybe if perspective is considered or something )
If the lightsource is an area it may work to fill this area with source points and create a few dozen half transparent shadows instead one based on all these points.
That should look natural.
... I don't know how to do that
The risk I took was calculated,
but man, am I bad at math.
I spent some more time adding to the "example". It fixes the perspective issue pgimeno mentioned (using shaders, tears, and blood from an eldritch beast), and you can tweak the light's height and strength dynamically. I'd say the project has moved beyond simple at this point.
ReFreezed wrote: ↑Sat Sep 24, 2022 7:28 pm
I spent some more time adding to the "example". It fixes the perspective issue pgimeno mentioned (using shaders, tears, and blood from an eldritch beast), and you can tweak the light's height and strength dynamically. I'd say the project has moved beyond simple at this point.
It's amazing how people can achieve something like this easly, while i myself sometimes might struggle with something like "soemthing = something1" instead of "something = something1" and unironically waste 10 mins trying to understand where i made mistake
GVovkiv wrote: ↑Sat Sep 24, 2022 7:58 pm
It's amazing how people can achieve something like this easly, while i myself sometimes might struggle with something like "soemthing = something1" instead of "something = something1" and unironically waste 10 mins trying to understand where i made mistake
Heh, well you don't know the (many painful) hours it took me to fix the darn perspective issue.
(maybe the OP should remove the word "simple" from the title)
pgimeno wrote: ↑Sat Sep 24, 2022 7:52 pm
Awesome! Very well done.
But it's still not 3D... /s
Doesn't need to be 3D. just appear so. This version is better and still wonderful, but yes, it still gives of that paper-vibe a little...
but it gives it off wAAAY less than before. Especially since it can be tweaked. Nice job.
And...ehem...I...heheheh...Yes, this passes the scope of the topic and the thread is already solved but since we're just saying...the shadows are fine now and I think what makes it look 2D now is the... shading on the objects themselves (*runs away*)
GVovkiv wrote: ↑Sat Sep 24, 2022 7:58 pm struggle with something like "soemthing = something1" instead of "something = something1" and unironically waste 10 mins trying to understand where i made mistake
That's the worst
Oh, and
ReFreezed wrote: ↑Sat Sep 24, 2022 7:28 pm (using shaders, tears, and blood from an eldritch beast
Wondering how you got the eldritch blood (asking for a friend)...
The risk I took was calculated,
but man, am I bad at math.