Adding to Cart…
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.You currently have no notifications.
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.
Comments
Here are some notes that those who switched to the "raytrace" hider and enjoy writing their own shaders might be interested in.
I've been exploring how to best combine the awesome GI cache and SSS, and here's what I came up with:
- never use faceforward() in your SSS shaders! It really messes up things;
- for best results with GI caching, SSS should be of the new "raytrace" type: this will handle GI better and eliminate alias-y artefacts that sometimes happen with the old type (you can use the old type fine most of the time, but under certain circumstances there may be edges of your model at which these artefacts appear in the form of jagged black lines, and I hate that);
- however, explicitly enabling this new SSS type to work in DS is different to the published examples, since the subsurface() shadeop refuses to properly handle the "type" "raytrace" parameter; it will have to be specified as a RiAttribute, same as "samples" and all the actual scatter parameters (it means they all go into the rendertime script); "model" "grosjean" and "irradiance" are okay when passed to the shadeop itself;
- the normal (in the sense of "normalise(N)") parameter is essential to the "raytrace" SSS type! It won't work with just P. Old shaders cannot be converted to the new type without adding the normal parameter in the source code (how do I know? I tried adding the "type" attribute to US2 rendertime script, and 3Delight threw error messages about missing parameters and did not compute SSS);
- this new SSS algo is sample-based, so it means it will be noisy; 64 samples is a good mid-quality starting point; 512 should be clear enough for most cases, 256 is okay.
Sometimes this new SSS type does weird things to certain geometry, but it's probably the problem of the models (I saw it with David3 with elf-ear morphs on the ears and the Utah teapot obj, and these models are fairly old), not the algorithm.
Notes on my shader in the render attached:
- it uses two speculars, which is not very 21st century apparently LOL (there should be more work involved to get a realistic layered BRDF), but hey, I like the look;
- a 3Delight's oldschool specular() with a high roughness (0.73) so that it spreads over the surface, high strength attenuated with proper 1.5 eta fresnel: gives this "rim" effect, most noticeable on the nose here; it also has some procedural noise;
- a bsdf() shadeop doing a Cook-Torrance specular with 1.7 eta, roughness 0.35 on skin and 0.2 on lips; also with noise, but I guess its effect is not that pronounced when also using specular maps (or the frequency is too high for this shot);
- the diffuse inside the subsurface() is bsdf() doing an Oren-Nayar with 0.3 roughness (I do not add it the the final colour, it's only for the SSS);
- somehow the results of bsdf(), whether for specular or for diffuse, do need to be multiplied by PI to look good (otherwise they are too dark); it's probably connected to the integration done in illuminance() loop, but I don't know for sure. I'm not that good at maths.
Transmapped hair and GI:
- I still prefer to exclude hair from GI ("occlusion" off in UberSurface), not just because it's still faster (say, 6 mins with hair excluded vs 12+ mins with hair included), but also because including hair in GI will sometimes produce artefacts with the "raytrace" SSS somehow. And the difference in the final look is subtle (well, in my case and to my eye =))
Looks awesome! Which figure is this, G2F? Are these her default eyes, or did you use any morphs on them?
I'd be very grateful if you shared some tips on material settings you use for the cornea and/or eye reflection. I still don't like the way the eyes generally look in my renders, unless I stick a favourite reflection map onto them...
For the code you posted earlier, what do you suggest for nDepth and are there any numbers that should be plugged in? the rest of it earlier seems pretty easy ... but I may have more questions.
// Set the Max Diffuse Bounce Depth
// Attribute "trace" "maxdiffusedepth" [ n ]
aTokens = [ "integer maxdiffusedepth" ];
aParams = [ nDepth ];
Renderer.riAttribute("trace", aTokens, aParams);
// Specular bounce attribute
var nDepth = RenderOptions.rayTraceDepth;
// Find the "Max Specular Bounce Depth" property
oProperty = oOwner.findProperty( "Max Specular Bounce Depth" );
// If the property was found and it's an int property
if( oProperty && oProperty.className() == "DzIntProperty" ){
// Set the max ray depth according to the value of the property
nDepth = oProperty.getValue();
}
// Set the Max Specular Bounce Depth
// Attribute "trace" "maxspeculardepth" [ n ]
aTokens = [ "integer maxspeculardepth" ];
aParams = [ nDepth ];
Renderer.riAttribute("trace", aTokens, aParams);
These should be picked up by Script 2 from Script 1 (Script 1 is (yourname).dsa from the resources\Scripted Renderer\(yourname) folder, Script 2 is the one in scripts\support\DAZ\ScriptedRenderer\(yourname2)) and assigned the "Max Diffuse/Specular Bounce Depth" params we should first insert in the render settings generator (the buildRenderProperties() function in the Script 1). In the code I provide for those, I set the default to 5 for diffuse bounces and 1 for specular (my current shader does not explicitly trace secondary specular bounces, anyway, and neither does UE2).
These repeating patterns in the code -
- are clones of the basic DAZ construct that reads those values from the script No 1 and assigns them to nDepth. nDepth is simply a temporary variable that then passes its values to the appropriate RiAttributes or RiOptions below.
Yes. Genesis 2 Female. The head morph is actually Olympia 6, though the body is Victoria 6.
The eyes diffuse/bump texture is not Amy though, it's maelwenn's Emma.
Settings for the cornea
Opacity is 0% so I turned off everything that depends on opacity (diffuse, transluency, velvet etc).
Refraction is enabled at IOR of 1.4
First layer specular is 100% at 192,192,192 with a glossiness of 7.5% and sharpness of 90%.
Fresnel for the first layer specular is 100%, at a falloff of 1 and sharpness of 80%
Reflection is enabled, set to raytrace with a strength of 30 at 192,192,192.
UberSurface 2 misc options is enabled except for trace displacements and fantom.
Settings for the eye reflection/surface
Opacity is 0% so I turned off everything that depends on opacity (diffuse, transluency, velvet etc).
Bump is enabled at 25% with a min/max value of -0.010/0.010. Bump map is of course loaded into the strength slot. Will generally differe from set to set, but the difference should be negligible since min/max value is set quite low. They're just there to 'break' up the reflection/specular highlights a bit.
First layer specular is 100% at 192,192,192 with a glossiness of 45% and sharpness of 60%.
Fresnel for the first layer specular is 25%, at a falloff of 0.75 and sharpness of 50%
Reflection is enabled, set to raytrace with a strength of 30 at 192,192,192.
Second layer specular is 100% at 192,192,192 with a glossiness of 5% and sharpness of 25%.
Fresnel for the first layer specular is 100%, at a falloff of 1.5 and sharpness of 90%
UberSurface 2 misc options is enabled except for trace displacements and fantom.
Some tips for eyes:
* You can't use SSS on the sclera since you'll lose the very fine details there (capillary veins near the 'outer' sclera). I work around this by mixing first layer and second layer diffuse with different roughness and strength.
* Add a bit of specular to the iris, just to give them a little bit of highlight. Don't forget to use a bump/displacement so it doesn't look uniform across the surface.
* Don't forget about the tear part of the eye (above the lower eyelids). They help provide hints of wetness to the eyesurface.
Thanks, Mustakettu85, I'll give it a whirl and see if I did it correctly soon. Gotta run back to work now.
And wowie, thank you for those details!!
Thank you very very much! Will definitely give your settings a try.
Would you consider using refraction on the tear?
Ok, rejoining the discussion from over in the Ubersurface tutorial thread. Some interesting stuff with the scripted renderer. I must look a that.
What is the deal with progressive rendering? I wasn't using it, heard something bad and took it as gospel. Tried it out, liked it... Then compared a render vs bucket and didn't like the progressive results so much. The progressive was kinda washed out, defiantly grainier occlusion. Is there stuff one needs to know to use this effectively?
You could, but I think it's unnecessary for a small surface and very small part of the render that the extra effort and penalty on render time.
Progressive render did have a major memory leak initially, which made a lot of us shy away from it - I wa amazed when told to try it on a painfully slow scene and found it gave a massive speed boost. However, you are right that for some lights it can be noisier than standard rendering (I found it very much worse using the Bounce setting for uberEnvironment).
I see Richard have chimed in as well.
As I noted in the Ubersurface thread, the progressive rendering uses the raytrace hider, which is very fast when rendering objects with lots of polygon and opacity maps (think hair). I don't generally use the bounce GI mode of UE2 (since it's very, very slow) so I never used it.
What I really like about progressive rendering is that it solves texture seams issues with some texture/character set. It is almost like using shading rate below 0.5 (which means your UE2 samples and shading rate must be adjusted as well). Below are renders without and with progressive rendering with the same shading rate (shading rate is set to 1).
For that seam to disappear, I'd have to bump the shading rate to something like 0.2 or 0.1, which makes renders with any kind of transmapped surfaces very, very slow.
I also like the fact that the progressive renders picks up details from bump maps and spec maps much better, again generally similar to what you get if you use shading rate below 0.5.
Yes, I use 100% SSS and only 5% diffuse (otherwise all that diffuse reflection of light wipes out your nice subsurface effects). Here's an example of my 100+5 with Vicky4 (props to Mustakettu85 for getting me this far!)
Of course, the only problem with a diffuse setting of 5% is that the figure looks jet black in the viewport! (which can make posing a bit of a challenge)
Ok....woah. Shading rate of 1? I can get good results with a shading rate of 1? That's a game changer, even if I gotta figure out the grain and loss of saturation.
Ok....woah. Shading rate of 1? I can get good results with a shading rate of 1? That's a game changer, even if I gotta figure out the grain and loss of saturation.
Never had that problem with seams so I don't often go under shading rate 1. Interesting. Made a simple render. For me the quality is the same and didn't really see speed gain but I'll have to test with serious statistics. But I'm not really sure it can go quicker than point cloud rendering
My biggest concern about progressive rendering was that is used more memory and I did have the memory leak problem. Seems to work better now but I only tested a simple scene. I'll try some bigger scene and see how it goes.
@Muskat : No I didn't recreate the raytraced SSS. Just tested it as soon as I saw it in the release log of 3delight.
I don't really remember what I was looking for in 3delight. May come back later
Never had that problem with seams so I don't often go under shading rate 1. Interesting. Made a simple render. For me the quality is the same and didn't really see speed gain but I'll have to test with serious statistics. But I'm not really sure it can go quicker than point cloud rendering
My biggest concern about progressive rendering was that is used more memory and I did have the memory leak problem. Seems to work better now but I only tested a simple scene. I'll try some bigger scene and see how it goes.
@Muskat : No I didn't recreate the raytraced SSS. Just tested it as soon as I saw it in the release log of 3delight.
I don't really remember what I was looking for in 3delight. May come back later
In simple scenes it's still slower, in my experience, and still uses a bit more memory (but not a runaway amount).
3Delight message #141 Severity 1: D2045 PixelFilter reset to Box 1x1 (display driver requirement).
So what's this mean? I have never really understood the Pixel Filter... what it does, or how to use it.
If this is with progressive render it seems to be unavoidable, it's not entirely clear whether it matters or not - certainly progressive render looks different from plain 3Delight.
When in doubt, render to RIB and look at the text inside... the only thing different about the progressive and REYES RIBS is the "Hider "raytrace" "int progressive" [ 1 ] " line in the progressive case.
When I added the progressive option to Berto Durante's teapot.rib (not DS-generated), the standalone still resets the filter to box 1x1. Apparently it's nothing but the requirement of the progressive display driver. Box is a fast filter, faster than sinc, maybe that's why the DNA folks are using it for the progressive mode.
Has anyone tried testing those grain-prone scenes with setting the filter to box 1x1 in the REYES hider? Maybe the filter is the reason for the grain? Because I never got that sort of grain when using the "raytrace" hider in non-progressive mode.
That's indeed the way it should be, according to 3Delight devs: REYES is still faster for simple scenes, while the path tracer is much faster for complex ones.
You mean for GI? I'd say GI cache is faster and more reliable for me than point-clouds. For instance, point cloud generation somehow does not see those surfaces that use no explicit diffuse (like, UberSurface2 with SSS only), and I haven't figured out why.
I don't think it is needed, because the raytrace hider samples differently than the REYES one.
From 3delight's manual:
http://www.3delight.com/en/uploads/docs/3delight/3delight_39.html#SEC159
"Can produce nicer refractions and reflections since there is one shading point per subsample and not per micro-polygon."
There's no need to go into lower shading rate since it's already using subsamples.Since the pixels are computed more accurately, using more complicated filters is also not necessary and in fact introduces noise (blurring).
But noise and blurring are mutually exclusive, aren't they?
Filters are largely an artistic choice, anyway. I much prefer sinc to anything else, but there's folks out there who swear by the gaussian...
In my tests last night, I noticed things that I had not noticed before: better hair -- more vibrant; clearer eyes -- not sure what that was, better specular? Definitely will be keeping to the progressive render. Cleared up some of the grain I was seeing with better settings on my AoA Ambient light.
And whoever mentioned better bump was certainly correct. I was shocked to notice the detail I was seeing from the mediocre bump maps I was rendering with.
I think that was me. :)
Did some test with the dragon slayer scene so that everybody can test the same
I get some very surprising numbers
Test Protocol : Load Dragon Slayer Tutorial scene
Change Shading rate to 1
Change Gamma to 2.2
1/ Hit Render. Should be Reyes Hider
2/ Activate Progressive rendering
3/ Point cloud script. Cloud shading rate = 4. Simple Occlusion light disabled. Gamma 2.2. Shading Rate = 1
4/ Export To RIB File. Render with latest external 3delight x64 v11.87
5/ Add Raycache option to RIB
6/ Disable Raycache and Enable Raytrace Hider in RIB
7/ Enable Raycache and Raytrace Hider in RIB
Rendertimes Results :
1/ Normal (Reyes?) Total Rendering Time: 2 minutes 47.67 seconds
2/ Progressive Raytrace Total Rendering Time: 3 minutes 48.79 seconds
3/ PointCloud Total Rendering Time: 3 minutes 8.48 seconds
4/ External 3DL Total Rendering Time: 11 minutes 6.48 seconds
5/ External 3DL Raychache ON Total Rendering Time: 8 minutes 23
6/ External 3DL Hider Raytrace Total Rendering Time: 6 min 45
7/ External 3DL Raychache ON + Hider Raytrace Total Rendering Time: 5 min 06
That is not what I expected. Some optimisations done from DAZ in the 3DL integration or a problem with my 3delight?
The DAZ version of 3Delight can use unlimited cores for one computer. The free external 3Delight from DNA is limited to only 4-cores.
Test done on a Quadcore. No difference there
AMD or Intel? If it's Intel, maybe the unlimited/limited cores applies to the hyper-threading as well. So if you are using Intel, you have more threads available for the DAZ version so a boost in performance. I can't imagine it being optimized faster for DAZ.
It's AMD. No hyperthreading.
In fact my 3delight installation had a problem. After deinstalling and reinstalling I got some more logical numbers. Didn't work by just installing over the preceding one
So here are the new serie for External 3delight. The new one has a counter performance with Raycache and Raytrace active
Second
External 3DL Total Rendering Time: 2 minutes 16. seconds
External 3DL Raychache ON Total Rendering Time: 2 minutes 23
External 3DL Hider Raytrace Total Rendering Time: 3 min 01
External 3DL Raychache ON + Hider Raytrace Total Rendering Time: 3 min 06
Reyes still winning. I'll try the other Tutorial scenes and if Reyes is still ahead, I'll try with more complex scene, lightning and shaders
One thing is missing : Point cloud with external 3DL
Question would be : when is a scene complex enough to get some gain over Reyes?
The answer - throw in some transmap or fiber mesh hair.