G8.1 pbrskin detail
daz studio 4.15.0.2, blender 2.93.4, diffeomorphic aebc9f5
This is related to #656. This is a conversion of the G8.1 pbrskin detail section. The purpose of the detail section is to use a tiled bump map to overlay details to the standard bump map. Until now we ignored the detail map and only imported the bump map.
Below it’s the detail section for the Victoria 8.1 face material and the cycles conversion. Please note that we use overlays to mix the bump map and the detail since they're both normal maps, that's the same as we do to mix HD expressions in #406.
If the bump or the detail normal map is missing we may use the (0.5,0.5,1.0) color instead that's zero for normal maps.
mapping scale x = 1 / detail horizontal tiles
mapping scale y = 1 / detail vertical tiles
mapping location x = detail horizontal offset / 100
mapping location y = detail vertical offset / 100
Then below the comparison between iray and cycles. Test scene included v81-detail.duf. In this scene I disabled the skin translucency and reflections to focus on bump. We can see that for some reason cycles tends to be a little bit blurry compared to iray, but overall it's quite fine.
As a side note, there are a couple small bugs in the actual pbrskin implementation.
- The volume node is generated even if the translucency section if off in the pbrskin shader. If translucency is off then there's no translucency nor sss nor volume in the pbrskin. It's just diffuse.
- The bump map is generated even if the bump section is off in the pbrskin shader.
Comments (5)
-
repo owner -
reporter Commit 896f006 doesn’t seem to work fine. Below the conversion as it is done where there are a couple issues. You can use as reference my conversion above that’s how it should be for the face material of the test scene v81-detail.duf.
- The “detail specular roughness mult” texture is not used for the diffuse bsdf shader.
- The normal map node is an input of the overlay node, this way the mix doesn’t work.
As for your questions yes 100 is for cm to meters. I believe the default for normal maps should be (0.5,0.5,1.0) so if there’s no texture it’s zero, this is the same in blender when we add a new normal map node.
p.s. Rearranging the material code sounds a bit scary, though I agree a better distinction of the shaders should make it clean. Unfortunately I don’t get time for extensive tests so if there are bugs we’ll meet them in time.
-
repo owner OK, the mistakes should be fixed now. The strange thing is that rendered images looked quite fine.
I noticed that the detail normal map can be either a normal map or a height map, so I added support for the latter. The bump textures are added with a multiply-add node:
final bump = main bump + detail weight * detail normal map.
-
reporter Commit e3fedf0 works fine.
As for the “height map“ mode I’m not sure what it means, that’s why I left it out. When I set the height mode in daz studio the details are lost. Eventually I’ll open another issue or reopen this one when I get a daz figure using the height mode.
Marking as resolved for now.
-
reporter - changed status to resolved
- Log in to comment
Implemented in last commit. I cleaned up a lot of ancient code in the process, so there is a risk that something broke in the process, but the most common characters seem to work well.
Should the default normal map color be (0.5,0.5,1) or the srgb-corrected value?
Is the division by 100 a conversion from centimeters to meters?