3delight Opacity and shadow color quesiton (shader builder)

kitakoredazkitakoredaz Posts: 3,526
edited June 2015 in Daz Studio Discussion

Hi I made simple "diffuse and opacity only" shader with image maps, to learn shader builder, from scratch.
then my question is about " opacity strength" and shadow color.

As default, there are alraedy "opacity strength" varialbe
(which can include opacity strength map)in daz user parameter)

(I dont know, why daz named it as "opacity strength" ? It cause miss understanding easy,,
I check RIspec, and 3delight shader document too, usually it simply "opacity color" as same as "surface color".
or named opacity, because the variable type is "color", not "float")

then if I set opacity strength map, with full colored (255, 0, 0) texture ,
keep opacity stregnth value = 1,

color (0, 255, 255) of wihte light, path through the surface, and make the (0, 255, 255) colored shadow.

I think it is reasonable, then I feel my simple shader work correctly. pic2

Then next, I hope to add opacity color parameter, to get same effect without texture.
I edit opacity macro. and set new Attributes name as (opacity color).
and just multiple the "opacity color" value in Evaluation code of opacity macro.

create user parameter Attribute (opacity color), then connect.then compile the shader again.

apply it, I set "opacity strength" texture none, (by macro it return color (255,255,255))
then I set oapcity color = (255, 0, 0).

my problem is ,it never make (0, 255, 255) coloered shadow. the shadow keep black.pic3

the shader work , if I set the opacity color as (255 255 255)
then add opacity strength map texture ( colored (255, 0, 0)) again.

Why it happen? what is difference, when I set color by map, or new color parameter?
both attirbute value was simply mutlipled, in macro code.
what need to get colored shadow?

blueshadow2.JPG
783 x 743 - 75K
nodes.JPG
872 x 748 - 116K
noblue.JPG
888 x 547 - 71K
blueshadow.jpg
600 x 400 - 47K
opacityshadow.jpg
600 x 400 - 63K
Post edited by kitakoredaz on

Comments

  • kitakoredazkitakoredaz Posts: 3,526
    edited June 2015

    I think there should be some problem, about DS user parameters "Opacity Strength" = "Os"
    Os Shader attribute type = default color . it is right.

    but daz set Class DzFloatproperty. it can not change by user.

    so that, we can not apply color value for Os which named "opacity strength" by daz (but it just daz named so,, it should be color proeprty)
    though I can set another oapcity color attribute, and multiple, and it can change Ci (surface color) ,
    but it not work for outoput Oi = (surface opacity)

    dzclass.JPG
    786 x 640 - 99K
    Post edited by kitakoredaz on
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    No, it is correct the way it is.

    A color as a float value is a black and white 'control'. Black is 0%; white 100%; various shades of grey, in between. So if it is a greyscale image map, like for hair, the white parts are opaque and the black transparent, with the various grey being translucent. That's where the linked Opacity Texture comes in, that image becomes the control.

  • kitakoredazkitakoredaz Posts: 3,526
    edited June 2015

    Hi, I do not aruge about Os = "opacity strength" then need to apply float value.
    if it is desigend by 3delight (renderman compatible) ,as defualt.

    but, it is just daz change way for Os.

    Os should be desigend which can apply RGB " color" too.
    though you can use it as Opacity strength ,if you apply grey scale color,
    color value can easy change to float value too.

    If it is desigend to apply float value (grey scale color) only,
    there is no need to type it as color.

    diffuse color = Cs shoud be color. and daz use DzColorProperty. it is reasonable.
    then add, diffuse strength type should be float, and use DzFloatProperty.

    and Os type is color, not float.

    if you check renderman shader document, or 3delight shader document,
    you can easy find Os . .

    Predefined Surface Shader Variables
    Cs color varying Surface color.
    Os color varying Surface opacity.

    there is no reason, we can not apply color value for "opacity=Os" for renderman shader.

    but daz way do not offer the way about shader builder. it is simply because, daz set float class for Os (but type = color),
    and force Os as " strength" only, not as color.

    After all, we must need to set "opacity texture" which connected to "daz Os".
    and mutliple color value with "daz Os" (strength only), to use Os as " light color filter".
    it simply limit original renderman Os. I think.

    of course we can use it, but I think, it never means the daz way is right.

    Post edited by kitakoredaz on
  • kitakoredazkitakoredaz Posts: 3,526
    edited June 2015

    If someone think, it is rigth way, I am wrong,
    I recommend to check shader mixer and use DS default material blick.

    then see inputs. there is opacity color, (but labelled opacity strength as daz way)
    input type is C. as default, not F.

    then apply the shader, without any texture. you can see opacity strength, (same as shader mixer)
    but the parameter can input as Color value. not float value.

    and without any opacity strength texture, it can wrok as expected.

    if you add image map and connect it to opacity strength, in shader mixer,
    then change Image map out put type = float, it is same as default daz material shader. and shader builder.
    (you can not input color anymore for opacity, without texture, or you need to add original "opacity color ")

    I am not at all deep knowledge about renderman shader, but at least daz change way,
    when they release shader mixer, about opacity . and I think it is right.

    opacitymixer.JPG
    972 x 780 - 137K
    Post edited by kitakoredaz on
  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    Now I hope to change question more simple.

    (I do not talk more there is problem or not,, because I know if I apply texture (eg color (1 1 1))
    the problem has gone,,)

    Then,,, if I use shader mixer, I can make such shader, and get such effect, without opacity strength texture.
    then I simply hope to make it by shader builder too.

    My quesiton is,, how can I achieve it by shader builder.

    because I thinkshader builder can more than shader mixer usually. (I hope so
    without it, I never touch it,,)

    or If manually write sl code it can work? no need to use Os ?

    the shader builder code and blick,, is one of my try, but it not work as same as shader mixer.
    (I tweak again (add texture blcik or change color to float etc,, but I feel it not work)

    maybe I miss something basic (I need to know many about shader builder still, just start one week to learn usage ,,)
    but I do not know the way. just hope to know the way. :roll:

    buildercode.JPG
    795 x 369 - 35K
    builderblicks.JPG
    812 x 441 - 51K
    filter.jpg
    304 x 445 - 20K
    filterscene.JPG
    1052 x 583 - 109K
    mixerblicks.JPG
    938 x 593 - 75K
  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    sorry add one pic,, the shader need to work like that (color filter)

    shadowcatch.JPG
    1101 x 678 - 126K
Sign In or Register to comment.