OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Represent retro-reflective materials

Open AdrienHerubel opened this issue 1 year ago • 13 comments

Retro-reflective surfaces are ubiquitous, especially in scenes representing urban and industrial environment, as those materials are commonly used for any equipment related to safety.

There has been extensive discussion on slack (see slack thread and slack thread) on the topic.

We have so far identified two possible approaches for representing retro-reflective materials in OpenPBR :

There are additional techniques commonly used to implement retro-reflective surfaces, based on shading normal modifications.

References :

  • https://www.researchgate.net/publication/323012340_A_retroreflective_BRDF_model_based_on_prismatic_sheeting_and_microfacet_theory
  • https://www.researchgate.net/publication/317575122_A_physically-based_BRDF_model_for_retroreflection
  • https://www.researchgate.net/publication/316656998_Simulation_of_small-_and_wide-angle_scattering_properties_of_glass-bead_retroreflectors
  • https://www.researchgate.net/publication/251610177_Photographic_assessment_of_retroreflective_film_properties
  • https://www.artstation.com/blogs/d4ku/wZrD/a-retro-reflective-shader-for-unity
  • BRDF Measurements and Analysis of Retroreflective Materials https://hal.science/hal-01083366/
  • A brief history of retroreflective sign face sheet materials https://www.rema.org.uk/pub/pdf/history-retroreflective-materials.pdf

AdrienHerubel avatar Nov 26 '24 16:11 AdrienHerubel

Here are some preliminary renders of the Belcour retro-reflection model/heuristic done with OpenPBR in Arnold. The camera angle is varied, where 0 degrees means the light is behind the camera.

roughness angle 0 angle 45 angle 90
0.5 Image Image Image
0.1 Image Image Image

The parameters of the material here are:

openpbr_surface
{
   base_color                 0.95 0.5 0.05
   base_metalness             1.0
   specular_weight            1.0
   specular_roughness         0.5 # varied
   specular_retroreflectivity 1.0
}

So this is a purely conducting material.

For these tests:

  • I added a new float parameter specular_retroreflectivity in [0,1] to the specular lobe. What this does is simply mix the BSDF between a version with and without the retro-reflectivity enabled.
  • In the microfacet BSDF evaluation code, if retro-reflectivity is enabled, this "back-vector" heuristic is applied:
    • the back-vector $b$ is computed, i.e. $b = \mathrm{normalize}(V' + L)$, where $V' = \mathrm{reflect}(V, N)$ (from the known view $V$ and light $L$ vectors, and the macro-normal $N$). This is used for the micronormal $m$ instead of the usual half-vector.
    • The Fresnel term $F(V', b)$ is evaluated assuming the input ray direction is $V'$. This is not stated in the Belcour paper, but according to Laurent is the more correct approach (e.g. without this it led to the banding in the shadertoy test).
    • The NDF, and masking/shadowing are computed as usual from the given $m=b$
  • In the microfacet BSDF sample code, if retro-reflectivity is enabled:
    • A micronormal $m$ is sampled as usual from GGX. The sampled $L$ is then obtained by reflecting $V'$ about $m$. This makes sense given the back-vector definition, but again is not explicit in the paper.

Initial thoughts:

  • The look is at least plausible, at least at high roughness, i.e. produces a very bright peak in the back-scattering configuration. At low roughness the result is a bit odd, and shows a possible artifact, which remains to be understood.
  • The modification procedure is quite straightforward, though not fully described in the paper. It might be enough if we reference the paper, and explain the missing pieces. It would also be beneficial to more fully understand the properties of this "Belcour heuristic" modification to the standard microfacet model -- e.g. show that it preserves energy etc.
  • As this is not really physically based, there are possibly some ambiguities about exactly how this interacts with the full details of e.g. multiple scattering, making different implementations not quite match.
  • This test was for metal only. In this implementation, it would also work applied to the dielectric specular lobe. Further tests are needed to see if that makes sense.

portsmouth avatar Mar 04 '25 17:03 portsmouth

We discussed a bit on Slack what a physical interpretation of the heuristic shown above might be.

The most plausible picture seems to be that (in a 2d V-groove configuration) each microfacet has a neighboring vertical (i.e. macro-normal aligned) wall:

Image

Then the back-vector reflection procedure can be seen to generate the double bounce from both the facet and the wall. (The diagram was done by Laurent).

But taking this seriously, it would lead to some differences from the procedure above, e.g. there would be two Fresnel factors since there are two bounces (as well as single and higher bounces of course), and there would be different shadowing (the assumed height of the wall would matter). So at best this is just for intuition.

Personally I find it implausible that the real materials operate in this way, with macro-normal aligned walls.

In the real structures there is some grid of prisms/pits, and the (multiple) bounces from these pits generates the retro-reflection. For example if there was a grid of normal-aligned cylindrical pits, there would be a retro-reflective mode due to the double bounce from the pit base and walls. In 2d (i.e. the "pits" are actually long slots), that gives perfect retro-reflection, which we don't want. In 3d (i.e. the pits are really cylindrical holes, closer to reality), it doesn't generate perfect retro-reflection due to the 3d bounce geometry, as well as masking effects. Also, in reality the pits will be not all perfectly normal-aligned (e.g. we could imagine they sit within the facets of a rough micro-surface), broadening the peak. I suspect that the observation of the back-vector dependence is really a manifestation of the averaged behaviour of such a micro-pit configuration. But this is quite involved to fully analyze, and would be a research project.

For practical purposes, we might as well adopt the back-vector heuristic (perhaps with suitably firmed up definition to be totally unambiguous), for its simplicity and acceptable visual plausibility.

portsmouth avatar Mar 04 '25 22:03 portsmouth

I implemented the model as described in Matthias Raab's notes posted on Slack, and copied here for reference:

backvector.pdf

His prescription is quite nice in its simplicity: evaluation and sampling functions merely replace the view vector $V$ with $V'$ upfront (where $V'$ is simply $V$ reflected in the normal).

This produces the results below in Arnold, using the same setup as the experiments above:

roughness angle 0 angle 45 angle 90
0.5 Image Image Image
0.1 Image Image Image

So there is a quite plausible retro-reflective peak, though (for some reason) it is less powerful than the one in the original test. It also seems to avoid the artifact seen before (i.e. the black discontinuity/band seen in the low roughness case).

For comparison, here are renders with the retro-reflection turned off (i.e. a normal rough metal).

roughness angle 0 angle 45 angle 90
0.5 Image Image Image
0.1 Image Image Image

portsmouth avatar Apr 01 '25 16:04 portsmouth

The minimal modification to the MaterialX spec required to support the Belcour model is simply a Boolean parameter, e.g.

<input name="retroreflective" type="boolean" value="false" uniform="true" />

added to

ND_conductor_bsdf
ND_dielectric_bsdf
ND_generalized_schlick_bsdf

In implementations, e.g. testrender, the microfacet code will be modified to alter the microfacet evaluation and sampling code if this Boolean is checked on (as outlined in Matthias' notes).

The albedo of the BRDF (both reflectivity and transmittance) will be affected by the Boolean, however as shown by Matthias the directional albedos are related simply by reflecting the direction about the normal, so any existing albedo tabulation/fits can presumably still be used.

portsmouth avatar Apr 08 '25 14:04 portsmouth

Text for spec proposed in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/255.

portsmouth avatar May 12 '25 17:05 portsmouth

Here are some preliminary Arnold renders of a retro-reflective conducting material (using the Belcour back-vector minimal approach), i.e. base_metalness 1 everywhere (with specular_retroreflectivity=1 on the white checkers, and specular_retroreflectivity=0 on the red checkers) for various roughnesses. The red patches are a regular non-retroreflective conductor (with a red base_color) of the same roughness.

I have also implemented retro-reflective glass/dielectric, but didn't do renders yet. I'm not sure how this will look or if it makes sense

roughness angle 0 angle 45 angle 90
0.0 Image Image Image
0.2 Image Image Image
0.4 Image Image Image
0.6 Image Image Image

portsmouth avatar Sep 16 '25 17:09 portsmouth

Here are wedges of camera angle for materials with a metallic or dielectric base, in the retro and "classic" (non-retro) modes. (All with the same roughness).

First, a metallic material.

mode angle 0 angle 45 angle 90
classic Image Image Image
retro Image Image Image

Next, a plastic like material (i.e. "glossy-diffuse", diffuse bounded by dielectric) with dielectric IOR=1.4 and the same base color:

mode angle 0 angle 45 angle 90
classic Image Image Image
retro Image Image Image

Next, a glass-like material (i.e. dielectric with absorbing volume) with dielectric IOR=1.4, and same transmission color:

mode angle 0 angle 45 angle 90
classic Image Image Image
retro Image Image Image

Commentary:

  • I think the retro-plastic looks quite nice, for the expected purposes of e.g. safety strips, street signs and clothes. The specularity of the plastic is just reduced a bit and compensated by the back-scattering. So one gets a sort of matte looking material, that brightens up when viewed from the lit direction. Further sharp specularity could be added back with a coat.

  • It's interesting that with a metal, it kind of has a sheeny appearance (though gets much brighter than regular sheen, in the back-scattering configuration).

The dielectric case is particularly interesting (or unusual anyway), and has this unexpected (to me) property, here with clear glass (in the 45 degree configuration, so the back scattering is not very bright):

ior classic retro
1.0 Image Image
1.05 Image Image
1.5 Image Image

The refraction is drastically altered, for example it doesn’t disappear in the IOR 1 limit, which of course regular glass does. This is actually expected in the back-vector model.

This might be considered an undesirable feature, I'm not sure. However:

  • Retro-reflective clear glass, while possible in the the model, may not be particularly useful in practice. So the fact that the refraction looks unintuitive perhaps isn't important.

  • We certainly do want to have retro-reflective dielectric, for the plastic (glossy-diffuse) and subsurface cases, where as shown above, the retro-reflection may even be more plausible than with a conducting base. However, then in order to be rigorous we need to define the full dielectric BSDF in the retro-reflective mode. The back-vector modification in the BTDF generates this altered refraction, but also ensures overall energy conservation/preservation. So we do need to decide on the detailed form of the dielectric BTDF I think.

We might consider altering the model to simply not change the BTDF from regular glass, which will still conserve energy as the albedos of the BTDF and BRDF of the Belcour model are unaltered from the classic model. Though we need to think about whether that introduces other problems (and as noted, whether the problem is even worth solving).

portsmouth avatar Sep 17 '25 20:09 portsmouth

Here is another example with retro-reflective glass, where the blue tinted checkers are the retro mode, and the red tinted checkers are regular glass. The change in refraction angle is most obvious near the subsurface bars.

angle 0 angle 45 angle 90
Image Image Image

portsmouth avatar Sep 18 '25 17:09 portsmouth

Another dimension of control is the specular_retroreflectivity weight, which is the blend between classic and retro-reflection modes. In my implementation this is handled within the microfacet BSDF, via stochastic selection of the mode during sampling, and blending of the BSDF weights during evaluation.

(Note, these renders are in the retro-reflection configuration (i.e. with the light coming from the view direction), so the retro-reflective effect is strongest. It will be less prominent at all other view angles).

At low specular_retroreflectivity weight, the effect is somewhat similar to the fuzz model, and it will be interesting to compare and contrast the look of the two in more detail. (Presumably, the models differ mostly in their view dependence, i.e. the silhouette brightening is only significant very close to the back-scattering direction, whereas in the fuzz case it peaks in the forward scattering direction. Also of course they have a totally different theoretical basis and underlying physical picture).

specular_retroreflectivity metal plastic glass
0.0 Image Image Image
0.0625 Image Image Image
0.125 Image Image Image
0.25 Image Image Image
0.5 Image Image Image
0.75 Image Image Image
1.0 Image Image Image

portsmouth avatar Sep 18 '25 17:09 portsmouth

To avoid the refraction anomaly, a simple approach is just to leave the dielectric BTDF unchanged, applying the retro-reflection modification to the BRDF only. This continues to preserve energy since the total energy reflected and transmitted is unmodified (though its angular distribution is changed, obviously). This would still be a completely rigorously well-defined modification of the dielectric BSDF.

With this change, the look of retro-reflective glass is perhaps more plausible. The glass disappears in the IOR 1 limit, which is more intuitive, and the refraction of the background is unaffected.

Note that the appearance of the retro-reflective plastic and metal above will be unaffected, since those did not involve the dielectric BTDF anyway (in the albedo scaling approximation that we employ).

(NB here all renders are fully retro-reflective, i.e. specular_retroreflectivity 1 in all cases).

ior classic BSDF retro BSDF retro BRDF + classic BTDF
1.0 Image Image Image
1.05 Image Image Image
1.5 Image Image Image

And here from a view angle closer to back-scattering.

ior classic BSDF retro BSDF retro BRDF + classic BTDF
1.0 Image Image Image
1.05 Image Image Image
1.5 Image Image Image

portsmouth avatar Sep 19 '25 01:09 portsmouth

Arguably the retro-reflective clear glass is rather artificial (even with the more plausible approach of leaving the BTDF unmodified), but it seems harmless enough to allow in the model, since we kind of get it for free by supporting retro-reflective dielectric for the more plausible plastic/SSS use case. However it would still be worth thinking about what the potential use cases for clear retro-reflective glass could be.

I can see the retro-reflective glass being useful maybe for something like a cheap approximation to the transparent plastic retroreflectors on bicycles (like below). It's a bit fake obviously, since in the real structure there is a prismatic retro-reflective sheet which is simply under (or embedded in) a piece of clear plastic (or possibly it's entirely plastic, with an air gap at the back and TIR happening in some beads/elements inside the plastic). But a reasonable cheap approximation to it could be to just apply the retro-reflective glass shader to the front surface of the plastic.

A more faithful version would be to embed the retro-metal inside a genuine thick sheet of non-retro clear plastic, but obviously that is much harder to render since the metal would be lit entirely by caustics, so the retro-glass could be a good plausible compromise solution for this look. Adding a coat would further improve the approximation.

Image

portsmouth avatar Sep 19 '25 12:09 portsmouth

https://github.com/AcademySoftwareFoundation/OpenPBR/issues/243#issuecomment-3308797467

The retro-reflective response seems super strong. What do you think?

fpliu avatar Oct 13 '25 18:10 fpliu

The retro-reflective response seems super strong. What do you think?

Agreed, but it's maybe an artifact here of the view direction being perfectly aligned with the light, and a fairly powerful light? It is energy conserving, so there is no artificial brightening. I will plot the radiance as a function of angle and roughness, to take a look.

portsmouth avatar Nov 11 '25 20:11 portsmouth