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

Option to offset spotlight cone start #9157

Closed
jitspoe opened this issue Feb 23, 2024 · 1 comment
Closed

Option to offset spotlight cone start #9157

jitspoe opened this issue Feb 23, 2024 · 1 comment

Comments

@jitspoe
Copy link

jitspoe commented Feb 23, 2024

Describe the project you are working on

Quake-like retro fps.

Describe the problem or limitation you are having in your project

Some spotlights are kind of large and I want the cone to start wider than a single point. For example, here's a top-down view of a light partially submerged in water:
image
Note that the cone starts in front of the light, but looks a little weird not matching up with the texture. It should be wider at the start.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

A simple parameter on the SpotLight3D to set the offset so that the light could start sooner, but with a near clipping plane so the world geometry does not cast shadows from INSIDE the light fixture, so it would look like this:
image

(Note: I was able to move the lights back in this case, but sometimes model geometry will cast shadows, preventing that solution).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

image
Here there would just be a new parameter like "Start Offset", in meters.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, this would require modifying the shadow rendering.

Is there a reason why this should be core and not an add-on in the asset library?

I don't think addons can modify this.

@Calinou
Copy link
Member

Calinou commented Feb 23, 2024

Thanks for the proposal! Consolidating in #2520.

(Note: I was able to move the lights back in this case, but sometimes model geometry will cast shadows, preventing that solution).

With godotengine/godot#85338, you should have more flexibility for toggling shadows on specific geometry on a per-light basis.

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