- edited description
additional material(diffuse overlay) missing when imported to blender
i got stuck with an issue about the face makeup related materials, to be precise in blender the makeup node does seems to be generated but doesnt have any influences to the final output. Also there is no tweaking(like visibility, in daz i can do with scrolling the diffuse overly weight) options about the makeup so i guess theres something happening.
ill post my settings. as u can see in the node example the makeup material starting with VAMP~ is connected to DAZ overlay node yet no difference. hoping for some advice thanks in advance
Comments (29)
-
reporter -
reporter - marked as minor
-
daz studio 4.21.0.5, blender 3.6.0, diffeomorphic 1.7.1.1692
The makeup works fine, be sure to update to 1.7.1 since there’s many bug fixes. Below it’s Victoria 8.1 with makeup imported with extended principled as in your example. In your images the makeup is very subtle even in daz studio so may be you just need to adjust it a little. You can add a multiply node on the fac, or remove limits and adjust the makeup weight in daz studio that will be imported as a multiply node.
Then if the issue isn’t fixed for you, upload a test scene as simple as possible, with the exact steps to reproduce the issue.
note. Especially for G81 figures wearing G8 materials there’s a recent bug fix so be sure to update to 1.7.1.
-
- changed status to open
-
daz studio 4.21.0.5, blender 3.6.0, diffeomorphic 1.7.1.1692
bug. regression. texture alpha channel is not used.
Nope, you’re right there’s a bug with the overlay. Below an example g81-v8mu.duf it’s G81 wearing a Victoria 8 makeup. Below I fixed it we see that the texture has color and alpha because it’s a png with alpha channel, where alpha is used for the fac. What happens is that the plugin uses color for the fac instead of alpha. This is a regression this bug was fixed long ago.
# daz overlay if texture has alpha use alpha for fac
-
- attached g81-v8mu.duf
test scene for G81 wearing a V8 makeup
-
bug. regression. extended principled uses volume for skin.
Also the extended principled option uses volume for skin instead of sss. Again a regression.
I included a test scene for the various material types. Please note that for bsdf we use volume for refraction, but not for principled. Reason is extended principled is intended to be used both with cycles and eevee, but eevee can’t render volumes for objects, the eevee volume is always approximated as a cube, so we only make volumes for pure volumes where there are no other options.
# extended principled if there's translucency and volume it's a kin use sss if there's only volume it's a volume use daz volume if there's only translucency it's translucency use daz translucent if there's refraction # eevee can't render object volumes it's refraction don't use volume
-
- attached uber-test.duf
test for uber materials
-
repo owner The alpha slot should be used if the grayscale image modification = alpha, otherwise use the color slot. The plugin now does this in a general way, and not just in a few cases. However, this was a quite big change, and some new bugs may have sneaked in.
-
Commit 2debf7f.
The overaly bug is fixed. Not the extended principled materials.
-
reporter yes the figure i tested was the exact situation uve mentioned, gen8.1figure with gen8 materials applied(well, at least the face one) and having that issue. btw in my settings i was using 1.7.1.1620/blender 3.5/daz 4.20
ill try the file and update the addon and see how it goes
-
reporter looks great with the new version! TY i appreciate everything :)
havent tested too much but at least no errors i guess with those two, seems alright from now on
one thing ive noticed that in DAZ when the “diffuse overlay” has the exact value 1.00 ->the nodes in blender omits the multiply noed(but i guess it looks like the value of 1,good)
wheras if its between 0 to 1 ->then it does generates the node. Still both cases looks well than the previous version.
so im just wondering if i have to manually shove in the multiply node just for perfection or not
-
@vnrk In general the materials are optimized, that means unnecessary nodes are pruned.
@Thomas Let me know if something is not clear for extended principled. Specifically for “there’s refraction“ I mean ior > 1 because ior = 1 is no refraction. That distinguish volume from refraction as you can see in the test scene. That is, in iray the only way to render volume is to use refraction with ior = 1. Then principled must always use sss for skin.
note. workaround. Actually if we set “sss skin“ in the global settings then the extended principled works fine, apart that we have to delete the volume node for refraction (ior > 1).
-
repo owner I was indeed confused because the volume mesh in the test scene uses refraction, but I figured out that you had to mean ior != 1 too. Now the only case when volume is used with extended principled is when
- Refraction weight = 1.0
- Refraction index = 1.0
- Thin walled is off.
For the volume node to actually be generated we also need that the absorption and scattering distances > 0 etc.
Question: Should we remove the surface and displacement outputs if the volume node is generated? That makes the test scene look more like DS.
-
Commit 3e6d89d. The sss skin is good.
Answer. No, that would be wrong, because the material could have a glossy color or a top coat for example. But there’s a bug.
bug. principled base color for volume. Actually the base color in the principled shader is computed from the volume properties. This is good only for refraction where we take into account the volume colors to approximate the glossy color. But for volume the base color in the principled shader should be the glossy color alone, without volume colors, because the volume colors are already in the volume.
# extended principled if volume is generated (refraction == 1, ior == 1, thinwalled == off) principled base color = iray glossy color
-
bug. volume with top coat. I see if there’s a volume the top coat is not generated for extended principled. I’m providing another test scene where the volume has glossy color and top coat.
-
- attached uber-test-2.duf
volume with glossy color and top coat
-
repo owner Top coat etc are now generated. However, I don’t think they matter, because there is a thin walled node which shadows everything that comes before it, both for extended principled and bsdf. This is inevitable, I think, because after all the refraction weight = 1 and that must manifest itself. Besides, renders look similar to DS, both for bsdf and extended principled.
-
Commit 49d6871.
bug. top coat position. Nope, top coat comes last, that’s why it’s called “top“ because it’s last. Then yes daz thin wall == 1 prunes the preceding groups you didn’t have to change that.
translucency > diffuse > glossy > top coat
-
repo owner Top coat position fixed, both for bsdf and extended principled.
-
Commit 179a7e4 works fine.
I have a question please. It’s not wrong per se but in my test scene I see that refraction uses the principled refraction, while volume uses the bsdf refraction. Why is that, I mean how do you decide that in the code ?
As I understand it for extended principled would be nice to use the principled refraction when possible. If the material is 100% refractive and we only have a single glossy color it should be possible to use the principled refraction. Again this is not a bug but rather an “optimization”, so I don’t want to break anything here. Let me know.
# principled vs bsdf refraction if refraction weight == 1 and share glossy input == on use principled refraction else use bsdf refraction
note. code edited for corrections
-
repo owner The plugin uses principled refraction if
- Refraction weight = 1
- IOR != 1 (so no volume).
- Base mixing != weighted
But now I see that I introduced a bug yesterday. Principled refraction should also be used for thin wall.
-
repo owner Bug fixed, so point 2 above is now IOR != 1 or thin wall.
If share glossy input == on, specular tint = 1.
For other settings, I found the following comment which you must have written long ago.
if thin walled is on then there's no volume and we use the clearcoat channel for reflections principled ior = 1 principled roughness = 0 principled clearcoat = (iray refraction index - 1) * 10 * iray glossy layered weight principled clearcoat roughness = 0 if thin wall if off principled transmission = 1 principled metallic = 0 principled specular = 0.5 principled ior = iray refraction index principled roughness = iray glossy roughness
-
Commit 72130ea.
bug. bsdf refraction. Yes, now that you say it commit 3e6d89d above used principled refraction for the volume so something is changed. Unfortunately commit 72130ea doesn’t fix it back because bsdf refraction as daz thin wall is still used for the volume.
Apart the base mixing, you may try my code above for principled vs bsdf and see if it does the trick. I mean if you can’t figure out what’s changed.
update. I believe the culprit could be lines 268-272 in commit 49d6871 where you changed isPureRefractive(), but I may be wrong I suck at scripting and your code is quite complex for me.
-
update.
To get the idea, ideally below it’s how the volume material should come out in uber-test-2.duf, with principled refraction plus top coat plus volume. Please note that the base color is yellow, the same as the glossy color in iray, it doesn’t take into account the volume colors because there’s volume already.
# extended principled if volume is generated (refraction == 1, ior == 1, thinwalled == off) principled base color = iray glossy color
-
repo owner Hopefully it works now.
-
Commit 76552e8 is good enough, I’m marking as resolved.
note. possible improvements. I see that for 100% refraction we always use the principled approximation, even when principled can’t do the iray material, this could be improved. Also metal seems to confuse volume detection, this could be improved. For a practical use I believe the current implementation is good enough, eventually I’ll open other issues if I notice serious problems with the extended principled conversion.
Thank you for the fixes so far.
-
- changed status to resolved
-
reporter Ths for all the efforts
- Log in to comment