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

How to affect specular power? #191

Open
unfa opened this issue Oct 12, 2020 · 6 comments
Open

How to affect specular power? #191

unfa opened this issue Oct 12, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@unfa
Copy link

unfa commented Oct 12, 2020

I haven't found a way to affect the specularity of my material - this is a very important aspect of PBR, that is necessary for many effects like deep holes in a surface or special materials.

For example - here's a little concrete wall material with regular holes in it:
image
Note that the hole doesn't look like a hole partly because it still has a specular reflection from it's bottom, which completely breaks the illusion.

Is there a way to fix this in Material Maker?

@unfa unfa added the enhancement New feature or request label Oct 12, 2020
@Calinou
Copy link
Contributor

Calinou commented Oct 12, 2020

In Godot, specular power is defined as a global parameter in SpatialMaterial and defaults to 0.5. We'd need a viewport settings menu to be able to configure it.

@RodZill4
Copy link
Owner

@unfa do you only need to be able to tune specularity for the material, or do you need to save a specular map for Blender?

It seems to be easy to convert between metalness to specular, and maybe it would be the way to go for some export targets?

Anyway, whatever change we decide, we need to know how it affects exports.

@Calinou
Copy link
Contributor

Calinou commented Oct 12, 2020

@RodZill4 Some oldschool game engines like Cube 2 (even in its Tesseract incarnation) still use specular maps, so there might be an argument for exporting specular maps. That said, the viewport won't be able to render it correctly unless it converts the generated specular map back to a roughness/metallic map on the fly.

@RodZill4
Copy link
Owner

RodZill4 commented Oct 12, 2020

I didn't intend to generate specular maps before exporting. And the viewport just renders material inputs, so it will never have access to that map.

But even if we wanted to provide an alternate Material node that supports specular PBR, wouldn't it be possible to write a shader to render it?

@unfa
Copy link
Author

unfa commented Oct 12, 2020

Hey! Strangely enough - when I made a black spot on the Albedo map the specular reflection has disappeared.
I am not sure if that's actually how PBR shaders should work?

In some implementation AO map affects the specularity, but I don't think it should really (if it were to simulate AO, and not... dirt?).

I am a bit confused, I think you understood my question in a way I didn't expect :D

@Calinou
Copy link
Contributor

Calinou commented Oct 12, 2020

Hey! Strangely enough - when I made a black spot on the Albedo map the specular reflection has disappeared.
I am not sure if that's actually how PBR shaders should work?

Maybe this is related to godotengine/godot#40753?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants