Kettu's free stuff: lights, tutorials, etc

Mustakettu85Mustakettu85 Posts: 859
edited July 2014 in Freebies

Hi everyone,

Here are my best freebies so far, please enjoy!

- Mk85 Fantasy Lights and Portrait Add-On (extensive documentation included with each archive; Portrait Add-On optimised for GC on, gamma 2.2!):
http://www.sharecg.com/v/74356/gallery/21/DAZ-Studio/Mk85-Fantasy-Lights
http://www.sharecg.com/v/76371/gallery/21/DAZ-Studio/Mk85-Fantasy-Lights-PORTRAIT-ADD-ON

- a step-by-step walkthrough of using Shader Builder to get a nifty environment light shader "Envlight2" supplied with 3Delight standalone to be used in DS (I hope this tutorial is informative enough to facilitate your further endeavours into converting any other RSL shaders you may come across):
http://www.sharecg.com/v/75671/gallery/3/PDF-Tutorial/Alternative-Image-Based-Lighting-in-DAZ-Studio

- a 43 page "treatise" on subsurface scattering (and related stuff) as found in the UberSurface family of shaders; lots of pictures and examples (this is sort of a magnum opus of mine):
http://www.sharecg.com/v/76566/gallery/3/PDF-Tutorial/Subsurface-Scattering-in-3Delight-for-DS

- a companion tutorial to the SSS treatise about making opacity masks from pre-existing diffuse maps (remember: for render-only (non-product) usage, unless you have explicit permission to redistribute derivative works from the texture):
http://www.sharecg.com/v/76562/gallery/3/PDF-Tutorial/Creating-masks-from-diffuse-maps-in-Paint.NET


There is also a little more stuff in my ShareCG account, feel free to browse the gallery =)

I am willing to answer any questions you may have, but please bear in mind I am not online every day - I am very sorry.

