alpha mapped refraction doesn't work with eevee (aka G9 tears)

Issue #1334 resolved
Alessandro Padovani created an issue

daz studio 4.21.0.5, blender 3.4.1, diffeomorphic 1.7.0.1354

The eevee screen space refraction is not set for alpha mapped refraction. It is correctly set if there’s no alpha map. Without screen space refraction eevee will render as opaque.

Test scene included alpha-refraction.duf. This is also the case with the G9 tears.

note. Just a note of warning. On my pc I get blender 3.4.1 to crash occasionally when I render the test scene with eevee. While blender 3.3.2 never crashes. It may be I need to update the nvidia drivers.

Thomas please check if there’s any special condition as I don’t remember the work with did with refraction and the old tracker with the original discussion is no more available. But at first sight it makes sense to set the eevee screen space refraction if there’s some refraction in iray.

# set eevee screen space refraction
if iray refraction weight > 0
    eevee screen space refraction = 1

steps:

  1. Import the test scene alpha-refraction.duf, it’s a sphere with alpha-madded refraction, use the principled option
  2. render with eevee

alternative steps:

  1. instead of the test scene you can use G9, the tears have alpha-mapped refraction
  2. render with eevee

Comments (8)

  1. Alessandro Padovani reporter

    I found the original discussion #104 it’s in the new tracker. There we seem to always set the screen space refraction so may be this is a regression.

    Screen space refraction is always needed for refractive materials (transmission = 1).

  2. Thomas Larsson repo owner

    OK, I think it should work now. What happened was that the cutout opacity turned off the screen space refraction. Now cutout doesn’t touch this setting.

    The blend mode is set to alpha blend for thin film and alpha has otherwise. You wrote in the other issue that alpha blend should be avoided, but then the green color is lost.

  3. Alessandro Padovani reporter

    Commit aedca25 works fine.

    I can confirm that alpha blend should be avoided because it doesn’t handle alpha sorting, so it makes a mess with multiple layers as transmapped hair for example. Then with eevee it’s always a matter of trading and I see you use alpha blend only for refractive materials so hairs are safe.

    https://docs.blender.org/manual/en/latest/render/eevee/materials/settings.html

    The green color is not lost if you use principled, it is lost with bsdf but it is expected that the eevee screen effects don’t work fine with bsdf, it is cycles only.

    Below there’s a comparison with the G9 eyes, alpha blend causes a little glitch but it is acceptable since we just have two layers in this case, it may get worse with more layers. Personally I’d go with alpha hash. Let me know what you think so I’ll close as resolved.

  4. Alessandro Padovani reporter

    note. On my pc blender 3.4 crashes if I try to render G9 with eevee, while blender 3.3 works fine. Thomas do you have the same issue or it’s just me ?

  5. Thomas Larsson repo owner

    I changed the setting to alpha hash for the principled method, but kept alpha blend for thin walled and bsdf. Even if the latter is officially only for cycles, it doesn’t hurt if the color happens to be right if you use it with eevee.

  6. Log in to comment