LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.16k stars 146 forks source link

Request: Make backface of glossy(coating) material behave like the front face [$100] #301

Closed Theverat closed 3 years ago

Theverat commented 4 years ago

The current behaviour of glossy and glossycoating is to behave like matte on the backface. I can't think of a good reason for this, and it is very confusing for users, so I would like to request to rework these materials to show their coating on both front and back faces.

(intended for v2.4)

--- There is a **[$100 open bounty](https://www.bountysource.com/issues/88773761-request-make-backface-of-glossy-coating-material-behave-like-the-front-face?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github).
JonSargent commented 3 years ago

I'd like to second this request. At present LuxCore appears to suppress backface specular reflections for all material types. Is this intentional? Given that glossytranslucent exposes a ks_bf parameter, I'm guessing not?

In any case, it would be ideal if front/backface equivalence were the default -- or at least an option -- for glossy2, glass, etc. I come from a land where volume-less surfaces are common, so granting them full participation in light transport would be great. :)

backface_specular

Dade916 commented 3 years ago

Yes, it was intentional: it was the way the original Glossy2 material was designed in LuxRender. The front face is glossy, the back face is matte. It has always been a bit strange and something worth fixing. Note: as work around you can use "twosided" node with Glossy2 or Disney material.

However the archglass behavior is correct: any type of glass is supposed to have a thickness because the ray is refracted 2 times (when it enters and at the exit). If you add thickness to the geometry you should get the same result both from front side and back.

JonSargent commented 3 years ago

A twosided material was my first workaround attempt, but to no avail. Is the following correctly formed?

scene.materials.face.type = glossy2
scene.materials.face.kd = 0 0 0
scene.materials.face.ks = 0.9279028 0.6368867 0.531741
scene.materials.face.uroughness = 0
scene.materials.face.vroughness = 0
scene.materials.mat.type = twosided
scene.materials.mat.frontmaterial = face
scene.materials.mat.backmaterial = face

I hadn't tried the disney material, which does exhibit backface specularity -- thanks for the suggestion. In the long run I think a physical parameterization (in lieu of a "principled" one) still has merit, so I'd still support the tweak. :+1:

Theverat commented 3 years ago

The twosided material does not flip the normal on the backface side, it is left as it is. It only influences which material is picked. (I think this is the correct behaviour)

Dade916 commented 3 years ago

This has been closed by @julescmay.