-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve material preview in the inspector #11259
Comments
grid floor could use a procedural texture #5294 🙂 |
For generated images, we could either use a ReflectionProbe with the Always update mode (so it renders in a single frame), or use a PanoramaSkyMaterial that provides the reflection (even if we still have a grid floor below the object). The latter would require increasing the editor binary size somewhat to include the sky texture1, but it would speed up preview rendering by not needing to perform another render of the scene for the ReflectionProbe. For the real-time preview, we can keep the ReflectionProbe at its default Once update mode or use the prerendered sky as mentioned above. Footnotes
|
I'm a fan of using a cubemap for this, this would allow not just having a gradient, but including clouds/environment in the cubemap which would add more variation and details in reflections. (Similar to Unreals preview environments) The slightly overexposed look here may not seem ideal initially, but the value of this material was set to 100, which is extremely bright and doesn't exist in the real world, so this preview setup actually communicates that brightness quite well. Which environment texture is being referenced in the preview could be exposed as a project setting, so the user could choose a custom one which would align better with the visual direction/lighting of their project. Are previews in other places, such as the 3D importer, visual shader graph in 4.4, MeshInstances, ..., rendered with the same logic as the material preview? I think all 3D previews would benefit from this setup, so if this preview logic is already something that's unified, I don't think this is a change that should be separated from those other places. Footnotes |
It would be an editor setting so the environment can't depend on project-specific files. We should be able to set a path to an HDRI outside the project and be applied on every instance of the editor, for example. |
I would say it has to be a project setting, so that all team members see the preview the same way. Different projects may also warrant a different look for their previews (e.g. a project taking place exclusively at nighttime warrants darker lighting for its previews). The Default Environment project setting is already an example of a resource that is defined in the project settings and can reference other files. |
Would be nice as well to be able to toggle through multiple preview meshes (sphere, cube, plane, etc) like Unity and Blender allow you to do. |
Currently this is already possible (Though there's only a sphere and cube), however there's a lot of value in providing more options since certain shaders can require different preview needs than what a cube or sphere can offer. Particularly a more complex mesh with a variety of sharp and soft edges (Which could be something fun like a 3D version of the Godot logo, or something the the logo embedded into it) would be useful. There would also be value in allowing custom meshes to be used. |
There is a quad now too :) godotengine/godot#97030
I thought the exact same thing, after a quad mesh preview was added I thought to myself that this is the only major thing missing (after four preview meshes, we should probably add a custom mesh preview instead of adding more and more specific meshes). |
Metallic materials are impossible to preview currently and I started using them a lot so I did a pass at implementing this proposal on my custom build. BeforeAfterAn I'm not sure what to do about the floor. |
As long as the floors backface gets culled, this shouldn't be a problem. I imagine expected behavior of moving the view would be orbiting your camera around the object, not just spinning the object. This allows you to see how the object interacts with different parts of the HDRI reflecting onto it. |
Describe the project you are working on
Art UX improvements
Describe the problem or limitation you are having in your project
The material preview window is not representative of what materials look like in the average scene.
The lack of environment/reflections makes materials hard to read, and makes it so some materials, particularly metals and materials involving transparency, are not adequately represented. This essentially makes it so users are unable to rely on this preview, and are forced to make their own preview scene in order to get a representative preview, which entirely negates the purpose of the preview window.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Visualize materials in a basic scene with a cubemap and a grid floor to accentuate reflective details.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
Material preview is core.
The text was updated successfully, but these errors were encountered: