DS4 Default Shader Plus Development thread [WIP]

adamr001adamr001 Posts: 1,322
edited August 2012 in Freebies

So I've been trying for, well, basically two years to make a shader that mimics the DS Default Shader but exposes the hidden parameters as well as adds an Ambient Occlusion function. I'm getting close. Finally! There are still a few caveats and a few gotchas but it's nearing the point where it is showable.


Caveat 1: Each Lighting model of the default shader gets its own "Plus" Shader. This is necessary to expose additional options on a per "lighting mode" basis.
Caveat 2: This shader adds AO. Period. It's not something you can toggle. It is on or it is off. I have an idea of how to get around this but I'm not "there" yet.
Caveat 3: CTRL+loading of the shader will allow you to respect maps. However, it still wipes out strength settings, etc. No idea how to fix that yet, be happy I got maps working. LOL.

Here's the first sample. DAZ Default Shader, Lighting Mode Skin on the left. DDSPlusAOSkin shader on the right.

Thoughts? Anyone interested? Anyone want to test? :)

ETA: Lighting in this test scene is simply 3 distant lights with raytraced shadows. :)

aoss_r2_001_skin.jpg
1000 x 1000 - 37K
Post edited by adamr001 on

Comments

  • Wiccan1Wiccan1 Posts: 198
    edited December 1969

    Hi adamr001,

    I am not a huge coder or scripty person, so these balls are deceptively simple. You may want to explain a bit more what you are trying to achieve with this?

    Just an honest comment. :)

    Now knowing what yoiu are capable of, and admiring your work, I looked a bit closer... I really like what I am seeing. I see a softer gradient in lighting transition between the lights and darks. The material on the left tends to absorb more. I wish the material were a bit more varied, I think it would show off a bit more of what this can do.

    I really like where this is going.

    Really people. you have to enlage it to see the details. I like that it is not so "over the top." Makes it look more natural.

  • adamr001adamr001 Posts: 1,322
    edited December 1969

    That's very true. I kept the scene simple so as to not confuse people what we're looking at here, but I think a more complex render is in order.

  • Wiccan1Wiccan1 Posts: 198
    edited December 1969

    I am so glad you got your avatar back, I hardly recognized you before! :D

  • zigraphixzigraphix Posts: 2,787
    edited December 1969

    Looks interesting to me! I might be able to try to squeeze in a test... (I'm in the middle of teaching two sections of statistics, but I think I need a break!)

  • adamr001adamr001 Posts: 1,322
    edited August 2012

    Cool, thanks Zig. It's a pretty typical shader as far as use goes... Mainly just need people who understand such things to verify that I've got all the bits and pieces named correctly, etc.

    Here's two more files... open them in new windows and alt-tab between them and you can really see the difference. (Only the skin surfaces were changed).

    zz001_with_ao.jpg
    2000 x 2000 - 116K
    zz000_no_ao.jpg
    2000 x 2000 - 118K
    Post edited by adamr001 on
  • Wiccan1Wiccan1 Posts: 198
    edited December 1969

    This is much better! You can really see the changes. Applause my friend. I like where this is going indeed. What versions of Daz Studio is required to test?

  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited December 1969

    Hi Adam

    If you want someone for testing and giving a little hand, I'm in

    That could be a good alternative on Uber lights if you only want Occlusion on a few materials.

    Did you also include a switch to enable or disable Raytracing?

  • KeryaKerya Posts: 10,943
    edited December 1969

    Oh yes!!!
    Please!

  • adamr001adamr001 Posts: 1,322
    edited December 1969

    Wiccan1 said:
    I like where this is going indeed. What versions of Daz Studio is required to test?

    Any of the DS4.5RCs will do I believe as the presets will be dependent upon the .duf format.


    Did you also include a switch to enable or disable Raytracing?

    It's on my wishlist but it's probably not going to happen until Rev3. I haven't given up on the idea of this yet, but it's considerably more complicated and my knowledge of the Shader Mixer is still considerably far from complete.

    I haven't figured out how to do that yet or make a proper toggle for AO (My feeling has been that this last bit isn't actually required since you can just use the equivalent original default surface if you don't want AO).

  • Eustace ScrubbEustace Scrubb Posts: 2,698
    edited December 1969

    Will there be a Toon Shader version, as well?

    What we REALLY need in ShaderMixer is a toggleswitch node: a sort of If-ElseIf that uses BUTTONS instead of dials.

  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited December 1969

    adamr001 said:
    Wiccan1 said:
    I like where this is going indeed. What versions of Daz Studio is required to test?

    Any of the DS4.5RCs will do I believe as the presets will be dependent upon the .duf format.


    Did you also include a switch to enable or disable Raytracing?

    It's on my wishlist but it's probably not going to happen until Rev3. I haven't given up on the idea of this yet, but it's considerably more complicated and my knowledge of the Shader Mixer is still considerably far from complete.

    I haven't figured out how to do that yet or make a proper toggle for AO (My feeling has been that this last bit isn't actually required since you can just use the equivalent original default surface if you don't want AO).

    I think you could do presets for DS4 if you used shadermixer and provided the bricks used are compatible. I thought you had done it with RSL coding. This would have been easier to code for the raytracing and activating or deactivating AO

    Concerning the AO toggle switch, it 's a "nice to have".

  • adamr001adamr001 Posts: 1,322
    edited August 2012

    Will there be a Toon Shader version, as well?

    What we REALLY need in ShaderMixer is a toggleswitch node: a sort of If-ElseIf that uses BUTTONS instead of dials.

    There is an If-Else operation. I'm working on how to make it apply in this situation.

    ETA: Re: Toon - I haven't even looked at that yet sorry.

    Post edited by adamr001 on
  • adamr001adamr001 Posts: 1,322
    edited August 2012

    Glossy Metallic Tests

    Default Glossy Metallic on top, AMRSAO Glossy Metallic on bottom

    GlossyMetallicTest_01_AMRSAOR2.004_.jpg
    2000 x 2000 - 97K
    GlossyMetallicTest_01_Default_Raw.jpg
    2000 x 2000 - 102K
    Post edited by adamr001 on
  • TheNathanParableTheNathanParable Posts: 1,051
    edited December 1969

    Just so you know, something which I learnt from making my Visual Style shaders, setting "Max Distance" to 0 disables Ambient Occlusion (as in, actual disabling...boosts render speed significantly). It's the preferred way of disabling Ambient Occlusion, as attempting to set the "Strength" to 0 ends up darkening the entire surface (unlike most 3d packages, that start with white and add ambient occlusion to it, Daz Studio works by starting with black and adding light to it...for some strange reason).

    Well, that's with the Shader Mixer version of Ambient Occlusion anyway, not sure if your version is different.

  • adamr001adamr001 Posts: 1,322
    edited December 1969

    Yup, thanks BT. I'd learned that lesson :) It's probably easier to just do it the way you said... I have been attempting a logic gate toggle... e.g., published variable with a value of 0 or 1 to either use the AO path in shader mixer or the non-AO path.

    Wasn't having great luck with that, so the Max Distance method looks like a winner. Now maybe I can get back to finishing these. :D

Sign In or Register to comment.