How to add 2 Shaders to 1 Surface.

cschneicschnei Posts: 0
edited December 1969 in Daz Studio Discussion

I created my own shader with the shader-mixer. (a rim-shader, but every other shader will work too)

Now i want to add this shader to one of the genesis figures that has already a skin-material or skin-shader applied.

The result should contain the normal colors of the previously applied skin plus some manipulation that comes from my own shader (extra white).

How is this possible?
Cause everytime i "apply" my shader via the shader-mixer apply-button it overwrites the whole surface.

I tried to import the shaders/materials into my shader mixer. But "import->material" showed no result (nothing happened).
I searched for a brick that gave me the result of the previously applied material/shader so that i can manipulate and reuse it, but no success.

Is there any way to use my shader with one of the existing skin shaders/materials or do i have to reprogram these shaders with all bump/diffuse/ambient and so on from scratch?

The existing standard toon shader reuses the previously applied materials so there seem to be a working way.

Thanks for helping.

Comments

  • DestinysGardenDestinysGarden Posts: 2,550
    edited September 2013

    OK, I think I know what you are after, but let me make sure I've got this correct. You made your own shader with shader mixer and you want to apply it to a figure that has existing texture maps, right?
    The term shader can be sort of vague. Basically in DAZ Studio, a shader is a collection surface parameters. Texture maps can be included, but they don't have to be. It isn't possible to apply more than one shader to any one surface. The new one always overwrites the old one.
    Typically if you want to apply a new shader to an object but keep the image maps in place, you hold down the CTRL key while you apply the new shader and a dialog box will pop up. Chose the option to ignore maps and it will apply the shader "underneath" your image maps so to speak. BUT....this doesn't work with shaders created with shader mixer. There has been much discussion, and many feature requests to allow it, but I vaguely remember the official word was that shader mixer was functioning as DAZ intended. Short answer, yes, a shader you make with shader mixer will overwrite any other surface settings and wipe out all the texture maps too. That is just how it works. You would have to go into each channel and reapply maps in diffuse, bump, displacement, opacity, etc.
    Do you have an example of what the end result of your shader would look like? We may be able to come up with alternate solutions.
    hope that helps.

    Post edited by DestinysGarden on
  • JaderailJaderail Posts: 0
    edited September 2013

    DAZ Studio can not LAYER shaders out of the box. A Shader effects all the Render channels when applied to a surface in normal use of standard shaders. The Uber Environment 2 shader uses a Shader Builder Brick (I think) to add a second layer. I'm afraid that is a area of DAZ Studio I do not understand. You could try making A Geo Shell (create Menu) setting it to No textures in Surfaces and then Apply your second Shader to it. That might get the effect you are looking for.

    That's my best guess anyway.

    Post edited by Jaderail on
  • martinez.zora77@gmail.com[email protected] Posts: 1,346
    edited December 1969

    If shader which you want change is made in shader mixer you can import it with File --> import from scene. If shader was made with shader builder or scripted you can't, when you try to do it nothing happen.


    With shader builder input parameters matching in type and name aren't overwrites. So, you need include this parameters in your own shader. I suppose shader mixer is the same. But if you need preserve the output of processing/mixing inputs this approach is useless. You need get access to final node. It is only possible with shader mixer shaders.

    Another way, I'm not sure, may be scripting.

  • BejaymacBejaymac Posts: 1,851
    edited September 2013

    When you import from scene, what you are getting is a carefully scripted Shader Mixer shader that mimics the settings you had on the default surface shader, or if the shader was made in the Shader Mixer to begin with then you will have access to the bricks, it doesn't work for 3rd party shaders like HSS & USS.

    To get what you want means making your own surface shader.

    Post edited by Bejaymac on
  • Richard HaseltineRichard Haseltine Posts: 97,322
    edited December 1969

    The term shader can be sort of vague. Basically in DAZ Studio, a shader is a collection surface parameters. Texture maps can be included, but they don't have to be. It isn't possible to apply more than one shader to any one surface. The new one always overwrites the old one.

    What you are describing is a Shader Preset which applies settings, possibly including a specific Shader (the actual code that tells the renderer how the surface behaves).

    As already explained, you can't simply apply one shader on top of another - what you can do is create, or import, the skin shader and then copy and paste your rim shader into the same network and blend them - at the simplest by feeding the final opacity and colour of each through a mix or binary function brick and then passing the combined result to the root brick.

  • DestinysGardenDestinysGarden Posts: 2,550
    edited September 2013

    The term shader can be sort of vague. Basically in DAZ Studio, a shader is a collection surface parameters. Texture maps can be included, but they don't have to be. It isn't possible to apply more than one shader to any one surface. The new one always overwrites the old one.

    What you are describing is a Shader Preset which applies settings, possibly including a specific Shader (the actual code that tells the renderer how the surface behaves).

    Well, yes. I was going with the idea that a shader collects and defines the surface parameters that can be altered, and a shader preset is a script that modifies what those exact values are, but I'm not saying it right. To say the term shader can be sort of vague was a reference to the fact that term "shader" gets used (often incorrectly) to describe both the actual base shader, and shader presets, when they are different things. Now I hope we haven't confused anyone beyond repair.

    Post edited by DestinysGarden on
  • cschneicschnei Posts: 0
    edited December 1969

    Yes! The "Geometry Shell" did the job for me. Thanx Jaderail.

    It's not the perfect solution, cause i'm not able to re-use the colors and normal-maps of the surface underneath the shell inside my own shader (or am i? has the geometry shell some hidden features?).
    But it alows me to "overpaint" everything and to add extra luminosity.

    Its true, the terms "shader" "materials" and "presets" are realy confusing in daz3d.

    The fact that you can only import some materials into the shader mixer, doesn't make it easier.

    Right now i'm only testing. But later i want to buy different shaders (especially skin materials) and want to change them in every possible way.
    I don't want to recreate every shader from scratch.

    How do i know which shaders can be imported or edited before buying in the shop?

    Are there any good skin shaders that use the "Shader Mixer"?
    Are all "Shader Builder"-Shaders editable as well, how do i detect a "shader builder"-shader before buying?
    How can you edit the "Aiko 5 Skin" Material or any other 3rd party shader? Is this possible? Are they precompiled or editable with a special 3rd party program?

  • Richard HaseltineRichard Haseltine Posts: 97,322
    edited December 1969

    The new(ish) SSS Shader included with DAZ Studio 4.6 is a Shader Mixer "skin" shader.

    If a surface uses the DAZ Default shader it can be imported (converted) into Shader Mixer, the other add-on shaders (Pw-so-and-so and uber-so-and-so) can't.

Sign In or Register to comment.