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

The metal material does not self-shadowing when using roughness texture. #42

Closed
serkkz opened this issue May 20, 2022 · 2 comments
Closed

Comments

@serkkz
Copy link

serkkz commented May 20, 2022

I have such material.

metal = Material("brick")
metal.set_metallic(1)
metal.set_roughness(0.45)

This gives the following:
1

It can be seen that the sphere has artifacts in self-shadowing. I also found out that the problem is related to the roughness map, maybe I'm using it incorrectly.

roughness_tex = loader.loadTexture("tex/metal/roughness.png")
roughness_tex.set_magfilter(SamplerState.FT_linear_mipmap_linear)
roughness_tex.set_minfilter(SamplerState.FT_linear_mipmap_linear)
roughness_tex.set_wrap_u(Texture.WM_repeat)
roughness_tex.set_wrap_v(Texture.WM_repeat)

metal_stage = TextureStage('metal_stage')
metal_stage.set_mode(TextureStage.M_selector)

2

It looks like this without ambient lighting. Which seems normal to me.

@serkkz
Copy link
Author

serkkz commented May 21, 2022

It seems that I was mistaken in the fact that the metal flag affects this problem.

This is just a duplicate of this problem. 19
My problem is applying a roughness texture.

@serkkz serkkz changed the title The metal material does not self-shadowing when using ambient lighting. The metal material does not self-shadowing when using roughness texture. May 21, 2022
@Moguri
Copy link
Owner

Moguri commented May 19, 2023

Closing as duplicate of #19

@Moguri Moguri closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants