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

Add default light textures for the Light2D node #1717

Closed
ghost opened this issue Oct 24, 2020 · 4 comments · Fixed by goostengine/goost#60
Closed

Add default light textures for the Light2D node #1717

ghost opened this issue Oct 24, 2020 · 4 comments · Fixed by goostengine/goost#60

Comments

@ghost
Copy link

ghost commented Oct 24, 2020

Describe the project you are working on:
I'm working on a simple 2D puzzle platformer, and to create more atmosphere I've used a lot of lighting in my scene

Describe the problem or limitation you are having in your project:
I find that it's very hard to have enough control over the lights in the scene because I have to create the texture for the light it is scalable but up to a certain point, that means I can't have a scene light, which I want to be big enough, but also not too big because for that I could just use the world light

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I want that godot will have a default radial or rectangle gradient for the light with control over the color of the gradient aswell as the size, that should be unlimited, and also to have that gradient texture be more integrated to the light so it won't look like a separate texture added to the light but actually the light itself.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
It'll just be easier to light scenes that way, I've had to create several different textures each for every lighting condition, and in this example, the light texture I'm using is using the max size, and the reason I made the texture small is because I wanted to use it in tiny areas, now I have to create 2 textures, one big texture and one small texture in addition to creating different varients of the texture for each area (some I want to make radial)
Godot_v3 2 3-stable_win64_2020-10-24_15-48-17

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't think it's really possible unless it'll be a material script, but I don't think it's going to work

Is there a reason why this should be core and not an add-on in the asset library?:
I feel like it would help newbies get into lighting, and also it'll be much faster in terms of the workflow to add source lights that way.

@arkology
Copy link

Can be closed as related to #1677

@Calinou
Copy link
Member

Calinou commented Oct 24, 2020

Duplicate of #1677 (implemented by godotengine/godot#42855).

@Xrayez
Copy link
Contributor

Xrayez commented Oct 25, 2020

Regarding the proposal, GradientTexture2D could be auto-instantiated by default for Light2D, but since godotengine/godot#42855 isn't yet merged, the proposal is not actual for now. 😛

Internally, auto-instantiation is handled by PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT in master (see also godotengine/godot#43015). The problem is that it may not work recursively, talking about instantiation of Light2DGradientTexture2D (texture) → Gradient (gradient).

Another problem is that, by default, GradientTexture is linear, it means that auto-instantiation might need to be hardcoded to override this to radial gradient texture, or another general-purpose mechanism would have to be created, or make the radial type the default one.

@Xrayez
Copy link
Contributor

Xrayez commented Apr 5, 2021

See goostengine/goost#60 which implements this proposal (can also be done via script extending GradientTexture2D as proposed in godotengine/godot#42855).

@Calinou Calinou changed the title Default light textures Add default light textures Apr 5, 2021
@Calinou Calinou changed the title Add default light textures Add default light textures for the Light2D node Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants