godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.44k stars 20.25k forks source link

Procedural Texture Proxy #23118

Closed Windfisch closed 4 years ago

Windfisch commented 5 years ago

I think an el-cheapo way of generating normal maps or depth maps would be a good addition, because it lowers the hurdle for game development newbies. Easy textures like cobblestone, asphalt, brick walls (which can easily be found on the internet usually as image texture, but not as depth or normal texture) can be improved a lot by adding a depth map (or specular texture) that is based on the original texture. Usually a combination of difference-of-gaussian, desaturating, gaussian blur and/or a simple value mapping (log, exp, 1/x, ...) produces great results.

While this can be done with gimp, it would greatly simplify the workflow (also when changing textures afterwards) if Godot could do that on its own.

To generalize even further, I propose the following additions:

  1. a Procedural Texture Proxy that takes a Texture as input, and can apply operations like the above (or arbitrary shaders, actually.)
  2. A user-friendly assistant for generating a depth map using that feature. E.g. the user clicks "auto depth map", causing the depth map texture being assigned automatically to a newly generated ProceduralTextureProxy, and causing its GUI to be opened. In that GUI, they can tinker with 4-5 sliders setting the parameters of the predefined stack of DoG + blur + valuemapping. This can lead to visually pleasing results in under one minute.

What do you think, would this be a useful feature (and a good way to implement it)?

clayjohn commented 4 years ago

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!

Note: This is partly implemented in NoiseTexture.