Shaders and layered image editor

Hello

I would like to create a shader that allows to add and / or modify the layers of a property

- for example to add a layer on the image of a bump which already has several layers (so without remove existing layers)

- or on apply the shader remove only one layer and keep all others

I turn around and don't find a solution.

Could yo help me please ? THank you !!!!

Comments

  • That would be a job for the layered Image Editor, which (through a Layered Image Preset) can add layers - however, I don't think there's a way (short of a custom script) to remove selected layers with a file.

  • Yes that's what I feared : no way to do it in one click. Maybe with a script but I don't find easy way to aborde this for only that (I don't want to become a scripter)

    Thank you for reply and if an idea come don't hesitate, maybe a trick :)

  • JonnyRayJonnyRay Posts: 862

    You could do it in Shader Builder for a limited number of maps for different settings. Say if you wanted to allow for up to 3 Bump Maps. In the builder, you'd just check to see if BumpMap2 (for example) had a value and if so multiply the results from the lookup for BumpMap1 by BumpMap2, repeat for BumpMap3. But it wouldn't work for an arbitrary number of maps.

    Also worthy of note is that Displacement is handled differently and doesn't really allow you to modify the maps within the shader. Probably because Displacement is handled by the engine before the surface is given to the rest of the shader.

  • Thank you JonnyRay. 

    I had indeed seen Shader Builder but not knowing how to use it I didn't look into. But now that I know it's possible with, so I'm going to look for tutorials for this tool ! :)

  • I'm little familiar with php langage and I hope I could understand DAZ scripting. 

    It's not difficult.

    I would like to add/remove and/or replace a line :

    For example replace bump2.jpg by bump3.jpg

    Or add another bump layer in one image-library set

    Replace that :

    "image_library" : [

    {

    "id" : "bump",

    "name" : "bump",

    "map_size" : [ 1600, 1600 ],

    "map_gamma" : 1,

    "map" : [

    {

    "url" : "/url-link/bump.jpg",

    "label" : "bump.jpg",

    "color" : [ 0, 0, 0 ],

    "transparency" : 1,

    "invert" : false,

    "rotation" : 0,

    "xmirror" : false,

    "ymirror" : false,

    "xscale" : 1,

    "yscale" : 1,

    "xoffset" : 0,

    "yoffset" : 0,

    "operation" : "alpha_blend"

    },

    {

    "url" : "/url-link/bump2.jpg",

    "label" : "bump2",

    "color" : [ 0, 0, 0 ],

    "transparency" : 0.3,

    "invert" : false,

    "rotation" : 0,

    "xmirror" : false,

    "ymirror" : false,

    "xscale" : 1,

    "yscale" : 1,

    "xoffset" : 0,

    "yoffset" : 0,

    "operation" : "alpha_blend"

    }

    ]

    },

    by

    "image_library" : [

    {

    "id" : "bump",

    "name" : "bump",

    "map_size" : [ 1600, 1600 ],

    "map_gamma" : 1,

    "map" : [

    {

    "url" : "/url-link/bump.jpg",

    "label" : "bump.jpg",

    "color" : [ 0, 0, 0 ],

    "transparency" : 1,

    "invert" : false,

    "rotation" : 0,

    "xmirror" : false,

    "ymirror" : false,

    "xscale" : 1,

    "yscale" : 1,

    "xoffset" : 0,

    "yoffset" : 0,

    "operation" : "alpha_blend"

    },

    {

    "url" : "/url-link/bump3.jpg",

    "label" : "bump3",

    "color" : [ 0, 0, 0 ],

    "transparency" : 0.3,

    "invert" : false,

    "rotation" : 0,

    "xmirror" : false,

    "ymirror" : false,

    "xscale" : 1,

    "yscale" : 1,

    "xoffset" : 0,

    "yoffset" : 0,

    "operation" : "alpha_blend"

    },

    {

    "url" : "/url-link/bump4.jpg",

    "label" : "bump4",

    "color" : [ 0, 0, 0 ],

    "transparency" : 0.3,

    "invert" : false,

    "rotation" : 0,

    "xmirror" : false,

    "ymirror" : false,

    "xscale" : 1,

    "yscale" : 1,

    "xoffset" : 0,

    "yoffset" : 0,

    "operation" : "alpha_blend"

    }

    ]

    },

     Please give me help ! :)))))

  • JonnyRayJonnyRay Posts: 862

    I haven't done Daz Script at all; so can't really help there myself.

    But you might also try asking some questions in the Daz Script Developer forum. Many times people with specialized interests (like scripting) may not see a question in the more general forum.

  • ok you're right, thank you

Sign In or Register to comment.