These renders showcase my SSS techniques and the lights: the portrait is done with Fantasy Lights, the water scene - with the environment light shader Envlight2 (and AoA's fog camera for the haze). You will find material settings described in the SSS tutorial.

Thank you very much for taking a look! I wish you a lot of inspiration and awesome renders!

envl2water.png
720 x 1200 - 1M
vasc_noPW.png
1000 x 1200 - 1M
Post edited by Mustakettu85 on

Comments

  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    Hi again everyone,

    Thanks a lot to everyone who downloaded and/or rated my stuff, or followed my account! It is much appreciated.


    Daukkuuan on ShareCG asked for a material preset for Example 4 from the SSS tutorial - the one that uses default Bree textures for G2F.

    Even though the aim of this tutorial is to actually free DS users from relying on material presets and the like, I figured this might be helpful to other people as well.

    I have uploaded a file here:

    http://www.sharecg.com/v/76578/gallery/21/DAZ-Studio/SSS-Tutorial-companion-preset-for-example-4

    Unzip this archive into your "Content" or "My Library" folder.

    In the "Presets" folder, find the "Mustakettu85" one. There are two DS files:

    - Mk85_Bree-Example4.duf : a material preset for G2F corresponding to Example 4 from section II.2 of the tutorial, with one difference: eye reflection uses Omnifreaker's Park HDR map that comes with DAZ Studio;
    - PixieLight.duf : a scene subset with the lights used for Examples 4 and 5. For the IBL maps to work, you need my Fantasy Lights (see the first post for the link).

    Remember to turn gamma correction ON in your render settings and set gamma to 2.2, otherwise I do not guarantee the outcome!

    Important: please check the gamma correction settings per map in the Image Editor! DS somehow saves them wrong sometimes. To do this in the most efficient way, select in turn Templates 1 to 3 of your G2F and open the Image Editor for the following maps:
    - diffuse colour: gamma should be "0";
    - specular strength: gamma should be "1";
    - bump map: gamma should be "1".

    Diffuse colour is also loaded into SSS colour, same as the specular map is loaded into the strengths of both speculars, but you only need to set the gamma correction once: DS will update all channels using the same image.

    This information is included in the archive in the Important-Readme.txt file in the same folder.

    g2fpix_r2.png
    750 x 900 - 1M
  • KeryaKerya Posts: 7,185
    edited December 1969

    Thank you very, very much!

  • MilosGulanMilosGulan Posts: 900
    edited December 1969

    Thank you very much, i didn't have time to download it but i will as soon as i have some time. This looks really good.

  • KalisxKalisx Posts: 104
    edited December 1969

    Thank you so much for this share. Great job.

  • gingercakes47gingercakes47 Posts: 364
    edited December 1969

    Thank you for these links and products. :D

  • direwrath2000direwrath2000 Posts: 0
    edited December 1969

    I really appreciate these lights, lately I've been working to find some good light set ups for Studio that have a particular look that I am aiming for. And these are just gorgeous, and are actually really easy to set up.

    From a stubborn Poser user, thank you for these. :)

  • MaXieMaXie Posts: 8
    edited December 1969

    Thank you so much !!

  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    Thank you very much everyone! I'm glad you are enjoying my releases!

  • dakkuuandakkuuan Posts: 209
    edited December 1969

    I figured this would be the place to post this. I renamed Genesis' surfaces and attempted to use your bree settings on her and well... I got some weird results. Yeah and I made sure not to replace the images. It's just... odd. Is there some difference between Bree for G2F and Bree for Genesis that I'm not aware of? The first pic is G2F. The second is Genesis.

    Mk85_Bree_Test_G1.jpg
    500 x 500 - 57K
    Mk85_Bree_Test_G2F.jpg
    500 x 500 - 60K
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    dakkuuan said:
    I figured this would be the place to post this. I renamed Genesis' surfaces and attempted to use your bree settings on her and well... I got some weird results. Yeah and I made sure not to replace the images. It's just... odd. Is there some difference between Bree for G2F and Bree for Genesis that I'm not aware of? The first pic is G2F. The second is Genesis.

    To tell the truth, I never tried using G2 presets with G1 by renaming its surfaces, so I can't tell for sure. But it actually looks like you are applying Bree's dedicated "SSS colour" map somewhere, and you don't need it.

    If you look close at the preset I released, the original diffuse map is plugged into SSS colour (because in reality, a photo of a human being already accounts for the SSS in his/her skin and underlying tissues, where applicable). If you open the tutorial at p 27 and read on, you will see all this explained.

    The preset represents the "SSS-driven" technique, where we only use diffuse sparingly, if at all; while DAZ artists were using the "oldschool" diffuse-driven technique (see p.25 of the tutorial) when they designed Bree's maps, relying mostly on diffuse for skin colour and using those dedicated "SSS colour" maps to add even more "blood" to the nose and ears. Those hand-painted SSS colour maps are exaggerrated and will not give you the same look as using the diffuse photo-based map in the SSS channel.

    I suggest you recreate the G1-specific preset yourself, manually assigning maps and setting up strengths and colour multipliers, step by step. It is a good practice. Use p 42 of the tutorial for tips on how to select surfaces for performing this task with the most efficiency. Page 34 lists the same values that are used in the preset.

    Once you master this, you will be able to recreate this "soft" look with any texture set, for any figure. Yes it's a bit more work than simply using load-all presets, and then you will have to factor in geometry shells (p 18) for brows/makeup, but the results are well worth it, I daresay.

    And you can always save out your own presets =)

    And it also looks like the diffuse map for the iris material got lost somewhere in the conversion process. You can apply it manually, too.

  • Arnold C.Arnold C. Posts: 257
    edited November 2014

    - a step-by-step walkthrough of using Shader Builder to get a nifty environment light shader "Envlight2" supplied with 3Delight standalone to be used in DS (I hope this tutorial is informative enough to facilitate your further endeavours into converting any other RSL shaders you may come across)

    Thank you very much for this superb light shader! Great tutorial, easy to follow even for less experienced users like me.
    I maded a few alterations:
    in the Macro Block Editor under the "Initialization Code" Tab I changed the formula on the very last line from "CI *= %2%" (that %2% stands for "Intensity" in this case) to "CI *= %2% * 11". (See picture 1 below).
    That way you can leave the default values in the "User Parameters" for Intensity at 0..2 for "Range" and 1 for "Value" and "Default" alone and let them "Display as Percent" properly. An intensity of 11 seems to match the intensity of the UberEnvironment2 at 100% very closely, so if one wants to swap it with an EnvLight2 instead (and who would not!?), he can copy over the intensity value and the IBL Image and render with a more comfortable ambient light shader.

    Altering the value for the "Kenv" parameter, wich should act as a multiplier for the Intensity, has no effect because the variable isn't defined in the code... and I have absolutely no idea how to do that correctly.

    Next, at the "User Parameters" for the "Color" attributes I marked the tagbox named as "mapable" and from the "Choices" dropdown menu selected "envmap". (See picture 2),
    That way you'll get the combined image select/color picker-layout in DAZ Stiudio's Parameters Tab.

    At last I did put "Bias" and "Samples" into the "Shadow" Group instead of "Light" and in the Parameters Tab I set the shadow type selector to "Locked" and "Hidden", because if you try to set shadows to "Raytraced" or "Deep Shadow Map" the shader won't function correctly. It has raytraced shadows by default.

    I Did a few testrenders, all with default settings, an intensity of 11 (100%) and a sample rate of 64, the EnvLight2 is the only light.
    DS Render settings are all at default except Shading Rate, which is set to 0.5:

    The first one (Picture 5) uses omnifreakers "OmKitchen_EnvM.tiff" as IBL Image and rendered in 7 minutes 38.72 seconds

    The second one (Picture 4) uses DimensionTheory's "SoE-Sunny1.tiff" from the "Skies Of Economy" product and rendered in 7 minutes 52.37 seconds.

    The third one (Picture 3) uses the same as the second one and V6 has the transmapped "Thalia Hair" equipped. Rendered in 11 minutes 51.13 second. I prepared myself for a "rendering horror" session on this one and was really surprised how fast it was completed.

    I love the way your light illuminates her skin and her leather clothings... and I love the fact that it rendered them that fast and at theese low settings. That's what UE2 and AoA's Advanced Ambient can't deliver.

    Thanks again for my new favourite Ambient Light Shader... and the free Shader Builder training! :-)

    I vote for that this has to become a essential part of the "Default Lights and Shaders for DAZ Studio" package!

    2.JPG
    726 x 559 - 123K
    1.JPG
    579 x 615 - 85K
    EnvLight2-SR64FINAL-3.jpg
    1920 x 1080 - 203K
    EnvLight2-SR64FINAL-2.jpg
    1920 x 1080 - 189K
    EnvLight2-SR64FINAL.jpg
    1920 x 1080 - 197K
    Post edited by Arnold C. on
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969


    Thank you very much for this superb light shader! Great tutorial, easy to follow even for less experienced users like me.
    ...
    I vote for that this has to become a essential part of the "Default Lights and Shaders for DAZ Studio" package!

    Thank you very much for your interest in my free stuff and your kind words!

    It makes me particularly happy that you ventured further and customised the shader to your personal style. This means you have learned something and applied it to create your vision. I am proud to have helped you on your journey! This is what I am here for.


    Don't forget that the real credit for the EnvLight2 shader itself goes not to me, but to the amazing "DNA Research" team: the developers of 3Delight led by Aghiles Kheffache. I just provide the how-to for making it work in DS.

    If you enjoyed the capabilities of EnvLight2, you should be pleased to know that the recent updates to 3Delight make it possible to write a shader with the same beautiful handling of HDRI _and_ full GI at once, and very easily.

    I am currently waiting for the decision of the DAZ Tech Support regarding my newest planned freebie (which is to include a ready-made GI/HDRI shader, plus a new surface shader utilising fully raytraced SSS and a set of "render scripts" that allow for using some neat 3Delight options not exposed in the default Render Settings tab, making GI even faster) - this is the unfortunate implication of the way the licence is written for the samples from the DS scripting kit, those samples that are indispensable as the basis for writing all the custom rendertime scripts a shader may require (not every one will), and for custom "render scripts" as well: I have to ask for permission before release.

    I have outlined a few tips in these posts:
    http://www.daz3d.com/forums/discussion/45412/P30/#678700 - the most important code for the GI/HDRI shader;
    http://www.daz3d.com/forums/discussion/21611/P570/#650631 - links to the posts describing how to make your "render scripts";
    http://www.daz3d.com/forums/discussion/21611/P675/#678723 - easy way to use shader builder volume shaders with the "scripted renderer";
    http://www.daz3d.com/forums/discussion/21611/P690/#682103 - easy way to make a preset for using AoA's EasyVolume in the same manner.

    Here's an image in my dA gallery I did using the GI shader, the SSS shader and the "scripted renderer":
    http://mustakettu85.deviantart.com/art/Why-488890119



    Altering the value for the "Kenv" parameter, wich should act as a multiplier for the Intensity, has no effect because the variable isn't defined in the code... and I have absolutely no idea how to do that correctly.

    If you look at the macros editor window, you will see that there are variables listed at the top. Each of them is given an ID number - this number, put between two "%" signs, represents these variables further down the line in the macro code. So %2% is, actually, Kenv. If you look at the final "Light Code" tab (between the "Block network" and "Log" tabs), you will see all the intermediate "%"-names being replaced by the variable names you provide in the User Parameters list.

    It's a bit non-intuitive, but this is how it works in the shader builder.

  • Arnold C.Arnold C. Posts: 257
    edited November 2014


    Thank you very much for your interest in my free stuff and your kind words!

    It makes me particularly happy that you ventured further and customised the shader to your personal style. This means you have learned something and applied it to create your vision. I am proud to have helped you on your journey! This is what I am here for.

    Don't forget that the real credit for the EnvLight2 shader itself goes not to me, but to the amazing "DNA Research" team: the developers of 3Delight led by Aghiles Kheffache. I just provide the how-to for making it work in DS.

    You're too modest. Sure, the tool was made by them,... but of what worth would be the finest tool if there would be none who teaches how it is properly used.


    If you enjoyed the capabilities of EnvLight2, you should be pleased to know that the recent updates to 3Delight make it possible to write a shader with the same beautiful handling of HDRI _and_ full GI at once, and very easily.

    I am currently waiting for the decision of the DAZ Tech Support regarding my newest planned freebie (which is to include a ready-made GI/HDRI shader, plus a new surface shader utilising fully raytraced SSS and a set of "render scripts" that allow for using some neat 3Delight options not exposed in the default Render Settings tab, making GI even faster) - this is the unfortunate implication of the way the licence is written for the samples from the DS scripting kit, those samples that are indispensable as the basis for writing all the custom rendertime scripts a shader may require (not every one will), and for custom "render scripts" as well: I have to ask for permission before release.

    "Enjoying" doesn't put it right... I'm nearly ecstatic. :-)
    Comparing Envlight2 with UE2 it seems that the UE2 doesn't get soft shadows right, they look always way too dark.
    Yeah, I guess I already read about that in the "3Delight Surface and Lighting Thread". Which was the reason I found this one. Couldn't resist the "freebie" remark in your sig! :-)
    Sounds very interesting. I thought this was especially for UE2, which I don't really like to work with. Too resourcehungry for my taste, with that Envlight2 shader I can even render with DAZ Studio's default render settings. Some of the shadows get a bit of noise doing that, but that's a thing I can live with. You virtually need to put your nose onto the monitor to notice.



    If you look at the macros editor window, you will see that there are variables listed at the top. Each of them is given an ID number - this number, put between two "%" signs, represents these variables further down the line in the macro code. So %2% is, actually, Kenv. If you look at the final "Light Code" tab (between the "Block network" and "Log" tabs), you will see all the intermediate "%"-names being replaced by the variable names you provide in the User Parameters list.

    It's a bit non-intuitive, but this is how it works in the shader builder.

    Ah, I see. Then I guess my Shader Builder whacked it up somehow, because in my "Light Code" tab it says "Cl *= intensity;".
    Which is a bit of nonsense then, defining the modifier for "Intensity" being intensity itself.
    No wonder why adjusting the "Kenv" value in the macro code in my build didn't had any effect.

    Post edited by Arnold C. on
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969


    You're too modest. Sure, the tool was made by them,... but of what worth would be the finest tool if there would be none who teaches how it is properly used.

    Thank you very much! And that's cool you noticed the freebie link in my signature =) I don't actually know how effective this type of "advertising" is.


    Sounds very interesting. I thought this was especially for UE2, which I don't really like to work with. Too resourcehungry for my taste.

    It is for any and all shaders that do GI. I've also tried Omnifreaker's UberSoftLight Kit, and it also works, albeit that shader a bit trickier to set up. Either way, UE2 should "feel like a different shader" when used in the particular way I describe, to only do bounce light for a directional light setup and with GI caching enabled in the raytrace hider. Much less resource-hungry (particularly with hair being excluded from GI via UberSurface).

    Using a render script to switch to the raytrace hider (but without GI cache) will speed up any raytracing calculation, so you may want to try it with Envlight2 as well.


    Ah, I see. Then I guess my Shader Builder whacked it up somehow, because in my "Light Code" tab it says "Cl *= intensity;".
    Which is a bit of nonsense then, defining the modifier for "Intensity" being intensity itself.
    No wonder why adjusting the "Kenv" value in the macro code in my build didn't had any effect.

    The " *= " syntax is okay. It is a C-style shortcut for something like

    Cl = Cl * intensity;

    It's faster to type. There's four of them:

    *=
    /=
    -=
    +=

    Were you trying to adjust "Kenv" by directly typing "Kenv" in the macro editor? This may not have worked because it should have been " %2% " instead. In the final code, all the " %2% " instances are replaced with "intensity" (the name you give to the variable in the User Parameters in the rightmost column).

    There is a "trick" I often use when coding to make macro editing easier: create a new normally named variable in the code, assign the value of a " % NUMBER % " variable to it, and use the named variable down the line. It also has the advantage of us being able to modify this variable (inputs can't be assigned different values).

    
    // define and initialise new variable
    
    float MyIntensity = 0;
    
    // assign input value to it
    
    MyIntensity = %2%;
    
    // add to MyIntensity some other hypothetical input of the macro editor
    
    MyIntensity += %3%; 
    
    Cl *= MyIntensity;
    

  • Arnold C.Arnold C. Posts: 257
    edited November 2014


    Thank you very much! And that's cool you noticed the freebie link in my signature =) I don't actually know how effective this type of "advertising" is.
    Well. that's a condition or something, I hardly can resist a "Freebie" announcement. That's what brought me here to DAZ.
    Years ago I was looking for something on the web when I saw a banner ad telling that DAZ Studio was availble for free. It was love at first sight :-).
    Funny thing is, I had been that amazed about my find that I totally forgot, until this day, what I've been looking for in the first place.
    Nevermind, I guess it coulnd't have been that important. :-)


    It is for any and all shaders that do GI. I've also tried Omnifreaker's UberSoftLight Kit, and it also works, albeit that shader a bit trickier to set up. Either way, UE2 should "feel like a different shader" when used in the particular way I describe, to only do bounce light for a directional light setup and with GI caching enabled in the raytrace hider. Much less resource-hungry (particularly with hair being excluded from GI via UberSurface).

    Using a render script to switch to the raytrace hider (but without GI cache) will speed up any raytracing calculation, so you may want to try it with Envlight2 as well.

    Nice. Then I'll definitely give it try!


    The " *= " syntax is okay...

    Were you trying to adjust "Kenv" by directly typing "Kenv" in the macro editor? This may not have worked because it should have been " %2% " instead. In the final code, all the " %2% " instances are replaced with "intensity" (the name you give to the variable in the User Parameters in the rightmost column).

    There is a "trick" I often use when coding to make macro editing easier: create a new normally named variable in the code, assign the value of a " % NUMBER % " variable to it, and use the named variable down the line. It also has the advantage of us being able to modify this variable (inputs can't be assigned different values).

    
    // define and initialise new variable
    
    float MyIntensity = 0;
    
    // assign input value to it
    
    MyIntensity = %2%;
    
    // add to MyIntensity some other hypothetical input of the macro editor
    
    MyIntensity += %3%; 
    
    Cl *= MyIntensity;
    

    Sure, the syntax is correct. But in the original sourcefile the last line of code says "Cl *= Kenv;".
    DAZ's Shader Builder transforms this into "Cl *= Intensity;" for to me unknown reason.

    I tried to edit the value in the macro itself, but whatever I did put in, 10, 11, 100... everytime I got a very dim render as result.

    I tried that and gave the "Kenv" float various unnused %X% numbers, from %8% to %. But everytime I got a different variable for this, being "bias", "samples", etc. "Kenv" didn't show up.
    I guess the Shader Builder wanted to die that time. :-)

    I did a different aproach (made visual in the picture below):

    I made up an aditional controller, named it "Kenv", created a "multiply" operator and let "Kenv" and the "Intensity" controller run through it.
    The result in code is "Cl *= intensity * Kenv;", which I guess isn't THAT correct either, but it works as intended without having to hack into the code. As a plus I got a hidden parameter to adjust manually if ever needed.

    I also created another controller, "__nonspecular_2" with a value of "0" to "1" and a "subtract" operator, and let "__nonspecular" and "__nonspecular_2" run trough it. The result is a "switch" (with a nudge of 1) in the Parameters Tab where I can switch specular shading on and off.

    Before I had two different Envlight2's, one with nonspecular "1" and one with nonspecular "0" because I don't wanted to recompile everytime I needed it differently. I'm a "one shader for every purpose if possible" guy. :-)

    Thanks for your help and tips.

    ENVLIGHT2-1.jpg
    752 x 800 - 157K
    Post edited by Arnold C. on
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    Sure, the syntax is correct. But in the original sourcefile the last line of code says "Cl *= Kenv;".
    DAZ's Shader Builder transforms this into "Cl *= Intensity;" for to me unknown reason.


    This is the correct behaviour. Looks like I am not explaining well enough. I will try once again. Please study the image attached, I hope it makes it clear for you.

    ShaderBuilderVariableNames.png
    920 x 1901 - 186K
  • Arnold C.Arnold C. Posts: 257
    edited November 2014

    Ah, now I got it. Thanks for the further exemplification, Mustakettu.
    I didn't notice the original variable's names are overriden by them of the User Parameters.
    Makes sense.

    I also must correct myself:
    I also created another controller, “__nonspecular_2” with a value of “0” to “1” and a “subtract” operator, and let “__nonspecular” and “__nonspecular_2” run trough it. The result is a “switch” (with a nudge of 1) in the Parameters Tab where I can switch specular shading on and off.

    Unfortunately, that doesn't work. Seems that the "__nonspecular" parameter is fixed in some way. Changing the value from "1" to "0" via subtraction doesn't have any effect, it doesn't do specular.

    Post edited by Arnold C. on
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    Ah, now I got it. Thanks for the further exemplification, Mustakettu.
    I didn't notice the original variable's names are overriden by them of the User Parameters.
    Makes sense.

    I also must correct myself:
    I also created another controller, “__nonspecular_2” with a value of “0” to “1” and a “subtract” operator, and let “__nonspecular” and “__nonspecular_2” run trough it. The result is a “switch” (with a nudge of 1) in the Parameters Tab where I can switch specular shading on and off.

    Unfortunately, that doesn't work. Seems that the "__nonspecular" parameter is fixed in some way. Changing the value from "1" to "0" via subtraction doesn't have any effect, it doesn't do specular.

    Thank you. I'm glad you understand now.

    "__nonspecular" is actually an output parameter of the shader (the surface then asks the light for it, and it's the surface that decides if this light will be included in its illuminance() loop or not). I cannot remember right now if RiSpec allows changing outputs like that via shader code, but there is certainly no way I know of in DS to reroute shader code back into the User Parameters where the value for "__nonspecular" and "__nondiffuse" are set. So yeah, in that sense it is fixed.

  • kitakoredazkitakoredaz Posts: 1,973
    edited May 23

    Hi,, thank you many useful tutorials and stuff,,
    I have seldom play with shader builder and now start witth your envlight2 tutoriallI.
    aftrer build (just follow your tutoriall ^^;) envlight ,, and test render,,
    now I have some (really basic) quesiton :red:

    1 I hope to cast shadow from this enviroment light only , then set the parameter, shadow >shadow type raytraced.
    but when I set shadow type, nothing illuminate, ^^; It is usuall?
    or I must miss something ?

    2 If I hope to make same light by shader mixer,, it is easy ?

    3 about UE2, right source image not much with enviroment image direction,
    then we need to adjust rotation of light soruce,,
    this environment light have same problem too?

    or If I set env sphere then add environment image.jpg ,
    then set light source HDRI for this light, the light direction is same as enviroment image?
    or I still need to tweak rotation ?

    4 if I hope to add AO shadow (sorry,, shadow intensity controll ^^;)
    for this light what may I need?

    Post edited by kitakoredaz on
  • MilosGulanMilosGulan Posts: 900
    edited December 1969

    gulan7 said:
    Thank you very much, i didn't have time to download it but i will as soon as i have some time. This looks really good.

    I better download it before I forget again.

  • Arnold C.Arnold C. Posts: 257
    edited December 1969

    Hi,, thank you many useful tutorials and stuff,,
    I have seldom play with shader builder and now start witth your envlight2 tutoriallI.
    aftrer build (just follow your tutoriall ^^;) envlight ,, and test render,,
    now I have some (really basic) quesiton :red:

    1 I hope to cast shadow from this enviroment light only , then set the parameter, shadow >shadow type raytraced.
    but when I set shadow type, nothing illuminate, ^^; It is usuall?
    or I must miss something ?

    2 If I hope to make same light by shader mixer,, it is easy ?

    3 about UE2, right source image not much with enviroment image direction,
    then we need to adjust rotation of light soruce,,
    this environment light have same problem too?

    or If I set env sphere then add environment image.jpg ,
    then set light source HDRI for this light, the light direction is same as enviroment image?
    or I still need to tweak rotation ?

    4 if I hope to add AO shadow (sorry,, shadow intensity controll ^^;)
    for this light what may I need?

    This light shader won't work with shadow parameters set, the "Shadow Type" has to be "None" for it to work. The best is if you set the Parameter Settings for the Shadow Type to "Hidden" and "Locked", so that you can't accidentally change it.
    Also, you need to put in an environment map (.hdr, .tif, ...) into the texture slot of the "Color" parameter. It won't work without one. There are some coming with the DS Base Content, in ".\Runtime\Textures\omnifreaker\Environment". If you've got one or some of DimensionTheory's lights, they're shipped with some pretty ones, too.
    The shadow intensity depends on the brightness of your environment map, there's no such thing as a "shadow intensity control".

    I've added a picture with the basic parameters for the EnvLight2 below. That's all you need, and more importantly, all that works. There's no need to fake darker shadows, the shadow strength you get is what the environment map delivers. If you need darker shadows, just lower the Intensity.

    EnvLight2.jpg
    1024 x 728 - 125K
  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    2 If I hope to make same light by shader mixer,, it is easy ?

    3 about UE2, right source image not much with enviroment image direction,
    then we need to adjust rotation of light soruce,,
    this environment light have same problem too?

    or If I set env sphere then add environment image.jpg ,
    then set light source HDRI for this light, the light direction is same as enviroment image?
    or I still need to tweak rotation ?

    Hi, and thank you for taking a look at my stuff!

    I see Stefan has already answered some of your questions (thank you Stefan) . So here are the remaining ones.

    2. Nope. Shader Mixer is very handy for making procedural surface shaders, but for other things it is not the best tool to use.

    3. The problem is that 3Delight thinks that the Z axis is up. While DS thinks the Y axis is. You could try changing the coordinate system to "shader" and rotate the Envlight2 in the scene to have its Z axis pointing up.

    UE2 may have an internal semi-fix for this, but Envlight2 does not. So in its case, rotating the light should work.

    Don't forget that DS shaders like UberSurface and DS default have their own idea of the world (see how different the same panorama will look when plugged in these two as a reflection map). Shader Mixer and pwSurface may have their own ideas, too.

    Using a default DS sphere as a skydome seems to be the most reliable option for reflections. Use UberSurface on it, disable casting shadows and 'occlusion' contribution. Then it will only reflect itself.

  • kitakoredazkitakoredaz Posts: 1,973
    edited December 1969

    Hi thank you stefan and Kettu:),
    I beleive now I can use this env light corectly as it desigend (not guess and try many ^^;)

    I may explore more shader builder ,
    because I sometimes like "fake" not "like real" shadow, with light intensity keep ^^;

  • kitakoredazkitakoredaz Posts: 1,973
    edited May 25

    mm,,sorry to ask again, but I hope to clear what I am doing^^;
    I have now two question,,,

    1. read again what Stefan planed about Non diffuse, and Non specular switch.

    it seems same I plan to modify this shader as beginner start,,

    then I feel, my copied envlight2.sl there is not "No diffuse" parameter.

    When I first follow this tutoriall, I set User parameter>"non diffuse" set defualt value to 0
    but not connect it to New Env2 macro instance. (copied from envlight2.sl, because there is no Parameter about no diffuse)

    I believe, this value work some like boolen (true and false), then I understand why I need to set it 0,
    if I hope to illuminate diffuse. but even though I do not connect Parameter "non diffuse" to
    macro instance ,, it seems work,, why?

    and,, if I hope to make switch, ('specular only or diffuse only or both etc)
    as same as daz light)
    I feel I may need to add new parameter about no diffuse,, but,, if I just add new parameter in user macro,
    then connect it to "no diffuse" of parameter,,, why it work correctly?

    DS can auto add code for non diffuse too? I check initallization code,, but there seems no code about
    "specular on or off" and "diffuse on and off" ,,, it is alrady written in User parameters?
    but I do not need connect it,,? (eg about diffuse on )

    Or need to add new parameter in envlight2, (maybe I can use name as I like)
    then just connect it to User parameters , Non diffuse, and Non specular?

    Question2
    it is silly quesiton, I know,, but about light max dist, max value.
    I check tutoriall, then Kettu suggest,, to keep max,, I like to do what I told ^^;
    then try to input the value ,, but I can not clear see the correct max value.

    it seems "1e + 010" or 1e+O10,,, etc,, I understand "e" ,, then it is same,1* pow(10,10)?

    builder.JPG
    693 x 716 - 86K
    Post edited by kitakoredaz on
  • Mustakettu85Mustakettu85 Posts: 859
    edited May 25


    I believe, this value work some like boolen (true and false), then I understand why I need to set it 0,
    if I hope to illuminate diffuse. but even though I do not connect Parameter "non diffuse" to
    macro instance ,, it seems work,, why?

    Because it passes a value directly to a special output variable of the light shader. If you download the 3Delight docs from here:
    https://3delight.atlassian.net/wiki/display/3DSP/Resources

    , on p. 99 (the PDF one; the number printed on the page says 92) you will find more information about these variables.


    I feel I may need to add new parameter about no diffuse,, but,, if I just add new parameter in user macro,
    then connect it to "no diffuse" of parameter,,, why it work correctly?

    Your best bet would be to try controlling the __non-parameters the way I did to __inShadow in this mini-tutorial (it's just that __inShadow is "output varying color", and __nondiffuse and __nonspecular would be "output uniform float"):
    https://mustakettu85.wordpress.com/2015/04/15/3delights-physical-sun-into-daz-studio-a-yet-another-shader-builder-mini-tutorial/

    I haven't tested myself if that would work for these parameters in particular, but why not.



    it seems "1e + 010" or 1e+O10,,, etc,, I understand "e" ,, then it is same,1* pow(10,10)?

    Yes. 1e3 is 1000, for instance.

    Post edited by Mustakettu85 on
  • kitakoredazkitakoredaz Posts: 1,973
    edited December 1969

    Hi kett,, :lol: thank you to teach me clear all what I asked.
    and you show me how to learn too . It is very useful !!

  • Mustakettu85Mustakettu85 Posts: 859
    edited December 1969

    You're most welcome, Kitakoredaz =) Enjoy!

Sign In or Register to comment.
Rocket Fuel