-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Make Godot support classic grey-scale bump maps in Standard Shader . . #1625
Comments
There's the I don't think there's much point integrating this in core, but it can be implemented in a third-party plugin. Edit: See also my comment here: #2989 (comment) |
Bumpmaps would be far easier to modify in shaders tho. With normals it's not that easy because you have to apply them to your model as is. |
It should be possible to write a shader that converts an height map to a normal map: https://forum.unity.com/threads/solved-height-to-nomal-in-shader.713894/ See also https://stackoverflow.com/questions/26045527/normal-map-from-height-map. |
+1 on the request for a bump-to-normal shader node. Blender has one and I use it all the time in procedural materials |
This should be already feasible with a custom shader (on GLES3 at least), but for the reasons mentioned above, I don't think it makes sense to provide as a built-in visual shader node. |
A visual shader node that calculates the normal map seems like a good idea.
Performance Benchmarks ~ 2017 Laptop: GTX 1060 Mobile
And using vertex->fragment shader interpolation, Vertex Shader:
Fragment Shader:
I have no issue writing shader code, I have no interest in visual shaders. But, it would make sense to include a visual shader node that makes workflow between Blender shader nodes and Godot easy. The performance impact is fairly minimal, and it's required in any situation where you can't bake (Procedural/dynamic/periodically updated heightmaps). For context, enabling shadowmaps on my DirectionalLight3D with default settings gives me a render time of |
Describe the project you are working on:
A Tomb Raider type game . .
Describe the problem or limitation you are having in your project:
I can very easily make some really nice bump maps, by painting grey-scale tones, on a surface, or material, in Blender, and it makes some super-nice, near pro-normal map quality results, it's fast, and just works . . The problem is, Godot doesn't support this texture format, ie. it has to be converted into a normal map, which takes some times, to bake, in Blender, or external programs . . Could it be possible to add support for classic bump maps, in Godot, since the work-flow is really nice, one can paint almost any normal, at least many, with simple bump maps . . Or, there could be a simple converter, if one loads a bump map, into the normal map slot, there could be a button, ' convert bump to normal ', in Godot, it seems to be a fairly simple process, in gIMP, and it would make Godot nicer, at least for me, a beginner, or so . . <3
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add support for classic bump maps, in the shader, since for many beginners, they're a lot more intuitive to work with, since one can't directly paint a ' normal ' map, using texture painting, or with a simple grey-scale image, made in a paint program . . . It could either be with a new section, ie. we have normal, metallic, roughness, AO, add also bump, or, make a feature where after importing it, one converts to normal map, in import settings, or a setting under normal map, in material, PBRMaterial in Godot, that converts the bump maps, to a normal map, 1-to-1, or so . . This would be a nice feature, to have support for bump, as they make a lot of sense, to beginners, and even advanced users can make some quick normal maps, almost no work, in Blender, plug a bump map into principled shader, and paint it grey-scale, and booom, one has near professional normal maps, for many, many use cases, or so . .
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Find a way, to make Godot support ordinary grey-scale bump maps, since they've been in the industry, for so many years, not sure how, an elegant way, some-thing fast, robust . . .
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't know how to reprogram Godot, to do this stuff, atm . .
Is there a reason why this should be core and not an add-on in the asset library?:
Well, bump maps are so common, and have been in game making, for so long, it makes sense to me, to have them, ie. cheap normal maps, that work . . .
Thanks . . .
The text was updated successfully, but these errors were encountered: