-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Projected light texture #451
Comments
This is planned for 4.0. I'm not sure if it has been implemented in the Vulkan branch yet. But it is planned for sure. :) |
Note that the projector can only be represented in a single texture for SpotLight. In OmniLight, one would have to use a CubeMap resource instead. |
It could also be added to Directional lights, just put the texture on repeat and add a max range to draw. |
This is great, but it's also good for this proposal to exist so that there is a way to check when it gets added. |
@Two-Tone that's why I left it open. :) |
Note that for some cases, an orthographic projection is wanted, for example the shadow under the ball in a Neverball-like game is not something which should scale with distance. It is used as an indicator straight below the ball, helping the player realize where exactly they are, and thus cannot be made by just enabling DirectionalLight shadows when the sun is at an angle. It could be part of DirectionalLight, however. |
In a game like Neverball the shadow is a decal texture, I don't thing it has something to do with the light direction. |
I wonder if projected light textures can be used to "bake" shadows for real-time lights. This would effectively allow you to have lights that cast shadows for static objects, but with the same performance as lights without shadows (which can be very fast with Vulkan and clustered rendering). Baked shadows also have the potential to use much higher-quality filtering (with penumbra simulation), as you only need to compute the shadow texture once. These lights would also still be able to accurately light dynamic objects and cast shadows on them. Another upside is that you can change the light's color and energy in real-time (unlike baked lights). Many games like Trackmania² seem to be doing something like this for static lights, but I can't find much literature about it. If this is viable, we could have a way to bake a projector texture for OmniLights and SpotLights directly from the editor. It might be doable as a plugin, but it would likely be slower to bake. |
Describe the project you are working on:
General purpose
Describe the problem or limitation you are having in your project:
Total dependency on shadows to do any light details
Describe how this feature / enhancement will help you overcome this problem or limitation:
This feature will allow to fake a lot of shadow and shadow-tint effects.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
The first image it comes to mind is HL2 flashlight
But there are a lot of uses for this feature
Controls could be added to the Light property, something like this.
Describe implementation detail for your proposal (in code), if possible:
Not my field.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Don't think so, also it needs to be performant.
Is there a reason why this should be core and not an add-on in the asset library?:
Again, performance.
The text was updated successfully, but these errors were encountered: