Custom daz displacement node not include displacement node, can it still work ?

Issue #390 resolved
engetudouiti created an issue

I do not know how many user use displacement map for daz assets, but when I import G2male creature, which already set displacement map with iray for most of skin (UV part)

Daz importer already have option, which import disp map, and generate custom node (and user can easy use adaptive sub-D with use displacement map, which usually auto- set iray displacement map node property values correctly (minimum and maximum with strength)

I remember I requested it to disp map work as same manner with use blender displacement map node. And it is customized by Thomas as custom nodes. (I usually did not test it carefully, after Thomas commit issue, but it worked at that time I remmber so)

The problem is,, when I check recent version add on imported material which include disp map,, add on generate custom displacement map node, and generate texture with set values. but the custom node seems not include any blender displacement map node but directly use diplacement map color value (non-color) as float, then connect it material displacement (vector)

At first look, when I check it in the node group, it seems may represent the value as same as daz iray displacement , but I do not think the way is correct. (actually) you may better include blender displacement map node, and convert it as vector to output, (blender displacement map node actually work so), or current add on custom disp node may use same float value for all displacement vector component I feel.

though your way make conversion of daz displacement (iray) propertys more simple circulation, but you could do it with use blender displacement node, (so we can safety convert daz iray disp prop values as blender disp node props, then generate final vector for displacement I suppose. and it may offer more reliablity about your custom disp node)

I remember I attached how convert it, before in old github, but unfortunately I seems lost link (which you commit before, which simply convert iray props as blender dispnode props. of course if you actually confrim it work for all case, I may not against your customize way.

Comments (14)

  1. Thomas Larsson repo owner

    Does it matter? If a float is fed into the displacement slot, Blender has to make some kind of conversion, and I imagine it would be the same as introducing a displacement node. Although it may be clearer to make the conversion explicitly. I guess that Height = float value, Midlevel = 0, and Scale = 1 are the right parameters.

    Although I recall that in issue #379 I had to introduce a minus sign to make the displacement go in the right direction. Perhaps this is related.

  2. engetudouiti reporter

    It matter. because so you plug and modify float value witch work with daz props. then now final out put vector( X Y Z) component may change like this (0.7, 0.7, 0.7 etc ) for each pixel . the vector will be used as displacement from the point.

    but when I test with real B and W image in iray, it did not break plane mesh only effect deform along with plane normal. with rotate mesh, it still only effect plane normal.

    So I think, daz iray displacement may only move mesh along with normal direction. like this scene.

    Then I simply import this scene. with duf and json.

    now it show like this

    If you use blender displacement map node, then convert, you may not see such deform with import duf and json (the plane already divided enough) (you need to set the material setting>displacement> as displacement only.)

    At current plug in auto-set material setting as bump only, even though the mat generate displacement map too.

    btw even though I did not rotate the plane, and export, you may see deform work for wrong angle . (not along with normal)

    about Blender offer default displacement node, it has option (object, and world), so I usually set it as Object, then it may show same deform as daz iray.

    You may better test it with daz high poligon plane, then actually add image for iray surface,

    at same time I seldom render with daz iray, though do not clear remember, how adjust gamma setting for those image so I suppose if I need to edit gamma setting for the jpg (which used for disp)

    But it seems not matter for deform direction.

  3. engetudouiti reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  4. engetudouiti reporter
    • marked as bug

    Then when I use blender displacement node, with use same texture (and adjust the node prop from daz property, value), it work without problem. so I change this as bug (Now I confrim it as real problem)

  5. engetudouiti reporter

    Then as you said if I make custom node with use daz prop, actually your ways not wrong. but you need to use it for blender dsiplacement node.

    Height = float value, Midlevel = 0, and Scale = 1 are the right parameters.

    yes I may almost did same thing, but may change scale 0.01 (actually after all it may show same effect, if you input value as cm.

    I remake it for my practice, then it seems work , the custom node is like this

    just use converter (Color to BW) for get the color input (you may need not it)

    this custom version dispnode, need to input min and max as cm (so it need to input same value as daz iray disp)

    I do not think, attached image is good to generate by script. then add blend file (with packed disp image) + custom node (which use blender displacement map)

    you may test with parameter, and compare with daz iray. the cube is 1m cube. (you need to apply same values as daz )

    ==
    In the image I set color srgb it just forget to correct it, when I add disptexture but it should be non-color (as I labelled for custom node input) I remember daz auto adjust gamma with each input texture type. then it is same we set as non-color for the disp map.

  6. engetudouiti reporter

    I frogot to keep normal socket as user input socket. Though I did not clear remember, daz could mix use disp with normal (or bump) correctly, but at least blender offer the socket. so there was no reason to hide it.

    (I may hope you remain it, like this, if you solve this issue with blender displacement node)

    The new attached scene, remain your node group to compare easy. you may clear see, the displacement not along with normal with your custom disp node. (of course in iray, it displacement along with normal)

    At same time if you do not use blender displacement node, it simply lost to work with object transform correctly. when you change scale of object, in iray it change displacement with object scale.

    It is not related with this issue, but I found blender viewport up-date problem with change displacement properties, (or transform mesh with displacement map) , then it often show broken geometry. To sovie it, I need to up-date render, (change shading mode etc) but if I use adaptive sub-D , with 2.91, it actually up-date without change viewport shading .(because it auto-update with view or when geometry change I suppose)

    So in my scene, I keep to use it , with “SImple” sub-D modifier, to test and compare easy.

  7. engetudouiti reporter

    And I forget to request important issue.. (it is reason why I check disp again), To test Xin offer VDM generator from HD, I hjappend to test with G2M creature, then it use usual displacement map for most of skin without bump.

    So without HD morph or VDM actually it show some detail with sub-D. but Daz importer not offer way to change each material setting from “bump” to “Displacement” with gloval setting or mat setting, so I need to change with select each mat one by one. (Do not know, if your material editor can do it easy or not, and blender offer way to change all mat with selection)

    So I request, you may add option, when mat use disp map node(usuall disp) change material setting as displacement or bump + displacement. ( bump only perfectly remove the disp meaning)

    I do not care, manualy change sub-D or, use adaptive, but change material setting for all mat of DAZ figure one by one, is matter.

  8. Thomas Larsson repo owner

    Implemented in last commit. The group has no multiply node for the strength, because that is done in code when the node is created. Here is a comparison between DS and Blender.

  9. engetudouiti reporter

    OK thanks. I do not think Eevee can manage displacement node (material) so it not matter. (maybe it show as bump? I do not know)

    mutliple with 0.01 in code or in node group not matter. but I just hope to remain, strength property as user easy input value . so if your current add on offer the input property, as user can set strength as same as daz, no problem.

  10. Thomas Larsson repo owner

    The multiplier has been moved from strength to the min and max inputs. It doesn’t matter for the output, but min in max should be given in meters (or whatever your units are) whereas strength is dimensionless.

  11. engetudouiti reporter

    OK it is actually no problem for me (we just need to know which unit clear, so if it work with meter, and it can covnert daz user input value, there have no problem)😀

    About strength,, I recommended not use disp node scale as user directly adjust. (so as you said it seems solved already,, with the new custom node, we may controll strength as reasonable float value , (most of case 0 to 2.0 ) before I need to set strength multiple with 0.01 in your custom node (then it showed same delta as daz)

  12. Log in to comment