Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature?] realistic shadows from topdown viewed shapes #7

Open
InfiniteProductions opened this issue May 7, 2016 · 2 comments
Open

Comments

@InfiniteProductions
Copy link

I just wonder if you have already something to create "realistic" shadows from shapes which hide some part of themselves due to the view angle like trees, light pole, fence, gate or grid ?

For now and AFAIK, using Penumbra makes shadow looks resp. from a circle (if we consider trees displayed as a disk of leaves) and a full/opaque square. Not really what we would expect to see.

As I thought of this, I also come with a possible solution to this:
for each assets we want to manage under Penumbra, we would have to provide a kind of front-view (or horizontal view) of it, and Penumbra would use this texture as base to generate better shadow by shearing/stretching the texture like the base shadow does.
It would also allow to add vertical location of the light source (I don't think this is managed now, isn't it ?) as texture could be more and more stretched when light goes low and vice versa.

Example:
fr-shadow1

One point here is to know how much time it takes to shear a texture, the right way,
at run-time, probably not that's much.

@discosultan
Copy link
Owner

The library is currently strictly 2D only - there is no notion of light's height (or depth, depending on the perspective).

I have fiddled around with some 3D properties for features such as normal-mapped lighting, but for simplicity decided not to go down that route. Such texture shearing (shadow mapping) seems to fall into the same category. I don't have enough experience to know how other 2D lighting systems solve such problems. I would probably use a 3D system instead - even if dealing with a 2D game.

@InfiniteProductions
Copy link
Author

I see. For other 2D lighting system, there are not so much (one I know about is Krypton) and if it comes to migrate to a 3D system, it would be silly as it is very complicated (deferred rendering and shadow mapping stuff, HLSL limitations in instructions count, platforms compatibility, etc.)

I just thought shearing a given texture wouldn't be too hard but add a little more realism in quite common cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants