Problem with UV after merging geographs

Issue #427 resolved
LS created an issue

After merging NGFV 8 with body mesh, Default UVs node for New Genitalia For Victoria 8 - Color Layer node disappears and whole node becomes unusable.

Example before merging:

And after merging:

After that genitalia using only textures from base female body. I tried to make same thing with UDIM, tried to merge UV maps, but nothing actually helps.

This issue reproduces for me on 1.5.1c build and on latest one: Diffeomorphic-import_daz-6cec2b48917f

Comments (14)

  1. Thomas Larsson repo owner

    Weird. It worked for GP, which is what I normally use, but not for NGV8. Anyway, merging should work now, for freshly imported characters. It will not work out of the box for old characters though, because the importer adds some new custom properties to the mesh to keep track of which uv set should be merged with the body uvs. Old characters don’t have this information, and instead the active render uv set is merged.

    So for old characters, you must make sure that the Base Female uv set is the active render set, indicated by the camera icon. This is already the case for GP but not for NGV8. So you have to do this before merging:

  2. Thomas Larsson repo owner

    After thinking a bit more, I came up with a better solution. The Merge Geograft tool does not merge any UV layers anymore. However, it does replace any texture coordinate node in the geograft materialswith a named uvmap node, which points to the active render map. This ensures that the geograft is rendered in the same way before and after the merge.

    I have tested with GP and NGV8, and it works for both, but in different ways.

    GP has texture coordinate nodes and the active render uv set is Base Female. That is replaced by a named uvset node pointing to Base Female.

    NGV8 doesn’t have any texture coordinate nodes, so it doesn’t matter which uv set is active render.

    If you want to merge uv layers, you can use the Merge UV Layers tool afterwards.

  3. Alessandro Padovani

    As for commit 3749b93 this gets the drawback that the material doesn’t show in the preview, it seems that a texture coordinate node is needed for the preview to work. The rendering works fine though so if you want to go with this solution you may add a note in the docs about this.

    I’d also be curious myself why the uv map node doesn’t show in the preview if @Xin or @engetudouiti may help better.

  4. Alessandro Padovani

    Also may be this issue should be fixed in 1.5.1 too, or a note added about selecting the right uv map first.

    p.s. Then having to select the uv map first is a viable fix too anyway, if the user is aware of it. This has the advantage that no new commits are needed for 1.6.0 or 1.5.1. A note in the docs would be enough.

    p.p.s. Sorry I forgot the easy import so yes an automatic solution is needed at least for 1.6.0.

  5. Alessandro Padovani

    update.

    It seems that if we only use the texture node then everything works fine. That is, we don’t use the uv map node at all and we only use the texture node both for the textures and the shells. This way both the preview and the rendering work fine. Though I have no idea how this can work since we don’t define any custom uv map this way. But may be blender is clever enough to get it from the uv map list.

    Please Thomas verify it yourself. I tested both futalicious and ngv8 and this seems to work here. Below the material preview shows the futalicious texture mixed with the base female body texture, that’s what expected for the futalicious material.

    edit. I didn’t test blender 2.7 or 2.8, this seems to work with 2.9 at least.

  6. Thomas Larsson repo owner

    Tried to use texture coordinate nodes instead of uvmap nodes, but it doesn’t work for Golden Palace. The preview shows all uv maps, but the renders depend on the active render uv map.

    However, I like the logic behind the current setup. The Merge UV Layers tool could fix previews by replacing UV map nodes back to texture coordinates again.

  7. Alessandro Padovani

    I can confirm for some reason it doesn’t work for golden palace. Can’t understand the difference with futalicious. Well we tried at least.

  8. Thomas Larsson repo owner

    As I indicated above, the Merge UV Layers tool has been changed instead. It is now only possible to merge to the active render layer. If an UV map node for the active render uvlayer is found, it is replaced by a texture coordinate node instead. So we get a good preview of the background part of the material.

    Note that it now makes sense to merge an uv layer to itself, to get rid of uv map nodes.

  9. Alessandro Padovani

    Apart the preview not working as expected, commit 56844af seems fine to me. If LS has nothing to add we may mark as resolved.

  10. Log in to comment