Do ID maps even work? - maybe solved

SnowSultanSnowSultan Posts: 3,596
edited October 2023 in The Commons

Can someone tell me definitively whether Canvas ID map renders or the Material ID color in the Surfaces panel work AT ALL?

I tried giving each surface's Material ID a different color and when I rendered a Material ID canvas, the whole thing was green. Once in a blue moon, certain colors will render separately, but they're almost always different from the colors you give them. Is this because the original meshes for DAZ products are not baked with ID maps? I don't even care, I just want to know if it's worth wasting any more time trying to get surface selection masks out of this program. Thanks.

Post edited by SnowSultan on

Comments

  • This product makes use of the Mat IDs:

    https://www.daz3d.com/oso-toon-shader-for-iray

     

  • SnowSultanSnowSultan Posts: 3,596

    Thank you, but I'm asking if you can generate simple, solid color ID maps from Studio like you can in Blender, Substance Stager, and probably every other program that can render.

  • cgidesigncgidesign Posts: 442
    edited October 2023

    It works for me (tested with various 4.2 versions).

    But there is the issue, that DS does not always use the user chosen color but decides to put one of its own.

    E.g. in the screenshot my color for the lower donut is blue but DS puts yellow - colors of the cylinders are also wrong.

    I think it has to do with a DS internal missmatch of object ID and surface ID or something like that.

    MID.jpg
    1304 x 1096 - 162K
    Post edited by cgidesign on
  • SnowSultanSnowSultan Posts: 3,596

    cgidesign: Thank you very much. Can you tell me how you set up the canvas for that render? I must be missing something because when I do it, sometimes only one or two surfaces are colored. Are you able to get it to work when there is more than one surface per object?

  • cgidesigncgidesign Posts: 442

    Yes, it works with two surfaces on one object (in the example I have used the geometry editor to create a new surface on the cylinder).

    The ID Canvas is all DS default - I did not make any custom settings for it.

    MID2.jpg
    646 x 775 - 64K
    MID3.jpg
    517 x 1232 - 59K
  • SnowSultan said:

    Thank you, but I'm asking if you can generate simple, solid color ID maps from Studio like you can in Blender, Substance Stager, and probably every other program that can render.

    Yes but you also asked if "Material ID color in the Surfaces panel work AT ALL?" -- so yes it does. I have not spent time trying to figure it all out as to how though.

  • SnowSultanSnowSultan Posts: 3,596
    edited October 2023

    I'm still getting really different colors than I'm setting, but I guess it's working well enough. Knowing that the colors don't always match will at least make me stop worrying that I'm doing something wrong. Thanks very much.

    Still doesn't work.

    Post edited by SnowSultan on
  • SnowSultanSnowSultan Posts: 3,596
    edited October 2023

    I put different ID colors on every surface of these boots, I think there were 16 in all. This is the result I got, so I once again need to ask - is there any reliability at all in making ID masks in DAZ Studio? If there isn't, it's fine, I really just need to know what my options are. Thanks.

    bs_id.jpg
    1200 x 960 - 116K
    Post edited by SnowSultan on
  • mdingmding Posts: 1,243
    edited October 2023

    @SnowSultan:

    These shoes have 6 surfaces and I gave them 6 different Mat IDs (colors). Only the Shoe Lace ID color was correct, the others were changed, as you can see in the screenshot (click to enlarge). Still, 6 surfaces and 6 colors were achieved.

    In esha's tutorial https://www.daz3d.com/daz-studio-training-intermediate-03--render-canvases-and-postwork she also encounters that change of colors, but the only important thing seems to be to have different colors in order to be able to create masks in Photoshop or GIMP.

    But when I use another pair of shoes, also with 6 surfaces i get only 3 colors(click to enlarge):

    The reason seems to be that the first prop used 6 different materials in its' 6 surfaces, while the latter prop had 6 surfaces but 4 of these surfaces use seemingly identical material surface settings: Seemingly, because although using the same base color map they use different parts of this map due to the uv mapping of the mesh (uv islands).

    To change that you can in this case copy the base color map 4 times, give it different names and insert them into the 4 base color slots of the "identical" materials. And now you have 6 different colors (click to enlarge):

    BTW the ID material colors seem to mix with the base color and the colors of the base color map resulting in the color changes.

    t2.png
    1920 x 768 - 220K
    t3.png
    1920 x 774 - 233K
    Post edited by mding on
  • SnowSultanSnowSultan Posts: 3,596
    edited October 2023

    Mding: Thank you, I think I'm starting to get more consistent results after seeing your examples and testing a few things. Apparently the IDs don't render with the DAZ PBR Shader, and it helps if you just apply a 'blank' default Iray shader (with no textures, although you'll probably want to prevent the Opacity map from being changed) to everything first, then manually change the ID and Diffuse colors. I made nine shader presets that do this, and when applied to a shoulder pad that had eight material zones, all eight rendered in different colors.

    *Maybe* problem solved?  :)    Thanks again.

    Post edited by SnowSultan on
  • mdingmding Posts: 1,243
    edited October 2023

    @SnowSultan:

    That is weird, because the kind of shader (PBR/iray/3dl) shouldn't be the problem, but rather when 2 surfaces have identical surface settings. Then they are "perceived" as same materials and receive the same Material ID and with that the same color ( it is a mat id canvas and not a surface id canvas after all). That is why i had to rename the identical base color maps in my second example, to fool the system into believing those materials were different.

    The idea of canvases is to render different aspects of your image to continue to work in postwork (e.g. adding DOF, adding effects, textures or props in the background. So you render like 4 renders (canvases) at once and easily finish using those layers at PW in photoshop.

    That is not possible with your tactics, as you now changed the material and can't render all canvases at once anymore. If that never was your aim, then you wouldn't really need to use canvases, but could use your shader presets to achieve the same, and even better results (as you control the colors).

     

    Post edited by mding on
  • SnowSultanSnowSultan Posts: 3,596

    but could use your shader presets to achieve the same, and even better results (as you control the colors).

    Unfortunately that isn't possible either because Iray doesn't appear to be able to render absolutely flat colors. It will either add AO (even if you use a completely white HDRi) or emissives will bleed into nearby areas.

    Changing the textures does, as you said, require two passes to get all of the canvases you need, but I don't think it's THAT much trouble if it's accurate. At the moment though, I'm working on figuring out the best way to get a Studio scene and all its materials into Adobe Stager, where it automatically renders ID and object passes and doesn't use a ridiculous SSS system.   :)

  • mdingmding Posts: 1,243

    ok, just wanted to be sure there is no misunderstanding.

    Btw i remember in a dreamlight tutorial there was the suggestion to always use 3delight for masks for precision. Maybe that would be an option if you render seperately anyway?

    Anyway, good luck with your project.

  • Catherine3678abCatherine3678ab Posts: 8,342
    edited October 2023

    SnowSultan said:

    but could use your shader presets to achieve the same, and even better results (as you control the colors).

    Unfortunately that isn't possible either because Iray doesn't appear to be able to render absolutely flat colors. It will either add AO (even if you use a completely white HDRi) or emissives will bleed into nearby areas.

    Changing the textures does, as you said, require two passes to get all of the canvases you need, but I don't think it's THAT much trouble if it's accurate. At the moment though, I'm working on figuring out the best way to get a Studio scene and all its materials into Adobe Stager, where it automatically renders ID and object passes and doesn't use a ridiculous SSS system.   :)

    It can render flat colors with the Oso Toon Shader, which comes with a pdf tutorial on how to. 

    Also: https://www.daz3d.com/forums/discussion/493731/osotoon-feedback

    And the Commercial Thread: https://www.daz3d.com/forums/discussion/232771/oso-toon-shader-for-iray-for-sale-commercial/p1

     

     

    Post edited by Catherine3678ab on
  • SnowSultanSnowSultan Posts: 3,596

    Btw i remember in a dreamlight tutorial there was the suggestion to always use 3delight for masks for precision. Maybe that would be an option if you render seperately anyway?

    Yes, 3Delight can do it too, in fact I used the Mask and Multipass Toolkit available in this store for years. It requires manually changing all the shaders from Iray to 3Delight anyway though, so my way isn't really any more difficult. I've managed to make 16 different colored shaders that will make ID masks this way, and I'll see if I can share them in the future. Probably going to stick with rendering in Studio anyway, as it's really a headache to get all the necessary textures over to Stager (should be easier if we ever get USD export though).

    Thanks for the help. 

  • I've been mentioning a product which atm is not on sale however I recall it being one of the + for a day items one year. So this is the month to watch for it if interested in trying it out.

  • SnowSultanSnowSultan Posts: 3,596

    I've had trouble with previous Oso shaders breaking with new releases of Studio, so I wanted to find a more stable technique for making IDs. Thank you for the information though.

  • Oh dear, I hope this still works. Haven't tried using it for awhile. But yes every now and then some upgrade to "any" program can make some products not work as expected. I know 'cause I've lost a few things along the course of time too.

  • RAMWolffRAMWolff Posts: 10,212

    Color ID maps.... are you exporting to OBJ format when you've assigned the diffuse color map?  I don't remember if there is an option to export with that or just with textures, with textures SHOULD save out the diffuse color and appear in other programs with a color assigned to it.  Some programs don't record the exact color though.  For instance, if I have colors assigned in ZBrush say a shirt, sleeves are blue, shirt is read and piping is yellow.  I'll save that out, reimport and the colors are all changed but the color information is retained.  

Sign In or Register to comment.