{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/18880","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/18880/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/18880/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/18880/events","html_url":"https://github.com/godotengine/godot/issues/18880","id":323065933,"number":18880,"title":"Mesh looks too glossy when using a roughness texture","user":{"login":"mysticfall","id":2367032,"avatar_url":"https://avatars0.githubusercontent.com/u/2367032?v=4","gravatar_id":"","url":"https://api.github.com/users/mysticfall","html_url":"https://github.com/mysticfall","followers_url":"https://api.github.com/users/mysticfall/followers","following_url":"https://api.github.com/users/mysticfall/following{/other_user}","gists_url":"https://api.github.com/users/mysticfall/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticfall/subscriptions","organizations_url":"https://api.github.com/users/mysticfall/orgs","repos_url":"https://api.github.com/users/mysticfall/repos","events_url":"https://api.github.com/users/mysticfall/events{/privacy}","received_events_url":"https://api.github.com/users/mysticfall/received_events","type":"User","site_admin":false},"labels":[{"id":73330064,"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222","default":true},{"id":279098111,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:rendering","name":"topic:rendering","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T04:52:27Z","updated_at":"2018-05-23T14:27:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Godot version:**\r\n`master` / 224d5371ff65a\r\n\r\n**OS/device including version:**\r\n_Manjaro Linux 17.1_\r\n\r\n**Issue description:**\r\nWhen I created a roughness texture using Substance Painter and used it in Godot, it makes the model look much too glossy compared to how it looked originally.\r\n\r\nI don't expect it to look exactly the same between Substance and Godot, however, it feels like the texture must almost look all white to make it not to look too glossy.\r\n\r\nI've attached a few screenshots for comparison:\r\n![substance](https://user-images.githubusercontent.com/2367032/40037066-25188c44-5846-11e8-934b-3e7585e65314.png)\r\nThis is how my character looks like in Substance Painter. I haven't started to paint rough/smooth areas, so the texture looks quite uniform like this:\r\n![roughness](https://user-images.githubusercontent.com/2367032/40037117-733543b8-5846-11e8-9231-7362ac9b7890.png)\r\nHowever, when I apply it to a material in Godot, it looks glossy even when the roughness is set to the maximum value:\r\n![glossiness](https://user-images.githubusercontent.com/2367032/40037160-a59c1f66-5846-11e8-892a-36a4a0307f08.png)\r\n\r\nI also noticed that the shadow almost highlights glossy area as shown below. I'm not too sure if it's the same problem, so please let me know if I should separate it as another issue.\r\n\r\n![glossiness2](https://user-images.githubusercontent.com/2367032/40037235-31854b7e-5847-11e8-8260-bc3ff47e965c.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/391367715","html_url":"https://github.com/godotengine/godot/issues/18880#issuecomment-391367715","issue_url":"https://api.github.com/repos/godotengine/godot/issues/18880","id":391367715,"user":{"login":"jaran","id":55374,"avatar_url":"https://avatars0.githubusercontent.com/u/55374?v=4","gravatar_id":"","url":"https://api.github.com/users/jaran","html_url":"https://github.com/jaran","followers_url":"https://api.github.com/users/jaran/followers","following_url":"https://api.github.com/users/jaran/following{/other_user}","gists_url":"https://api.github.com/users/jaran/gists{/gist_id}","starred_url":"https://api.github.com/users/jaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaran/subscriptions","organizations_url":"https://api.github.com/users/jaran/orgs","repos_url":"https://api.github.com/users/jaran/repos","events_url":"https://api.github.com/users/jaran/events{/privacy}","received_events_url":"https://api.github.com/users/jaran/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T14:27:47Z","updated_at":"2018-05-23T14:27:47Z","author_association":"NONE","body":"karroffel pointed out in discord that godot squares the roughness in it's final calculation.  When we convert the material to a shader and then modify the roughness to equal the sqrt of the old value we get results much closer to substance painter.\r\n\r\nOld roughness calculation in shader\r\n`ROUGHNESS = roughness_tex * roughness;`\r\nModified to\r\n`ROUGHNESS = sqrt(roughness_tex * roughness);`\r\n\r\n\r\n![preview_sphere_substance](https://user-images.githubusercontent.com/55374/40430341-ccf5fc3a-5e59-11e8-91ad-1dabeafc78f3.PNG)\r\nscreenshot from substance painter using default preview sphere project.\r\n\r\n\r\n\r\n![preview_sphere_substance_2](https://user-images.githubusercontent.com/55374/40430342-cd104b76-5e59-11e8-9dcc-4caaeb678ac8.PNG)\r\nscreenshot in godot without the sqrt fix.  Very reflective\r\n\r\n\r\n![preview_sphere_sqrt](https://user-images.githubusercontent.com/55374/40430340-cc7db446-5e59-11e8-8096-dc736d6efe18.PNG)\r\nscreenshot with the sqrt fix now looks very close to substance painter"}}
{"actor":{"display_login":"jaran"}}