AWE Surface Shader - a new physically plausible shader for DAZ Studio and 3delight

wowiewowie Posts: 2,029
edited November 2022 in Freebies

AWE Surface 1.0

AWE Surface is a new, robust, highly optimized, physically plausible shader for DAZ Studio and 3Delight employing physically based rendering (PBR) metalness / roughness workflow. Using a primarily uber shader approach, it can be used to render materials such as dielectrics, glass and metal.

Features Highlight

  • Physically based BRDF (Oren Nayar for diffuse, Cook Torrance, Ashikhmin Shirley and GGX for specular).
  • Micro facet energy loss compensation for the diffuse and transmission lobe.
  • Transmission with Beer-Lambert based absorption.
  • BRDF based importance sampling. Multiple importance sampling (MIS) with 3delight's path traced area light shaders such as the aweAreaPT shader.
  • Explicit Russian Roulette for next event estimation and path termination.
  • Raytraced subsurface scattering with forward/backward scattering via Henyey Greenstein phase function.
  • Physically based Fresnel for both dielectric and metal materials. Unified index of refraction value for both reflection and transmission with dielectrics. An artist friendly metallic Fresnel based on Ole Gulbrandsen model using reflection color and edge tint to derive complex IOR.
  • Physically based thin film interference (iridescence).
  • Shader based, global illumination.
  • Luminance based, Reinhard tone mapping with exposure, temperature and saturation controls.
  • Toggle switches for each lobe.
  • Diffuse Oren Nayar based translucency with support for bleed through shadows. Can use separate front/back side diffuse color and texture.
  • Two specular/reflection lobes for the base, one specular/reflection lobe for coat.
  • Anisotropic specular and reflection (only with Ashikhmin Shirley and GGX BRDF), with map-controllable direction.
  • Glossy Fresnel with explicit roughness values, one for the base and one for the coat layer.
  • Optimized opacity handling with user controllable thresholds.
  • Imports most settings and values when converting materials from dsDefaultMaterial, HumanSurface Shader, UberSurface and UberSurface 2.

Get them here:

https://drive.google.com/drive/folders/1iHeu7z2pChdgmimFbu0rOCLt5nXUFVcK

Installation instructions

The aweSurface.zip contains a readme for the shader and some basic shader presets that will apply AWE Surface to the existing materials. The contents of aweSurface DS App Folder Files.zip are the compiled Renderman shader code (.sdl) and supporting DS scripts to be placed within your DAZ Studio application folder (ie Program Files/DAZ 3D/DAZ Studio 4/..." Mustakettu's render script files are also included in this archive.

AWE Surface 1.4

Rebuild shader from backup.

  • Renders should be less satuarated compared to previous build, especially with 6500K.
  • Color Burn and Dodge should produce more visible/noticeable differences.

AWE Surface 1.3 hotfix

Some notable changes:

  • Fixed coat BRDF as it was erroneously using the base BRDF for raytracing.
  • Fixed metallic Fresnel for the second specular/reflection lobe erronously using first lobe settings. (first hotfix)
  • Changed adaptive sampling variance threshold to avoid streaks in dark areas. (first hotfix)
  • Rays from adaptive sampling will now pass through materials with transmission fully enabled ie. glass, windows.
  • Fixed first specular lobe not noticeable when both the first and second specular lobe are enabled.
  • Changed 'Specular Exposure' code to allow stronger specular override.
  • Fixed clipping with direct diffuse lighting and very strong lights ie. Intensity Scale (EV) 7 and above.
  • Added distance based AO to boost contact shadows.
  • Tweaked subsurface integration and diffuse. Users can now leave diffuse at 100% when subsurface is enabled.
  • Subsurface is now aware of adaptive information. It will assign higher ray weights and uses more samples in areas where adaptive sampling is used. This should lead to less noise, without having to manually raise samples/weights.
  • Thanks to further tuning of subsurface weights, subsurface is around 80% faster. Renders with subsurface enabled should take up to 70% less render time.
  • Changed ACES curve so it is closer to the full ACES curve.
  • Update the support script so importing normal map will work correctly.

Normal mapping - This is still not fixed, but it should be somewhat useable now.

AWE Surface 1.3

Changelog

  • General code cleanup.
  • Added stratified sampling to specular/reflection and adaptive sampling to diffuse/global illumination. When enabled, adaptive sampling with shoot more rays at high samples. The effect is lower noise comparable to using 4096 or 8192 samples at half the render times as previous builds using those number of samples.
  • Revised how subsurface is integrated into the final output. Subsurface absorption also now takes into account base/diffuse texture saturation values. Enabled when 'Use Diffuse Texture with SSS' is higher than zero.
  • Added translucency boost to subsurface. Users can choose their own color, the subsurface absorption color or a mix between the two. Translucency boost also accepts a texture mask. Subsurface strength mask should be plugged into this new control rather than subsurface strength.
  • Revised raytracing bias/ray epsilon when displacement is used. Previously, the shader wasn't using the actual proper values. As an added control, there is a new Diffuse Bias slider to override the bias manually.
  • Revised opacity code and optimizations. Previous code didn't account for single channel textures.
  • Revised tone mapping code and controls. It is now possible to override tone mapping values per surface, but still accept scene wide exposure values from AWE Environment Light. Tone mapping code now also works per pixel rather than per surface.
  • Added additional tone mapping methods. Available choices are : Reinhard, Unreal and ACES, with Reinhard being the default. Users can select which method they prefer via the (updated) AWE Environment light.
  • Revised energy conservation and Russian roulette ray weights. Diffuse now closely follows the Wolff-Oren-Nayar model. Specular levels with the default Ashihkmin Shirley also have been changed to what it was before the last update.
  • Employed limits to IOR values, so it will always be limited to values between 1 and 4.
  • Fixed a bug with translucency when Use Face Forward is enabled.
  • Fixed a bug with coat roughness when using the default Ashikhmin-Shirley BRDF. It was erroneously using the first specular lobe roughness as reference.
  • Added a Bump Applied to Coat switch. Users can disable this to render a smooth, clearcoat while isolating bump mapping only to the base layer.
  • Added UV Projection Influence to which layer uses UV projection. Users can choose to enable UV projection to both surface and displacement, just the surface or just the displacement shader.
  • Revised UV Projection code and variables. Fixed texture scaling/orientation for screen planar projection and triplanar mapping.
  • Added Gamma and Saturation controls for base/diffuse textures. When enabled, users can use these change the brightness and/or saturation of base/diffuse/backside diffuse textures. As an added control, there is also a new Filter Value. Only values above this will be adjusted.
  • Changed Diffuse Filtered Color from a Color property into a float.
  • Fixed blackbody temperature code. It was doing unnecessary additional sRGB color conversion, producing over saturated values.
  • Changed Metalness Diffuse Texture Strength and Specular Map Strength multiplier from gain (x * gain value) to gamma (pow (x, gamma)).
  • To maintain energy conservation, added a limit to refraction sampling angle. As a side effect, refraction roughness ramp have changed slightly at higher values.

AWE Surface 1.2

Changelog

  • AWE Surface can now import most of iray Uber shader values. Users should use the newly bundled 'AWE Transfer Uber' script after applying AWE Surface to transfer the values to AWE Surface settings.
  • Added camera based exposure limit options (f-stop, ISO and shutter time). Scene wide controls is accessible via the updated AWE Environment light (can be found in aweShading Kit).
  • Added support for normal mapping.
  • Added support for vector displacement. Depending on the texture and amount of displacement, users will need to tweak displacement bounds manually.
  • Added UV Projection mapping with several modes to choose from: planar (screen aligned), cylindrical, spherical, triplanar.
  • Bias now takes into account values from displacement textures when displacement is enabled.
  • Corrected erroneous bias when transmission is enabled. Added Transmission Bias so users can do manual offsets when needed. Defaults to -1 (minus 1).
  • Transmission shadow now renders correctly. Previously, it will exhibit blocky artifacts with path traced area lights.
  • Tweaked Russian roulette weights for diffuse rays. The shader will now only scale down importance at ray depth higher than 3 (previously it was 1). With this change, diffuse effectively renders the same as using full weight at very high ray depth ( > 6 ). Performance is unaffected.
  • Subsurface filtered strength is now a percentage of actual subsurface strength value (with texture mask taken into account). Previously, this was separate and caused problems of uneven SSS strength across some surfaces.
  • Subsurface now will use 'usetopology' and 'smooth'. Together with other improvements, subsurface should be much less noisy.
  • Rendering with subsurface now produces the same result both in the built-in 3delight renderer and the 3delight standalone renderer (tested with the 3delight 12.5.9 build). As a side effect, rendering subsurface is slightly faster (around 5%).
  • Revised energy conservation scheme for subsurface and diffuse. The new code doesn't produce speckles even without clamping. As a result, diffuse input for subsurface is now unclamped.
  • Revised blackbody code. The new code should be more accurate than the previous one.
  • Reworked opacity code and optimizations. The new code simply blends between original values in the textures and filtered values depending on optimization level. Optimization to Russian roulette depending on opacity allows the shader to render opacity mapped surfaces with negligible hit on render times (even with the original values without any optimization).
  • Changed default Opacity Optimization to 0%

You can find the transfer script inside the file 'AWE Transfer Uber.zip'

AWE Surface 1.1

Changelog

  • Fix faulty reference to actual specular BRDF used. Earlier builds would use GGX when Cook Torrance is selected and use Cook Torrance with GGX.
  • In terms of render times, Ashihkmin Shirley will be fastest, GGX is slightly slower, with Cook Torrance being the slowest.
  • Adjusted Ashihkmin Shirley output at grazing angles so it matches GGX output.
  • Lowered minimum roughness values for all lobes. This allows very sharp, practically perfect (mirror) reflections.
  • Cook Torrance have a massive performance impact when max diffuse depth of the material using it is set above 1. Set max diffuse depth to 1 for all surfaces using Cook Torrance BRDF to minimize the issue.
  • Removed clamp and extraneous code from coat/specular bsdf when using point/spot/distant lights.
  • Adjusted Russian roulette weights used with ray tracing. This produces less noticeable dimming of specular highlights and reflection for renders with high pixel samples (more than 4x4).
  • Adjusted coat visibility in reflections and refractions. Previously, coat layer will not be rendered on reflections/refractions of the coated object.
  • Adjusted opacity visibility in reflections and refractions. Previously, opacity will render fully opaque on reflections/refractions.
  • Reworked opacity code to allow gradual transition between fully opaque and fully transparent. Added new optimizations which results in 10% faster render times for opacity mapped surfaces.
  • Reworked erroneous exposure limits. Previously it would produce darker areas near the light source when light source intensity/exposure is very high.
  • Reworked bump code to avoid mesh cracking do too intense bump strength.
  • Reworked displacement and displacement bounds code to avoid displacement exceeding bounds.
  • Added a displacement bounds multiplier to tweak displacement bounds. This can be adjusted to optimize displacement bounds usage.
  • Implemented additional importance sampling technique for diffuse. This results in up to 90% faster render times for diffuse surfaces.
  • The new importance sampling also takes into account irradiance samples. This results in up to 50% faster render times with more than 512 irradiance samples on top of the improvements from the new importance sampling optimization.
  • Added dynamic bias based on displacement strength to raytracing shadeops to account for displacements. Previously, GI will not be calculated correctly when displacements are used. With the added bias, GI will look the same with or without displacements.
  • Specular and Global Illumination Exposure can now be used to offset exposure beyond scene wide exposure from AWE Environment light.
  • The shader now uses DS internal dPds instead of calculating its own. This results in no more artifacts when anisotropy is used.

Updated build in a DIM compatible .zip installer.

AWE Surface

https://drive.google.com/file/d/154hmnGLi6xBC1Qrx3IJVnukVnfZgiCSr/view?usp=sharing

AWE Hair 1.0

A Marschner melanin based hair shader for 3Delight in DAZ Studio 4.7 onwards. Works best with AWE Shading Kit and the included 3Delight scripted renderer option available in the kit. Packaged as a DIM compatible installer. If you want a manual install, you will need to extract the files and place them manually inside both your runtime folders (presets) and DAZ studio 'Program Files' folder (support files).

Apply presets to any hair surface, adjust parameters and render.

To use the melanin and red melanin parameters as primariy inputs, set the 'Override Hair Color' parameter to 100%. A value below 100% means a blend between the melaninn / red melanin values and diffuse color and texture in the Hair Color slot.

The 1st specular sets the white highlights, the 2nd the colored specular. When enabled, translucency will be handled automatically between dark/light hair. If your specular strength maps are too dim, you might have to remove them completely.

Other options control variations of roughness/melanin values of the hair, including the option to have a ramp between the hair root and tip. Ramp is based off v coordinates of UVs. Also includes an opacity optimization with texture maps and gamma/saturation controls for diffuse/color maps.

DIM installer.

https://drive.google.com/file/d/1TY3k9Gn27ssEnsNqDoB2EhPViJU0jAFl/view?usp=sharing

AWE Hair 1.1

Completely reworked build.

  • Much better hair translucency and opacity
  • Renders should have much less noise at default samples.
  • In general, render times with opacity enabled should be less than the previous build.

 

Post edited by wowie on
«13

Comments

  • wowiewowie Posts: 2,029
    edited January 2019

    Edit:

    Render script have been updated to support rendering of Garibaldi hair.

    Uploaded mustakettu's RadiumAreaPT light shader files to the Google Drive folder.

    • RadiumAreaPT DS App Folder.zip
    • RadiumAreaPT Runtime Library Files.zip

    I've also finished the shadow catcher shader along with new point/spot/distant light shaders. These can be found inside the aweExtra files.

    • aweExtras DS App Folder Files.zip
    • aweExtras Runtime Library Files.zip

    Installation is similar to AWE Surface. Files for the runtime/library folders goes inside your My DAZ Library folder.. Files in the DS app folder goes inside your respective DAZ Studio Application folder. For Windows, it is usually : C:\Program Files\DAZ 3D\DAZStudio4

    No manual or documentation yet, though the controls should be simple enough to understand.

    The light presets are located in

    • My DAZ3D Library\Light Presets\wowie
    • My DAZ3D Library\Light Presets\Mustakettu85

    RadiumAreaPT is an area light shader, so you will need to have a surface on an emitter selected before applying.

    The shadow catcher can be found here - My DAZ3D Library\Shader Presets\wowie\AWE ShadingKit

    Feel free to make presets for your stuff or even distribute the shader, be it a freebie, personal or commercial use.

    The commercial pack is available in the DAZ store. Here's a link to the relevant PA Commercial Products thread - https://www.daz3d.com/forums/discussion/280441/awe-shading-kit-for-daz-studio-and-3delight

    I've uploaded a simple example scene to the Google drive folder with the DAZ Material Ball loaded and an environment sphere with OMKHPark applied. All the surfaces in the scene except for the environment sphere have AWE Surface applied.

    More info can be found in the readme and some work-in-progress shots.

    For best results, render with the included mustakettu's 3delight render script. It's also a good way to see if your installation is successful. You should be able to see these in the renderer settings.

    Below are some older test shots with the shader.

    aweSurface 01.jpg
    1000 x 1300 - 855K
    aweSurface 02.jpg
    1000 x 1300 - 711K
    aweSurface 03b.jpg
    1000 x 1300 - 627K
    aweSurface 04.jpg
    1000 x 1300 - 916K
    aweSurface 05.jpg
    1000 x 1300 - 896K
    aweSurface 07.jpg
    1000 x 1300 - 666K
    RenderScript1.jpg
    465 x 194 - 25K
    RenderScript2.jpg
    467 x 671 - 83K
    Post edited by wowie on
  • gitika1gitika1 Posts: 948

    Thank you wowie.  I will check them out this weekend.

  • MollytabbyMollytabby Posts: 1,158

    Thank you @wowie! Installed and now I just have to study the readme pdfs before trying them out smiley

  • Thank you very much for this!

  • kyoto kidkyoto kid Posts: 40,514

    ..can't open the readme as I don't have Word (the old notebook with it died). Is there just a .txt version could it be converted to a PDF?

  • namffuaknamffuak Posts: 4,040
    edited September 2018
    kyoto kid said:

    ..can't open the readme as I don't have Word (the old notebook with it died). Is there just a .txt version could it be converted to a PDF?

    Libre Office and Open Office will both open word documents and are both free.

    Post edited by namffuak on
  • EC3DEC3D Posts: 131

    Looks great! Thanks for letting us give this a spin. :)

  • Oso3DOso3D Posts: 14,878

    I am eager to try this out.

    I would really like to play around with 3dl again, and this seems like it’ll fill a lot of gaps I’ve seen before.

  • nonesuch00nonesuch00 Posts: 17,890

    I am looking forward to trying this out too. At least your examples look bery good to me. '

    Thanks

  • Thanks more shaders are always nice.

  • wowiewowie Posts: 2,029
    kyoto kid said:

    ..can't open the readme as I don't have Word (the old notebook with it died). Is there just a .txt version could it be converted to a PDF?

    There is a PDF version included inside the aweSurface.zip.

  • LeanaLeana Posts: 10,932

    Thanks a lot for the new shader :)

  • ImagoImago Posts: 4,873

    Nice to see someone is still creating stuff for 3Delight!

    Thanks a lot! laugh

  • GreymomGreymom Posts: 1,104

    Cool - thanks muchly!

  • RAMWolffRAMWolff Posts: 10,140

    This is so awesome Wowie.  So if I develop my current Gino project around this the end user MUST have your shader system installed to see the benefits, correct?  

  • wowie said:

    And for users who keep getting issues d/ling from google drive... Wowie, I remember you told me that time you used Opera; I tried it now and yes it works. Maybe it's worth it adding this recommendation to the original post.

  • Oso3DOso3D Posts: 14,878

    Does this download include the lights to make it work properly?

  • MollytabbyMollytabby Posts: 1,158

    Okay, could someone please gently hold my hand and show me where each of the folders should go in the Daz Studio folder? I think I've put Wowie's shaders in the right place but not everything else. 

  • wowiewowie Posts: 2,029
    edited September 2018
    RAMWolff said:

    This is so awesome Wowie.  So if I develop my current Gino project around this the end user MUST have your shader system installed to see the benefits, correct?  

    Yes.

    Oso3D said:

    Does this download include the lights to make it work properly?

    There's no light shaders included in the freebie. The shader should work with just about any light out there or even if you only have an ambient surface. In fact, that's how the example scene is lit. I'll probably pack my modification of mustakettu's point/spot/distant light later on. They support light linking, various falloff options, blackbody temperature and setting explicit samples for shadows. I'll probably also include the Shader Builder files so users can add stuff to it, or learn RSL and Shader Builder.

    For best performance, the shader is best used with path traced area lights. I made one and bundled it with the commercial pack and there's also mustakettu's Radium AreaPT. I need to check with her first if it's OK to distribute the Radium AreaPT light.

    Okay, could someone please gently hold my hand and show me where each of the folders should go in the Daz Studio folder? I think I've put Wowie's shaders in the right place but not everything else. 

    Files in the aweSurface zip should be placed inside your 'My DAZ LIbrary' folder. Those contain the PDF version of the readme and shader presets.

    Files in the aweSurface DS App Folder.zip should be placed inside your DAZ Studio application folder. On Microsoft Windows, that would be something like 'Program Files/DAZ 3D/DAZ Studio 4/'. There should already be sub folders like 'scripts', 'resources' and 'shaders'. I'm not entirely sure what that would be with OSX. This is the actual shaders and support scripts needed by DS.

    Edit - Here's what I have on my PC.

    AWE Surface files

    C:\Program Files\DAZ 3D\DAZStudio4\scripts\support\wowie\Surface
    aweSurfaceAttribs.dsa
    aweSurfaceDef.dsa
    aweSurfaceParams.dsa
    aweSurface___displacementAttribs.dsa
    aweSurface___displacementParams.dsa

    C:\Program Files\DAZ 3D\DAZStudio4\shaders\wowie
    aweSurface.sdl
    aweSurface___displacement.sdl

    mustakettu's render script files

    C:\Program Files\DAZ 3D\DAZStudio4\scripts\support\DAZ\ScriptedRenderer\RaytracerGeneral
    RaytracerGeneralRS.dsa
    C:\Program Files\DAZ 3D\DAZStudio4\resources\Scripted Renderer\RaytracerDraft
    RaytracerDraft.dsa
    C:\Program Files\DAZ 3D\DAZStudio4\resources\Scripted Renderer\RaytracerFinal
    RaytracerFinal.dsa

    Post edited by wowie on
  • MollytabbyMollytabby Posts: 1,158

    Thank you Wowie. I’ll try that. I definately put some things in the wrong place. I’m using a Mac.

  • wowiewowie Posts: 2,029

    And for users who keep getting issues d/ling from google drive... Wowie, I remember you told me that time you used Opera; I tried it now and yes it works. Maybe it's worth it adding this recommendation to the original post.

    Well, I used Opera, Firefox and Edge. I used default settings for Opera and Edge and they work fine with Google Drive. Point taken though and I probably need to add mirrors or something. Most likely Dropbox, since that's quite popular too. I have uploaded the readme to my blog, but I haven't uploaded all the images or links to the files or host.

  • wowie said:
    For best performance, the shader is best used with path traced area lights. I made one and bundled it with the commercial pack and there's also mustakettu's Radium AreaPT. I need to check with her first if it's OK to distribute the Radium AreaPT light.

    As long as I won't have to deal with providing tech support for it (or render icons for the content folder and otherwise deal with packaging LOL), you have my full permission. =)

    Just don't change the .sl installation path; I may feel like putting together some light presets eventually so it would be cool if I could release them without editing the paths.

     

  • wowiewowie Posts: 2,029

    As long as I won't have to deal with providing tech support for it (or render icons for the content folder and otherwise deal with packaging LOL), you have my full permission. =)

    Alright. I'll work on it later.

    Just don't change the .sl installation path; I may feel like putting together some light presets eventually so it would be cool if I could release them without editing the paths.

    I won't change those. I'll probably only change the intensity scale into using exposure formula and add a 'Trace Group Membership' so it can be linked to certain surfaces.

  • wowie said:
    I'll probably only change the intensity scale into using exposure formula and add a 'Trace Group Membership' so it can be linked to certain surfaces.

    Not sure about specifically changing intensity to pow-based exposure; I totally don't see myself using that. If you add an extra slider for exposure and have its 0 position bypass the pow, so that it behaves as the "vanilla" version, this should work. Same as adding trace group membership. Then DS will load my presets exactly the same, and these will be just extra params the preset file won't change.

  • RAMWolffRAMWolff Posts: 10,140

    Thanks again Wowie.  Good to know that the base must be installed in order for anything free or commercial being put out there for others.... 

    Oh and I'm a big Opera browser fan.  After Firefox messed themselves up with this total rewrite I just didn't see the speed improvements and too many of my fav add ons no longer worked and their replacements kinda sucked.  Opera rocks for me.... 

  • Oso3DOso3D Posts: 14,878

    I'm very confused.

    The install is missing: C:\Program Files\DAZ 3D\DAZStudio4\scripts\support\DAZ\ScriptedRenderer\RaytracerGeneral
    RaytracerGeneralRS.dsa

    Not sure if that's the issue, but scripted render can't see the two Raytracers that were in the install.

    But when I try to apply one of the included shader presets, it doesn't have an option to include any maps. Also, it doesn't render right (using AoA lights?) at all (I'm assuming lack of scripted render).

     

  • Oso3DOso3D Posts: 14,878

    Also the shader presets don't have bump, displacement, or anything... is that intentional?

  • LlynaraLlynara Posts: 4,770

    That looks fantastic!

  • wowiewowie Posts: 2,029
    Oso3D said:

    I'm very confused.

    The install is missing: C:\Program Files\DAZ 3D\DAZStudio4\scripts\support\DAZ\ScriptedRenderer\RaytracerGeneral
    RaytracerGeneralRS.dsa

    Not sure if that's the issue, but scripted render can't see the two Raytracers that were in the install.

    OK. I see the problem. The RaytracerGeneralRS.dsa isn't included in the archive. The two 'Raytracer' options simply pass the parameters to the RaytracerGeneralRS script. It still should render fine without the script, just slower.

    Oso3D said:

    But when I try to apply one of the included shader presets, it doesn't have an option to include any maps.

    There's no maps included in the package. It will import maps you've already applied to existing dsDefaultMaterial or any of the omnifreaker shaders. You can still add maps once applied.

     

  • Oso3DOso3D Posts: 14,878

    No, what I'm saying is that there's no place to put maps.

    This is after applying 'AWE Base Dielectric'

     

    Huh.jpg
    336 x 456 - 62K
Sign In or Register to comment.