single principled bug in blender 4

Issue #2053 resolved
Alessandro Padovani created an issue

1.7.4.2124

It seems in blender 4 the single principled mode can’t keep the texture corrections, as gamma or mix or multiply nodes for example. Below an example with the G8F torso material. In extended principled we have the base color and ior level correctly connected, while in single principled all the texture corrections are lost.

Blender 3 works fine and keeps the texture corrections. So this is limited to blender 4.

As a remainder, if it helps, the purpose of single principled is to remove the extended groups after the principled node, so to only use a single principled node for the materials, that may be better handled to export to game engines, or as base to create optimized materials.

steps:

  1. easy import G8F as single principled

note. An option to remove the texture corrections for single principled could be interesting though. I mean if we want the textures to drive directly the material channels. Of course this would simplify the materials even more, and allow for more merging when we merge materials. Basically this way the materials would become “texture driven“ as it happens in games where the materials are baked to single textures.

Comments (18)

  1. Alessandro Padovani reporter

    p.s. Of course I’m not asking for the new “texture driven“ option if this complicates things too much or you believe it is not useful. We can easily modify the single principled materials anyway.

  2. Alessandro Padovani reporter

    update. errata corridge.

    Nope, now that I look it better even in blender 3 there’s some missing correction nodes, for example in the Torso the specular is not multiplied. But the gamma correction works fine while it’s missing in blender 4. So it seems there’s some confusion in both, let me know if something is not clear.

  3. Alessandro Padovani reporter

    update. fbx exporter ?

    I’m just wondering, if you did this on purpose to be more compatible with the fbx exporter this may be good. In this case you should also remove the gamma multipliers in blender 3 I guess. I never tested extensively the fbx exporter so don’t really know its limits, I can give it a look if it helps, let me know.

  4. Thomas Larsson repo owner

    I was trying to learn about unreal engine a couple of months ago, and found that textures were not imported properly unless the extra nodes between the texture and principled shader were discarded. Since the single principled mode is primarily intended for export to game engines, I thought that it should not contain nodes that mess that up.

    I made some new buttons in the rig_daz addon, Make Unreal and Export Unreal, that further optimize the figure for UE and export an fbx file with suitable settings. But I haven’t worked on this for a while and don’t remember details.

    Edit: Trying the Export Unreal button again I couldn’t find where the exported file ended up. Probably somewhere in some UE folder. Now it uses a standard file selector so we can put it where we want.

  5. Alessandro Padovani reporter

    I see, it may make sense since single principled is intended for games. In this case you may want to look at the blender docs for fbx, basically it is supported textures with uv mapping nodes, and normal maps. So you need to remove the gamma nodes too in blender 3, as eventually the whole sss channels since sss is not supported.

    steps:

    1. in blender 3 easy import G8F with single principled

    https://docs.blender.org/manual/en/latest/addons/import_export/node_shaders_info.html

    note. I’d keep “fbx compatible“ as an option though. Since single principled can also be used as a way to get simple shaders to adjust by hand, together with “build unused textures“ in the global settings, in this case we should keep the extra nodes.

    Let me know.

  6. Alessandro Padovani reporter

    p.s. I don’t use the rig module and I’m not interested in exporting daz figures to game engines, since dual quaternion is not supported there so jcms can’t work fine. What I’m concerned with in this discussion is single principled for eevee, where we want to keep the extra nodes to get simplified materials with “build unused textures“, as per the original concept.

  7. Thomas Larsson repo owner

    In the last commit a new FBX compatible material method is introduced. It skips all nodes between the textures and the principled node, also in Blender 3. Single principled skips extra nodes after the principled node, but keeps everything before it.

  8. Thomas Larsson repo owner

    With the fbx method, sss is now ignored, and so is bump.

    One way to test this is to export the figure to fbx and import it back into Blender. I found that transmission seems to be ignored, although the docs state that it is handled. One of the things done by the Make Unreal button is therefore to delete vertices using materials with transmission, e.g. cornea and eyemoisture.

  9. GeneralProtectionFault

    @Thomas This is a side note to this issue, but I just wanted to mention this thing here in case you hadn’t seen it, just because you mentioned Unreal:

    https://github.com/xavier150/Blender-For-UnrealEngine-Addons

    That exports figures from Blender into Unreal. The only thing is, it doesn’t do materials. However, a while back, I tried DAZ’s Unreal bridge to get the materials into Unreal, exported a figure I had imported w/ Diffeomorphic and then exported to Unreal with that plugin ^^^…so I had 2 copies in Unreal, one from Diffeo + that export, one from DAZ => Unreal bridge. I set the materials to the one exported from Diffeo/Blender to the one from the bridge, and it kinda worked. Only problem is, it was a little confusing if there were complexities like geografts and the materials were a bit overdone.

    Just mentioning this because if you’re looking at Unreal, that repo might have a lot of good info.

    Mainly, I abandoned this workflow because, typical DAZ product, the Unreal Bridge is a poorly maintained & buggy fluster cluck 😂. Crashed if I tried to include morphs on my figure, just one example.

  10. Alessandro Padovani reporter

    Personally I believe that DAZ figures and assets in general are not good for game engines, for various reasons, so I don’t even try to export. The fact that DAZ is selling interactive licences for their assets is plain shit imo, they just can’t work, unless with heavy limitations and/or a lot of rework. On the other side blender with eevee can provide acceptable results with extended principled.

  11. GeneralProtectionFault

    I think it depends on your intent. If you’re making a game with realistic textured people, you might want to start with a DAZ figure. If you’re doing something art related, it’s hard to deny Unreal's rendering capabilities are disturbingly good. Also, there’s the megascans library, which unfortunately are free only if the end product is done in Unreal.

    Either way, I think the most annoying thing with game engines is trying to get the material right because it’s never identical.

  12. Alessandro Padovani reporter

    Well the only way I can see to make a DAZ asset work in unreal is too much work for my taste, especially considering that you have to pay the interactive licence apart for each asset, they should do the work for me. Anyway if one wants to try I’d go as follows.

    1. import in blender with diffeomorphic to get good materials and support for geografts and shells
    2. animate in blender
    3. optimize the geometry so hidden polygons are deleted
    4. make a fresh uvmap without udims and bake all materials to pbr textures
    5. export as usd mesh sequence to bake jcms and dual quaternion, other than morphs and eventually simulations

    https://docs.blender.org/manual/en/latest/files/import_export/usd.html

  13. Alessandro Padovani reporter

    Yes of course, thank you. I was keeping this open for you to read the comments by GPF about UE if interested.

  14. Log in to comment