Godot: Radial gradients

Created on 23 Apr 2018  路  4Comments  路  Source: godotengine/godot

Godot version:
3.0.2

OS/device including version:
Irrelevant.

Issue description:
Currently there seems to be no way to programmatically create radial gradients. Having to create them in an external tool and import them as textures is not only inconvenient, but also makes it impossible to effectively manipulate them at runtime.

archived feature proposal core

Most helpful comment

With a bit of work, it's possible to make them programmatically by generating a triangle strip polygon with appropriate vertex colors. Or easier, a shader with a GradientTexture as parameter (or a few colors) and a bit of UV math magic:

image

RadialGradient.zip

All 4 comments

With a bit of work, it's possible to make them programmatically by generating a triangle strip polygon with appropriate vertex colors. Or easier, a shader with a GradientTexture as parameter (or a few colors) and a bit of UV math magic:

image

RadialGradient.zip

This would still be really useful. Radial gradients would be perfect for 2D lights.

It is not very convenient to open up an image editor just to edit a gradient. Every image editor handles them differently, too. It would be easier if these could be edited in the editor

For all those looking for a temporary solution:

https://github.com/Maujoe/godot-custom-gradient-texture
I have created a custom resource script as temporary workaround to create different gradient types it's also in the asset library so you can access it inside godot.

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings