Thin wall refraction for Eevee with principled shader option not work

Issue #330 closed
engetudouiti created an issue

1 setting = principled Method

2 default view port shading = material preview (Eevee)

3 The cornea need to modify for Eevee (it is thin wall refraction)

Then it render in viewport like this

I do not care, if it is double Principled method or not. anyway plug in not generate any custom node, and any new principled bsdf, so it never work.

My recommend way should be simply use same custom shader (BSDF version) with mix one Principled bsdf (if it need to mix)

(mix fac should be connect with refraction weight ) , then basically it should work for all case.. (defuse and refractive mixing surface, )

but double principled bsdf OK if it work well. At current after all it seems not work.

(do not know reason, why it simply show one principled bsdf, without change anything but, use ior as 1.00 and full transmission, then Eevee can not handle it well)

real dirty correction is I may change alpha as 0.00 (so Corena simply ignored, then lost any reflection about Cornea, and it pefeclty hidden, then can not set any refraction color (transparent color) ) . of course I do not think it is useful at all.

So to solve issue, need custom shader as same as bsdf option, or need double principled (but I do not know clear how it work after all,, because it still not be generated. for current scene.

I can not attach file because it is not free product,.. but if you need more info, I may offer as you request. thanks. (eg how material are layered etc,, for me it is usually daz double surface eye)

Comments (44)

  1. Alessandro Padovani

    I’d try to avoid bsdf nodes in the principled option, for compatibility with prorender and gltf. I also have some ideas to improve the eevee refraction, I’m just releasing a first version for bsdf and principled will follow. A link to the asset will be useful for testing. I mean the commercial product.

    Or if you get a more “standard” asset showing the issue. Or if you may copy the materials in a test scene that we can use it would be even better.

    Again, the principled option is expected to have issues with complex iray materials, especially with eevee. It is expected that the user may need to fix it. This doesn’t mean we can’t improve it of course, but, in my opinion, not at the cost of introducing complex bsdf setups, this is what the bsdf option is for. I’d keep the principled option clean.

    1. bsdf: full iray materials for cycles, complex setup, it is hard for the user to edit materials
    2. principled: limited iray materials for cycles and eevee, easy principled setup, it is easy for the user to edit materials and some fixes may be needed

  2. Thomas Larsson repo owner

    Just to wrap up the previous discussion. Some of it was over my head, but what here is what I took away from it:

    1. The bsdf method now works well for thin films.
    2. Transparency is equivalent to refraction with ior = 1, except that it converges faster so is better in that respect.
    3. Since we know if we have a thin film when the material is created, we could use separate node groups for thin films and ordinary refraction, which makes them simpler.

    If this is correct I will make a new thin wall node group.

  3. Thomas Larsson repo owner

    I don’t understand how this material differs from most cornea materials, except that the eye is bigger so problems are more visible. Are you sure that Screen Space Reflections and Refraction are on in the eevee settings? The plugin should update those settings automatically unless you have turned it off.

  4. Thomas Larsson repo owner

    I tried another eye with a similar material. Clearcoat is smaller and there is some bump, but otherwise the node tree is the same as yours.

    Here are the renders. Nothing strange here.

  5. engetudouiti reporter

    Thomas yes it work when I impor genesis family. But actually it not work for this scene.

    now I can confirm, so the problem is, actually There remain case, which curernt principled bsdf not show under-cover mat correctlly

    Because you show your node , and it is same as me = only generate one principled bsdf, with ior as 1.00, then full transmission.

    basically, it is perfectly same, when we use glass shader and set so. And even though it may usually work, I think it not work for cases.

    I may detect the case (difference when it cause issue” and report here.

    Then of course I already confirm screen space refraction ON.. (may attached pic show it too)

    btw at least I can confirm my custom version work. and BSDF option work too. without change anything, so I can narrow my scope to detect it.

    I think untill blender side solve this issue, it never work (there remain case, it not work. with principled and glass)

    https://developer.blender.org/T60008

    as you can see it is not solved, but simply set as invalid. (for me it is not invalid at all though)

    Then your set-up actually may show same problem I feel. (but some -case it seems work,)

  6. engetudouiti reporter

    my setting of the Cornea, (though I try to change view port material options and up-date scene, but after all it not work)

    I may test with change geometry size etc..

    Then to get clear it not work for same setting I add new mix node, then socket2 connect with transparent shader only.

    So now if I set mix factor as 0, it use default plug in generate principled bsdthen if I set mix factor as 1 it simply use transparent shader . you can clear see difference without change any other setting.

    1. default plug-in import mat for cornea (now it mirror enviroment)

    2 use transparent bsdf only

    3 I add one more, test with refraction with ior 1.00 only.. as I said it never work for this-type material. Then to be frankly said, if principled bsdf Ior 1.00 could work, actually refraction 1.00 could work ^^;

    because principled bsdf transmission = almost same glass shader BSDF, then glass shader BSDF should use refraction circulation . as same as refraction bsdf. (there may some difference about new option)

    I play with refraction depth etc (I suppose it can limit refraction thickness, then sometimes tweak it) but about this case it not matter. So I recommend, (if you can make it work with double principled bsdf, use it please, if you can not find way, please simply use custom sahder, with MIX principled bsdf..

    For me, principled bsdf option never means, it should use principled bsdf only. No No No.

    principled bsdf option means, use Principled bsdf as base shader. so you need not special metaric or special diffuse or special glossy but they are gathered as one. but as you said, there is case it need to divide,, eg volume or complex iray sss options or refraction .. about this case, Iray conversion show real weak about refraction..

    1 Principled bsdf mixing way for refraction, and Iray uver mixing way for refraction is different.( it effect for cycles too)

    2 it always keep thin wall refraction mat problem (or layered refraction mat)

    so we only need to divide the Refraction (transimission) from base principled bsdf.

    then mix with Refraction weight . so we can divide, principled bsdf Mat with Refractive Mat clear.

    It not means to against Xin way.. (but I simply say fact, double principled so may not offer merit for this problem. but just offer double options (how mix 2 principled bsdf), actually I not against it.. because if I use the technic,, almost all current BSDF option shader can represent by mulit principled bsdf (use each principled bsdf as different shader) .

    eg SSS principled bsdf, Refraction principled bsdf,, Clearcoat principled bsdf ,, like that.. so mulit idea is not bad,, but simply it not work to solve this issue. because principled bsdf not include transparent bsdf. only have alpha socket.

    So to make it work,, one set alpha as zero, then mix with another principled bsdf, for reflection only. it is something strange and can not easy understand, node prupose, but actually it may only work (if you only use principled bsdf)

    Then if you remain principled bsdf base shader, for all case, and mix with custom nodes. we can really enjoy mixing refraction part with Base part like this

    I think this is correct usage,to mimi iray refraction weight with principled bsdf as base mat.

    you can not make it work with principled bsdf Trnasmission value. so Refractive part need to be divided for both with mix factor. about this problem there seems no difference (you use cycles or Eevee) I think.

  7. engetudouiti reporter

    Then the geometry conposed by only 2 layer.

    1 usuall mat with each eye part texture( no refractive part)

    2. refractive part = Cornea (with reflection) cover all 1 material (really close but not connect and touch under surface)

    Then current principled bsdf node show like this

    Of course to force it transparent, with one principled shader, I can easy use 2 way

    a. set alpha as 0.

    or

    b. use alpha clip with 1.0 (it simply remove all mat with transmission setting)

    about both way, not show any reflection (of course) so I may not hope it. (thomas may suppose we use clearcoat with refraction ior, but about this case, it can not .

    Then product is this

    https://www.daz3d.com/eldritch-abomination-and-altar

    I do not remember when I bought it but anyway it only use uber iray mat with tag. (and we already confrim we may see same node, so it is not import setting problem but shader node problem which plug in generate, and it is expected to get transparent and clearcoat reflection.

  8. engetudouiti reporter

    And it is not directly related with this topic, but as I said we can divide clear coat node, then we can use more flexible.

    If current Plug in offered one principled node work about this mat,, it should be pefectly same as this..

    (transparent + clearcoat reflection only) with principled mode. like this. but add on generaed not work (because it include refraction node, not transparent node)

    Then if I consist to use principled bsdf only,,, one principled bsdf set alpha as zero + we need another shader to get reflection. (it is matter which shader you will use so double principled way may work.. but only to solve this issue do we really need double principled bsdf? I do not think so.. we only need divide clear coat, or we only need custom refraction shader. it is my view. but it is not matter, anyway,, at lesast when we choose principled option, it need to show the mat reasonable, we do not hope,, broken eye .(I only use the word as 3d model.) even though with preview .

  9. engetudouiti reporter

    Then Thomas I do not clear remember about Thin film parameter (recently I mainly work in blender)

    So I can not confirm about it.. but after all,, make custom refraction node for thin wall only, make things easy. (how mix with other prameter seems different problem I feel..

    Custom thin wall refraction only cover, thin wall refraction and reflection. so if you add top coat it need to be offered as separate node.. it should not merge as one glossy reflection. if make it so, we lost to use texture for top coat weight.

  10. engetudouiti reporter

    @Thomas

    Just to wrap up the previous discussion. Some of it was over my head, but what here is what I took away from it:

    1 The bsdf method now works well for thin films.

    myanswer (I do not clear understand thin films options so can not confirm)

    2 Transparency is equivalent to refraction with ior = 1, except that it converges faster so is better in that respect.

    Yes, but if you can use refraction ior as 1.00,, we can still get some refraction roughness. I said wrong about it, (I test too many things ,and hoped to show current problem,, but if I use it for single cycles material,, I definitely say, ior 1.00 can offer more flexibility even though it is thin wall.. when I use single bubble etc.

    So if you can ,, ideally I change my mind,, use transparent for Eevee (it never work), but keep refracition ior as 1.00 for cycles. about this I aplogize, I do not test fully with cycles, in another topic. maybe Alessandro agree it I believe. You may hope to tweak refraction roughness for thin bubble, or thin wall window, should be.

    I already find mimic transparent shader to get roughness for Eevee, but discribe many things as one topic, simply cause miss report. so do not talk about it, untill you solve this issue. it is actually enhancement option, so you may not need it for principled bsdf, (but if use same custom node, I may recommend to add some tweak to get thin wall roughness (mimic refracton) not only about glossy (fresnel) roughness. (transmitt roughness = almost same tnasulucency (diffussive transmitt)

    3. Since we know if we have a thin film when the material is created, we could use separate node groups for thin films and ordinary refraction, which makes them simpler.

    yes,, but as I said,, you can make to use refraction shader for cycles thin wall,, (then mix factor is not bad idea, to easy tweaking in blender,, so if you anyway remain it in node groups, I may recommend it.. but it may cause difficulity user understand the option meaning,, (mix refraction with transparent,, how we use,, when we use etc)

    Then at least we may better divide topic for cycles and Eevee even though I like multi shader,, so now I may hope to talk about eevee.. (then about this topic, I mainly talk about “Principled “ option..

  11. engetudouiti reporter

    Just to confimr if someone think the product set wrong normal,, I already checked it.

    so it is not reverse normal problem. simply Eevee reject to set refraction shader for top layer which cover inner surface.

    Blender dev answer is set refractive shader for inner one. (other asked it in the bug report). (though actually I do not know what it means,,maybe there is way if we modify eye geometry..then anyway refraction may only work when it used inner surface? (I do not know)

  12. engetudouiti reporter

    OK I found why g3 could show mat correctly if I use g3 default textures.

    It seems lucky. because default g3 use eye-reflection texture (black and white) to mimic reflection (actually it need not though) to easy show kind of eye reflection background image.

    Then current plug in eevee option connect it to eye-moisture (top surface) alpha value.

    So actually almost all eye-moisture are set as alpha zero.. but around center (iris etc) remain as visible (alpha i.00) so we can see clear coat effect only around eye center..

    (then even though you try to set value for eyemositure clear coat, it only effect,, the white reflection map image part, not cover around cornea at all. simply they are disappear (no material)

    next second layer are mix surface (refractive part with non refractive part) current principled option set 2nd layer refractive part as alpha zero ^^; = you now remove cornea perfectly.

    So it simply hide all cornea part as non reflection.

    So when we import g3 figure,, with principled option ,and see it eevee,, it may only show reflection for iris part. at least with current version plug in generate so.

    it is the reason why it worked for G3 mat,, but not worked for usuall double face eye,, usuall double face eye not set any reflection texture for refractive part. then plug in can not set alpha for it. if you set full alpha zero, it means your clear coat perfeclty removed.. (so non reflection)

    If you do not understand means, remove g3 eye reflection texture of eye moisture in blender, then see how it work with keep transmission as 1.00 and ior as 1.00 (afer all those setting not effect at all, because you set as alpha 0.00 for refractive part, it only work, for reflection map white area.

    . but keep refraction weight as 1.00 for eye mositure, then check it please.

    my most of other character not use reflection mat so same work flow never work.. plug in not set alpha for top reflaction part at all but may try to use transmission. as ior 1.00 then eevee should complain. like this

    I do not know if it may change with your currently using material,, but basically use principled bsdf transmission (= use refraction) should cuase issue. without you use alpha and remove all.

  13. engetudouiti reporter

    You may try V7 iray mat, then import with principled option, you should see new issue.

    (though how use texture change with each mat,, then plug in may not offer same node gorup. even though same eye relaed srufaces. but Victoria 7 iray mat show this issue for me) like this .

    It seems change with each mat, how you use alpha for eye moisture and cornea,, but after all,

    if you use transmission 1.00 and ior 1.00 it never work for principled bsdf top refractive surface.

    (so if it could show correctly, you simply hide it with alpha like cut-out opacity, all other setting is ignored)

    I recommend, re-work this option. the problem seems you only test with some base figures.. but I suppose, Thomas had believed,, transmission 1.00 with ior 1.00 should work with eevee. (but fact is not,) then if you use alpha and hide them, the hidden part never show any clearcoat reflection (because it was cut-out), so it not way you may prefer for this option I think.

  14. engetudouiti reporter

    And thanks I finally could see, new double principled bsdf nodes , for second refractive surface = cornea. with V7 mat.

    but as fact it seems not work at all. for V7. or if I need change setting, please teach me clear. I may try for learning purpose. (but as for me,, if I simply use my custom shader, it never happen. though I need to re-connect textrues with reasonable way)

  15. Thomas Larsson repo owner

    The double principled setup was introduced as a solution to issue #282. I think it works reasonably well. In particular, most of the time I don’t see your problems with Victoria 7:

    However, when rotating the view in the viewport, there are certain angles where the corona goes white, at least on one eye. But most of the time it does not.

    But note that at the same angle, the lips have excessive glossiness too. Weird.

  16. engetudouiti reporter

    As for me,, it is opositte, that means, only some angle it happend to show under surface, but basically not work for eevee viewport render.

    So thomas use V7 default with principled option?

    About V7,

    the eye mositure can ignore perfectly. because daz set cut out opacity as 0.00 without any image( I actually ask the reason long time ago,, so it means,, it use alpha zero, or pefectly ignore all set up of eye moisture, but it is daz way.. vendor feel it need not so remove it with cut-out opacity . and your conversion way is actually correct,

    you set alpha as 0.00 = cut out opacity as 0.00

    Then problem surface should be cornea.

    in daz studio, it use refraction weight map, to divide, color texture part and transmissive (refractive part). then as you already show, the probem happen about refractive part. then with angle, it not show under surface texture..

    Xin default request was it seems ignored cornea non transmissive part texture (it need to merge well with refraction wegiht map ) the reason was maybe add on generate custom transmissive shader only. (so do not use refraction weight map at all for cornea I suppose, though basically it work. (actually non refractive part is really tiny area around pupil)

    Then real workflow should be,, principled shader use as base (non refractive part), then mix with transmissive shader. (with reflection) . at current double principled way try to mimic it by 2nd principled shader as transmissive part (or refractive part) , then try to use clear coat for reflection then at least it cause issue (not work)

    ,can you show your generated node when import V7? now we use same mat, so it should be same. (without my install version corrupted)

    Then what I hope to confrim is, so you suppose your 2nd principled shader are used for refractive part, right? (you set ior as 1.00 with transmission as 1.00. if so I really feel strange why it can work for some case.

    we already know, refraction shader can not work for top layer. so principled transmission actually include it. then it never work.

    dirty fix is , you need to use alpha as 0 then hide all cornea refraction part.. then it may remain non -refractive part, but refractive part disappear.. (it is not you means, I know, because you hope to use clearcoat of 2nd principled shader)

    So actually I said,, it was simple.. we need not double principled, but needed your old shader which at least could show cornea refractive part with glossy reflection then just needed to use mix shader with refraction weight map.. (though you may not change again,,) to use base principled bsdf as non refractive part. (so you can plug color diffuse texture for cornea)

    I remember, you seems hoped to get more clear reflection (for G8? I do not clear remember)But about V7 mat,, it not use daz top coat at all.. for eye moisture (it is perfectly cut out) ..

    Then if you really need clear coat , you may need triple principled shader.. atcually.. or you can never it work for all casse.

    THat means,,

    Ist principled = non refractive part

    2nd principled = just set alpha as 0 then mix with 1st (by refraction weigth map)

    so now you get, refractive part as full transparent, and non refractive part with diffue map,, etc..

    then finally add 3rd principled bsdf (mix or add I do not know, because you do not use my cusstomize top-coat node^^;)

    then 3rd principled may only need to show reflection effect (with glossy or clear coat,,) how mix 3rd shader (use only for reflection (glossy),, I do not know..

    So it can rerpesent,, only use principled bsdf if it you means Principled option. (but it is actually strange work-flow)

    Then as conculustion, you may use transparent shader for refractive ior 1.00, then divide reflection without use ior for principled option,, if you like the way,, it should be like this

    So as for me this problem is really simple… then I can still tweak base principled shader as I need.as non refractive part shader.. just to make this work,, I do not need any 2nd or 3rd principled shader… (though it can offer more complex node group, and variation,, but I said,, if it need you may offer everry material with double ^^; then user may free tweak 2nd principled shader as they need with mix shader etc..

    after all,, current double principled shader way is try to mimic custom refraction sahder with clear-coat reflection (not count fresnel ior).. then at same time it actually cause problem,, with angle etc.. so I can not approve it.

  17. Alessandro Padovani

    As for issue #282, as reported there, I’d simply ignore the refraction map. Ignoring the map works fine for most cases, no need for dual principled. But, do as you like.

  18. engetudouiti reporter

    we can not ignore refraction weight map for iray.. the purpose is,, actually divide non-refractive part (diffuse or metal etc) with refractive part. even though it may not show clear problem for eye surfaces,. it must need when vendor attach image for the refractiion weight and divide material in one surface group.

    Then only logical way without mess around other socket set up, is use mix node and apply the refraction wegiht map as factor. (it never change even though we use double principled or use another custom shader as refractive part)

    if Principled bsdf transmission work as same as daz refraction or if it have thin option,, I may prefer use transmission socket to plug refraction map.but unfortunately it not work with thin wall. = most of all eye refractive mat set it as thin wall

    Then more precisely how circulate metallness weight and refraction weight is oposittte between daz iray and cycles. so I prefer if we convert iray to blender principled bsdf, after all I recommend to use mix shader with refraction map.

    2nd shader may depend by each user.. if double principled actually work for all case, I do not care. as for me custom shader work without problem so I perfer it (for cycles and iray I may set different shader for glass )

  19. Alessandro Padovani

    As I see it, eevee is very limited as for refraction, and I doubt it can correctly handle refraction maps. So ignoring them makes sense in my opinion. The principled option is intended to support eevee, if necessary by limiting the material properties. Then for the bsdf option with cycles we can do anything we like.

    But I do understand we have different visions about bsdf and principled.

  20. engetudouiti reporter

    EEVEE can correclty handle mix shader and factor.. then after all if there is issue, it is not related with mix shader. but related with each shader.

    about this case, if Refraction is limitted of course,, refractive part should be limittied, but it not related with refraction weigth map . (it is just mix factor) so there is almost no meaning to remove it.

  21. Xin

    Thomas, for some reason the addon is not enabling Screen Space Refraction in the material Settings anymore, for the materials that have non-zero Transmission (using the principled method).

    I can’t reproduce the error where the cornea goes white like Thomas, so I found no problems with V7. But that looks like it might be SSR fading near the edges of the screen (a limitation of SSR, try tweaking Edge Fading in the SSR settings to see if that solves it).

    I will try that monster thing next.

  22. engetudouiti reporter

    Only differecne I can suppose,, I use view port shading (then set refraction setting for view-port, but render keep cycles. but even though I set Eevee as render, I test it with monster, it not worked, so I tried bsdf option, then now it seems solved (for me, auto scene setting may not need,, , I always check scene or material eevee setting by my-self.)

    Then I return my default option “principled bsdf” (and hope to see eye diffuse with reasonable reflection) with Eevee viewport..

    n Xin, if you do not care,, I hope you may agree , to add custom shader for refraction only. without you really hope all principled option should only use principled bsdf.

    (but we already add mix node for refraction weight..)

    I almost believe you should see same issue about more simple refractive layer mat, like this monster. it not triple layer..like daz eye-mat.. (it have 2 refractive mat,, then it cover non refractive mat,, about g3, though V7 only use 1 refractive mat as visible)

    then if we use alpha as 0.00 , you remove the surface perfectly. then it remove any reflection about refractive part. I suppose you not hope it. (though for viewport it seems better than show strange eye)

  23. Xin

    I’m using Blender 2.91. engetudouiti, you are using 2.92, which is in beta, have you tried going back to 2.91? this is for V7.

    I’m still reading the other parts to understand the other problem, could you maybe summarize it in specific terms?

  24. engetudouiti reporter

    I may try 2.91 later,, but I do not think It effect shader.. because I could confirm Thomas and me use same node for monster mat. anyway I check it.

    Then I hope yours confirm, so your procedure is try to use principled bsdf ior 1.00 with transmisison to make thin wall refraction work, it is right?

    it is important, how you think double principled work.

  25. engetudouiti reporter

    The only problem I mentioned about these topic, is

    what shader you use to get thin refraction for top layer when which cover under surface. (sometimes second layer include another refractive part too)

    About dobuple principled shader,, it only generate principled bsdf.

    so you should use 2nd principled bsdf for refractive part. so problem is i

    principled bsdf, ior 1.00 with transmission 1.00 can work or not with eevee, and those refractive thin material which cover another surface.

  26. Xin

    The monster works for me too, with the principled method in Blender 2.91 (again, the addon is not enabling Screen Space Refraction for the material with Transmission != 0 for some reason).

    Once you do, you get this by default:

    The monster doesn’t have 2 layers of refraction.

    Your initial problem seems to be that the Screen Space Refractions aren’t working for you for some reason. It’s a settings problem or a bug with Blender 2.92 (in beta).

    The double refraction issue is a separate issue, I will make that clear with an example later.

  27. engetudouiti reporter

    OK so yours say, I make something wrong,, now I check again and confirm why it not worked for me,,

    1. I usually keep my render set as Cycles. then only use Eevee for material preview mode.
    2. Then when import , set each material parameter of viewport (Eevee) like screen space refraction on for refractive part.. (I confirme everytime it, so I set it, even though plug in not auto set it)
    3. At same time,, I always have used my custom version, so it never cause issue for me..before. (because eye mat = thin wall, it use transparent mix shader, then I do not need to change any setting but change material view port setting only
    4. Actually to work with principled version, I need to change render engine as Eevee, at least once. then set scene property, refraction refleciton (with cycles render it never be shown,, ) as same as viewport material setting

    (yes it is my fault, I simply believed if I set material viewport setting, as screen space refraction on, it should set scene setting too.. )

    1. so To get viewport work with keep Render = Cycles. I need to change Eevee, then set scene property first.. then return Render = Cycles
    2. now it woked for me .

    I think maybe plug in can not auto-set scene options without I set it as eevee, and now I could understand reason. (though if plug in auto-set material as viewport refraction on, I may get same issue, untill I change render as eevee.

    I do not test with 2.91, so if it is only problem for 2.92 or not.

    It is my fault (not confirm scene setting with EEVEE render engine,, but only change viewport setting ^^;)

  28. Xin

    Maybe the addon should set that up automatically too. Basically, set up both Eevee and Cycles, regardless of current renderer.

  29. engetudouiti reporter

    I think it is my fault and blender side problem^^;

    because now blender should use Eevee for material view.. and actually we use it often with cycles. but it not offer scene setting without we change render engine.

    (but I apologize, actually about this issue it is my fault sorry, though what I requested is not wrong I think ^^;)

    Then Xin to confirm do you have Akiko for genesis3 skin? (not aiko 7)

    https://www.daz3d.com/akiko-for-mei-lin-7

    if you have it I really hope you test it. (it need another character,,Mei lin so I can not expect it others have the skin or not

    actually the material is my main character skin, then I have never seen it can be imported correctly with EEVEE. so it is why I keep to use my custom shader then usualy apply it for all character with change in blender.

    After understand my mistake, I try again with Akiko without use my custom material, it still not show eye correctly with eevee and principled bsdf.

    you may check (just to confrim my self) these setting pic.

    Of course it work without problem if I use csutom version. shader.

    The difference is so heavy for me, (include other skin materials) then I have not expected, plug in conversion much. (but now days I hope if plug in can offer reliable mat, I may hope to use it for other characer without everytime re-arrance by myself.

    This time, I check all again, so may not do mistake ^^;

    about this skin it seems not generate double principled for cornea because it not use any diffuse texture and refraction weight for cornea. (so about this case it need not)

    I planed to close this topic, with apologize to take yours time, but if you have same product test it please with principled option. I may test bsdf option later (but it may work I suppose, it already use almost same shader for me, then usually I use same shader for most of eye only change textures.

  30. Xin

    Ok, I tested it. See the attached .blend: [Refer to .blend in new Issue]

    There are several problems with the way the addon currently sets up Blend modes.
    That's the main issue here, not the node set up itself
    (although at the end I will point out a current weakness of the current node set up).

    1- The Eyelashes for some reason are set up with Blend Mode = Alpha Blend,
    when it should be Alpha Clip (for hairy stuff, this is the best Blend Mode option in Eevee).

    2- Pupils and EyeSocket are fully opaque and that's correct. No issues here. I removed EyeSocket from the .blend so the file is smaller in size.

    3- Irises are Alpha Hashed and that's right.
    Any mask that is fading stuff should be set up to Alpha Hashed.
    Why? because Alpha Blend tends to have sorting issues,
    and doesn't play well with Screen Space Refraction.
    In the attached blend, check the cubes/plane collection to understand the problem.

    4- EyeMoisture is set with Screen Space Refraction (SSR), this is a very common set up.
    The alternative set up has the EyeMoisture set to be fully Alpha clipped, effectively removed, and the "moisture" effect is done entirely on the Cornea & Sclera. This is what V7 does.
    That set up is very good for Eevee since you get rid of one refractive surface,
    so double refraction issues don't arise.

    In this example though, that isn't the case. So let's continue,
    assuming we leave EyeMoisture with SSR.

    5- Cornea & Sclera: these share the same geometry, they are attached.
    It's very common to find masks here.
    From the discussion above, these masks should be
    in a shader with Alpha Hashed since EyeMoisture has SSR.

    So here the addon fails again, and uses Alpha Blend on the Sclera,
    which has the Alpha mask. So we set it up to Alpha Hashed to correct it.

    Another issue with the addon right now is that it's setting Blend Modes of materials
    with Alpha == 1 to Alpha Hashed or Alpha Blended seemingly arbitrarily.
    An easy check that could be made to avoid potential issues with transparency is the following:

    if material's alpha == 1 (and is using Principled node):
        Blend Mode = Opaque
        Shadow Mode = Opaque
    

    Period, no reason to set it up to anything else if it's fully opaque and is using the Principled node. We do this for the Cornea then.

    The Cornea is also refractive, so here a potential issue arises:
    since the EyeMoisture already has SSR, we can't have another surface with SSR
    behind it, Eevee can't handle more than 1 refractive surface.
    Any refractive surface behind the first one is simply made invisible and
    completely ignored by Eevee. This works to our advantage here, but we lose some accuracy.
    The Cornea has Transmission == 1, so it should have SSR enabled.
    This pretty much makes the Cornea completely invisible from a shading perspective.
    In Cycles, the Cornea would still have a minor effect in the final shading.
    This is the current weakness of the Principled method.

    I will try to find a solution by trying to avoid using SSR,
    at least for the EyeMoisture and see what I get.

    6- We are done, now the eyes should work properly without doing ANY change at all
    on the current node setup.

  31. engetudouiti reporter

    At first thanks take time, to be frankly said if you check akiko skin, I expected if you change mind to avoid double principled bsdf,, but it not matter. It is good to know you find solution without change current principled bsdf option. I thanks you take time and may test it for study. actually I do not use EEvee often. so I need more knowledge if I use it for final render.

    Then what I really concern and can confrim (we all agree is)

    The Cornea is also refractive, so here a potential issue arises:
    since the EyeMoisture already has SSR, we can't have another surface with SSR
    behind it, Eevee can't handle more than 1 refractive surface.

    to solve issue, aploach change by each one. Then I think we may not change mind. you may mimic it without use custom shader (simply use transparent with glossy + clear coat if you like then not use prinicipled transmisison at all) but use scene setting.

    Alessandro seems test new idea with some options (shadow terminator ) etc,,

    I am now thinking, so I depend Thomas , then how it will be.. or keep as same as before, but use your recommend setting.

    I have thought long time, I am most stubborn person who like myself way, but now I feel. almost all of yours seems somohow same as me ^^; ( I do not say bad meaning, but I feel fun,, we really like self idea, and may not change it easy)

  32. Alessandro Padovani

    Xin, the reason the plugin uses alpha blend is because it seems alpha hash can’t show the transparency color, while alpha blend does. It sould be used only for thin glass though as fix for #332. If it is used for transmapped materials then it’s a bug.

    For transmapped materials, as for daz hair, the best option is alpha hash, since alpha clip tends to “clip” too much.

    I agree that refraction can go with opaque, though I don’t see artifacts using alpha hash as a general purpose setting.

    edit. Once you can sort it out a nice case list, you may want to check and add comments to #332 #333. Or even better open a new issue for blend modes and shadow modes. Just to make it easier for Thomas to read. I myself get a bit confused here.

  33. Xin

    engetudouiti, yes, the test I will do next is with the Transparent BSDF, since this one doesn’t have problems like SSR. I will try later.

    Alessandro, the mask in the example above is being applied on an opaque surface. The incorrect Alpha Blend, as opposed to Alpha Hash, is done on the Sclera, which is not refractive. So the coloring issue is not relevant here. See the .blend to understand it.

    The problem was that the addon uses Alpha Blend for hair, that’s a big no. Whether alpha hash or clip is a matter of taste. I prefer Clip since it’s not as noisy and plays way better with animation.

  34. Xin

    Yes, I will test the Transparent BSDF as both Alessandro and engetudouiti suggest, since it’s a very promising solution for thin layers, and we can get rid of the problems SSR has.

    I will summarize everything in another issue then.

    Alessandro, check the .blend, it might clear your doubts. I made sure to separate the eyes' parts so you can see it better. Maybe you can come up with a better idea using your solution too.

  35. engetudouiti reporter

    I agree with each mat, Eevee need to change blend mode setting (alpha hash, or alpha blend)

    to use custom node (it include transparent shader as refraction part) I always keep use alpha blend mode long time. so did not know why yours show non color render . believed if you did not set transparent color .

    about hair I need to change, then basically I use alpha hash.. even though I set it, eevee hair is not good for me.. (then if I adjust opacity map for eevee only with use contrast or color ramp, , it usually effect for cycles version..

    I may need 2 version textue for both about hair oapcity map.

  36. engetudouiti reporter

    Anyway thanks yours.. ^^ .. after test and study each case with your suggestion, I may try another thing .. but alessandro I do not agree to use alpha 0.2 etc ^^; you should not do please.

  37. Alessandro Padovani

    Xin, The blend mode bug is now reported in #334, just for Thomas to get it better.

    Engetudouiti, I agree that alpha 0.2 is not so good, it’s just an extension of the bsdf idea. #333 is now improved with ray clipping.

  38. Xin

    Here is the same eye .blend comparing the SSR solution with the Transparent BSDF solution (which is pretty much the current solution for the BSDF method): [Refer to .blend in new Issue]

    Note that I ignored the Clearcoat part for the Transparent BSDF method, but that’s just a matter of adding it.

    In my opinion, using SSR for thin films with almost zero roughness is a waste, it introduces all the limitations of SSR (SSR screen edge fading; inability to layer thin films; performance cost; inability to handle Alpha Blended surfaces behind; having to tweak the refraction thickness in the material settings; etc.) with negligible gains (I think the shading is a little better with SSR out of the box, but it’s a matter of taste and it’s a tiny difference). The way the SSR algorithm works is also not sophisticated, it’s not real refraction calculations like in a path tracer (it’s a screen space algorithm). The real advantage is the roughness input and the handling of IORs != 1. But those are irrelevant in this case.

    I agree with engetudouiti here, switching to the Blend method (transparent BSDF) for handling thin films in the Principled method under Eevee might be the better option and simplify the increasingly complex algorithm to set up eyes in Eevee with the Principled method. Alessandro proposed pretty much the same too, so I think he agrees too.

    If Thomas really feels like it, maybe he could offer both solutions for Eevee (the corrected Principled as explained above which uses only principled nodes, and the Transparent/Principled hybrid that is less limited).

    One note: I used Alpha Blend for the Blend Mode of the Sclera, now that we can use Alpha Blend with Transparent BSDF, but I think I still like the Alpha Hashed Blend Mode for the Sclera masks, it gives the eye more volume. Just try changing the Blend Mode of the material “Sclera-1.003” and see the effect. This is a subtle issue, but we might as well settle it now too.

  39. engetudouiti reporter

    Ah OK,, I think it seems better to talk in clean topic (I udually add many un-necessary things , so maybe it make difficult to Thomas check all.

    And about this issue actually, It was my simple mistake. I hope yours forgive me to take many time..(,Thomas, Alessandro,,Xin)

  40. Alessandro Padovani

    Engetudouiti it is always interesting to me to read your posts, Xin’s too, no time wasted at all.

  41. Log in to comment