Do the shader lights cast shadows?

KhoryKhory Posts: 3,854
edited December 1969 in Daz Studio Discussion

I really like the look of renders done with the shader lights (light presets/DS Default) but I swear I am not seeing any of them cast either kind of shadow. And since someone was nice enough to add them it would be super if they were fully useful.

And on a similar note. Why does saving a light not give you the option to not have it over ride the other lights in the scene? The shader lights do that and newly created light presets do it. I've been saving them as a scene subset..but it makes the save as a light preset less than handy. I can see times when you would want lights to remove the old lights but it isn't logical that it is the only save option. I think holding down control prevents the over ride but it doesn't give the pop up option window to choose. And to be honest not everyone knows to try that trick.

Comments

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    No, Shader Lights do not have shadows...

    I think, but am not 100% sure, that even though there is a shadow brick in them, it is not connected...or at least not properly connected. It's an old problem that looks like it's not been fixed.

    As to the 'over ride'...I think it has always been that way.

    Why?

    I can't figure that one out, but there has to be a way to do it...

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    You've got me mystified, guys. Which shader lights are you talking about? If it's shader mixer lights, they do cast shadows for me... At least they did in DS3... Now you've spooked me, I fired up DS4,set up a boring test scene and created a distant light and a spot light in the shader mixer. Both lights cast both DSM and raytraced shadows just fine.
    Area lights also cast shadows just fine in DS4, at least those from IG's Photo Studio LE freebie.

    Did I misunderstand what lights you were referring to?

    dsm.png
    618 x 800 - 425K
    raytrace.png
    618 x 800 - 272K
  • KhoryKhory Posts: 3,854
    edited December 1969

    I don't recall them from studio 4 but in studio 4 if you go to light presets there are a set of shader lights. Spot, distance and point and while they tend to do wonderful things for skin textures they are a bit tricky to deal with. No shadows and they overwrite lights you already have saved in the scene. I've re saved them as scene assets to use them myself.

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Interesting, thanks for the explanation! It's intriguing, what is so special about them that they work wonderfully for skin... I'll dig them out and try to take them apart after I get some sleep =)

  • KhoryKhory Posts: 3,854
    edited December 1969

    The only explanation I currently have runs perilously close to the phrase "and then magic happened". In other words I am just not really sure.

  • BejaymacBejaymac Posts: 1,846
    edited December 1969

    Those look a lot like the ones that used to be part of the Script Dev Kit in DS2 & 3. if they are then I don't think they were ever meant for general use, more as examples for people learning to write script.

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Guys, I've figured out what's wrong with the shadows, it's delightfully easy to fix. Unfortunately I don't understand where exactly the when-added-to-scene behaviour is located, so we'll have to deal with the Ctrl-click.

    Go to your DS4 installation, then scripts/support/DAZ/rendertime/light

    You'll see three files:

    dzDistantLightAttribs.dsa
    dzPointLightAttribs.dsa
    dzSpotLightAttribs.dsa

    Open each in a text editor and do a search for DzLight - it's a variable that's not declared. You should find two instances per each file, in the Shadows sections, under the comment headings

    // --- Shadows
    // If we're dealing with shadows 

    Replace DzLight with the respective correct name: DzDistantLight, DzSpotLight, DzPointLight - two replacements per each file. You'll get something like this, for the spotlight:


      case DzSpotLight.DeepShadowMap:
    --snip--
      case DzSpotLight.Raytraced:

    Save and enjoy.

    Obligatory super boring render with a shader point light =D Remember point lights can't cast DSM, only raytraced shadows.

    spherescenedsmdistantlight.jpg
    618 x 377 - 43K
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    They are pretty much 'standard' RSL lights...except for the shadows not working...

  • KhoryKhory Posts: 3,854
    edited December 1969

    Go to your DS4 installation, then scripts/support/DAZ/rendertime/light

    Since I'm only seeing this does that mean I need to install the sdk?

    I was thinking I could just pull the lights into shader mixer to fix the disconnected shadows. But guess what? It does not seem to like DSON files.

  • BejaymacBejaymac Posts: 1,846
    edited December 1969

    DS4 has most of the Script Dev Kit built in, so I'm not even sure if there is a DS4 version available to download, just the Software Dev Kit for making plugins.

    In 4.5 on a PC you'll find the files Mustakettu85 is talking about in "Program Files/DAZ 3D/DAZStudio4/scripts/support/DAZ/rendertime/light".

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Bejaymac is right, the scripting SDK is built-in with DS4. It's just not advertised as such =)

    Yes I noticed it too that shader mixer does not read these files, but I believe it's because they predate it. They appear to be hand-scripted.

  • mjc1016mjc1016 Posts: 15,001
    edited December 2012

    One of the things I like about them, even more with shadows, is that they are fast...one of the fastest raytraced lights in the tool kit...because they are more or less 'standard' rsl lights.

    Ctl-click brings up the dialog box allowing you to replace all, replace selected or add...I know there's a way to adjust the script to do that automatically...maybe I'll get a chance to look into that a bit later (I think it will be another simple edit)...

    Post edited by mjc1016 on
  • BejaymacBejaymac Posts: 1,846
    edited December 1969

    They wont open in Shader Mixer for the same reason you can't open HSS or UBER in the SM, they are stand alone shaders, they need to have been built in SM for them to load back into it.

  • KhoryKhory Posts: 3,854
    edited December 1969

    Must not be my day. A search of my computer does not turn up those files. Oh well.

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    That's so strange o.O If you're on Windows, I could only imagine that these files could have somehow gotten marked as "hidden" on your system, then explorer won't see them with the default settings.

  • nDelphinDelphi Posts: 1,846
    edited December 2012


    dzDistantLightAttribs.dsa
    dzPointLightAttribs.dsa
    dzSpotLightAttribs.dsa

    I found the files and made the changes, but they don't load for me. When I execute them from the Script Editor I get:

    Executing Script...
    Script Error: Line 27
    ReferenceError: Can't find variable: Shader

    Do I have to do something else with this scripts?

    I am running DS 4.5

    Post edited by nDelphi on
  • BejaymacBejaymac Posts: 1,846
    edited December 1969

    You just edit those files, you use the DUF files in "My Library\Light Presets\DS Defaults" to load them.

  • nDelphinDelphi Posts: 1,846
    edited December 1969

    Bejaymac said:
    You just edit those files, you use the DUF files in "My Library\Light Presets\DS Defaults" to load them.

    OK, then they work. LOL!

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    I know it should be a simple matter to make them pop up the dialog box instead of having to hold down the ctl key...but for the some reason I'm not seeing it. The default choice is set to 'replace'...which should probably be set to 'ask'...or at least 'add'.

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    If you did the manual fix, don't forget to back up the 3 files, before you upgrade to the latest release. They will be replaced by the 'original' versions...

    Or you could, like I did, because I forgot to back them up...do it again. (yeah the files aren't changed any in this release).

Sign In or Register to comment.