3Delight Surface and Lighting Thread

1181921232452

Comments

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

    No rather a simple sphere I forgot to subdivide with a glow shader or a modified glow shader

  • wowiewowie Posts: 2,029
    edited December 1969

    I've restructured my UberArea light setup. Instead of using intensity, I'm now using falloff to control how much light hits the surface and scale to control how hard/soft the shadows will be. One thing I like though is that I haven't seen blocky shadows with the current UberArea lights. I did experience this with earlier versions so I'm guessing something else got 'fixed' by DAZ somewhere.

    Another plus is I don't have to deal with occlusion artifacts anymore. If you have a very evenly lit scene, even the default sample value of 8 is enough. If you have more areas in shadows, upping it to 64 when rendering with multiple lights produces very smooth shadows. Render times with 8 samples seems to be in the 2 to 3 minutes region, while with 64, I've seen that go to something between 5 to 6.

    I'd admit, it isn't as cool as GI bounce since I'm faking environment light with well placed area lights. But I really like having specular from other directions. Until we get an ambient/IBL light that can produce decent looking speculars, I like this approach best. It's somewhat troublesome to set up since you need to adjust the placement and strength so it matches your scene, but I'm liking the results and render times.

    2.jpg
    800 x 1040 - 300K
  • Kevin SandersonKevin Sanderson Posts: 1,643
    edited December 1969

    Thanks, Kettu! Nice render, Takeo!

    Wowie, that's very nice and I like the render times. I may be wrong, but I thought DNA tweaked some stuff in 3Delight a while back and improved shadows was one of those things along with the speed increase of the ray tracer. Since DAZ recently updated the version of 3Delight, we might be finally seeing those improvements.

  • wowiewowie Posts: 2,029
    edited December 1969

    Some quick and dirty tests, practicing lighting a room with several UberArea lights.

    Most of the renders took about a minute. The setup of lights and materials is probably the most time consuming. These are all done with DS default shaders, plus there's no bump/displacement maps so I make do with using the diffuse maps. Most of the objects don't have separate surface/material zones, so that explains why the bumps are too rough on some parts.

    Oh yeah, it's 'The Study'.

    5.jpg
    800 x 1040 - 798K
    4.jpg
    800 x 1040 - 706K
    3.jpg
    800 x 1040 - 701K
    2.jpg
    800 x 1040 - 702K
    1.jpg
    800 x 1040 - 748K
  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited December 1969

    @kevin and kettu : thanks but that is not really a nice render in my view. I'll make something better with hairs someday

    @Wowie : seems good to me

    made a little experiment with glass reflection/refraction, caustic, photons, indirect light

    Only a 960 x 540 with raytrace hider already takes 30 min and some parts are not cleanup yet. And I only set max ray depth at 4
    That's where you'd like to have importance sampling...or fake a lot to get something quicker

    Shadows work but are not correct yet I think. Of course custom shaders

    Glass_IDL_Caustic_Refl_Refr.PNG
    973 x 550 - 747K
  • wowiewowie Posts: 2,029
    edited August 2014


    made a little experiment with glass reflection/refraction, caustic, photons, indirect light

    Only a 960 x 540 with raytrace hider already takes 30 min and some parts are not cleanup yet. And I only set max ray depth at 4
    That's where you'd like to have importance sampling...or fake a lot to get something quicker

    Shadows work but are not correct yet I think. Of course custom shaders

    MIS would help a lot. I generally still see some bits of fireflies with my glass preset, typically right round the edge of objects.

    Post edited by wowie on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    wowie said:
    Until we get an ambient/IBL light that can produce decent looking speculars, I like this approach best.

    Have you tried my tutorial for converting Envlight2 for DS? It can do specular quite well, I'd say.

    And I love your "oldschool" lighting. It's always awesome to see someone create magic without GI. Your beautiful room renders reminded me of these ones by Mathaeus - dozens of spotlights with DSM, to amazing effect:
    http://www.si-community.com/community/viewtopic.php?f=24&t=1275&sid=5efcfd420b3647c3cb90d573ef412aaf&start=160

    -------


    That's where you'd like to have importance sampling...or fake a lot to get something quicker

    There is MIS actually, but I'm not sure it works for photons. For raytracing, you can use the "weight" parameter in trace(), see Berto's post here:
    http://www.3delight.com/en/modules/PunBB/viewtopic.php?pid=20802

    Ketih later posted his finished shader here: http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=3974

  • wowiewowie Posts: 2,029
    edited August 2014


    Have you tried my tutorial for converting Envlight2 for DS? It can do specular quite well, I'd say.


    Haven't tried it yet. Still working on getting the materials 'right' first. Does it work with your script? More precisely, can we at last have indirect specular?


    And I love your "oldschool" lighting. It's always awesome to see someone create magic without GI. Your beautiful room renders reminded me of these ones by Mathaeus - dozens of spotlights with DSM, to amazing effect:
    http://www.si-community.com/community/viewtopic.php?f=24&t=1275&sid=5efcfd420b3647c3cb90d573ef412aaf&start=160

    I saw his thread a while back. My hair preset is loosely based on what he accomplished in Softimage. Too bad Autodesk decided to kill that app.

    Here's some more study renders. Reworked the lights and made some quick and dirty bump maps and soften the bump settings a bit. There's still some blocks and splotches in the maps. Just need to clean that up and find the best bump/displacement settings.

    3.jpg
    800 x 1040 - 677K
    2.jpg
    800 x 1040 - 586K
    1.jpg
    800 x 1040 - 595K
    Post edited by wowie on
  • wowiewowie Posts: 2,029
    edited August 2014

    I did some test with UE2's bounce GI with UberArea LIghts. Discover something interesting and perhaps other can provide confirmation. If Szark is reading this, he may want to ask omnifreaker for clarification (or hopefully, a fix).

    UE2 will bounce light from UberArea lights. However, they will only bounce diffuse if the object uses any of his shaders (HSS, UberSurface/UberSurface2).

    UE2 will 'kill' any specular from HSS, US and US2 when used solely as an ambient light. Again, this does not affect AoA's shaders or dsDefault materials.

    Post edited by wowie on
  • SzarkSzark Posts: 10,634
    edited December 1969

    I have added this to my list

  • SertorialSertorial Posts: 962
    edited December 1969

    wancow said:

    For now, I'll be using this light set: http://www.sharecg.com/v/69039/view/21/DAZ-Studio/WC-3Delight-Baseline-Test-Lighting

    It contains four lights, Ue2 and a camera. The standard 3 Point Light Set, Key, Fill and Back, and a specular light attached to the camera.

    Thanks. I am going to go through this very useful looking thread as I have a lot to learn about lighting.

    But first off, you say the lights are attached to the camera. Does that mean that if I move my camera1 the lights will move with it? because obviously it's important to preserve the spatial relationship between lights and camera, right?

    I ask, because the scene tab doesn't appear to show the lights nested under the camera1 (which is usually how it looks when something is parented). In fact, the camera appears to be nested under "All lights" (which would suggest that the lights have to move the camera, not the other way around)

    Thanks

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

    There is MIS actually, but I'm not sure it works for photons. For raytracing, you can use the "weight" parameter in trace(), see Berto's post here:
    http://www.3delight.com/en/modules/PunBB/viewtopic.php?pid=20802

    Ketih later posted his finished shader here: http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=3974

    I know. Got something similar since a bit of time but didn't have time to get where I want. I'm not sure you'll get caustics with what's in the thread

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    I'm not sure you'll get caustics with what's in the thread

    No, you won't, that's true; it's for an opaque surface without refraction. Just an example of their MIS implementation.

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

    Btw found out one of the thing that are not in 3delight but in Pixar Renderman : http://renderman.pixar.com/resources/current/rps/rerendering.html

    There are some others

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Btw found out one of the thing that are not in 3delight but in Pixar Renderman : http://renderman.pixar.com/resources/current/rps/rerendering.html

    There are some others

    Yeah, that's cool. There's a similar thing in 3Delight for Max, but probably not with arbitrary camera change support: http://www.yudin.org/2014/04/multi-light-rendering-in-3delight-for.html

    They also handle physically plausible shading via different shadeops. I think trace() did some extra stuff in 3Delight even before that.

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

    In fact 3delight implemented IPR rendering but that is not documented and I don't really know if they did something similar to pixar or anything else

    Seems IPR is coming soon in DS so just have to wait a bit to see and judge

  • wowiewowie Posts: 2,029
    edited August 2014


    Have you tried my tutorial for converting Envlight2 for DS? It can do specular quite well, I'd say.

    I've been browsing around for info on envlight2 and found this.
    http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=1654

    I think what he means by saying it won't work is that while an ambient light can cast specular, the specular is uniformly distributed and doesn't/can't take into account the bright spots from HDRI image. So, in the end, you're still left with the need to have specular lights, which kinda defeats the purpose anyway.

    This is the case with AoA's Ambient Light too. So unless some mad genius found some trickery, I think it will behave pretty much the same.

    Post edited by wowie on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    In fact 3delight implemented IPR rendering but that is not documented and I don't really know if they did something similar to pixar or anything else

    Seems IPR is coming soon in DS so just have to wait a bit to see and judge

    They usually do Their Own Thing (tm), it seems =D

    Hmmm sounds cool! I wonder if we are ever going to get a good easy RiIlluminate integration (for the lurkers' sake, it means like to get arbitrary lights to light only arbitrary surfaces). I'm too stupid to code it meaningfully on my own =)

    --------


    I think what he means by saying it won't work is that while an ambient light can cast specular, the specular is uniformly distributed and doesn't/can't take into account the bright spots from HDRI image. So, in the end, you're still left with the need to have specular lights, which kinda defeats the purpose anyway.

    In theory, that's totally true. This is why I dislike it that AoA's Ambient - that was not even meant to be IBL - ever casts that specular (and may even load with it on by default - a friend of mine got a persistent highlight in the center of a mirror and didn't know what to do...).

    But - as you can see from the attached renders, the map does influence specular intensity (surface specular set to green for best visibility, diffuse off just in case; envlight2 set to spec-only, in "shader" envspace and three values of Y rotation; the map is this one - http://www.openfootage.net/?p=329 - converted to TIFF via omnifreaker's script). It may not be completely physically correct, but good enough for many purposes... A lot will depend on the map, too, I think.

    For indirect/environment specular, I have personally moved on to using easy glossy reflections in my shaders via the new capabilities of trace() shadeop (it can also automatically call an environment map when the rays don't hit geometry, very cool). UberSurface could be set up to use blurred raytraced reflections, too, and this should be quite fast with the raytrace hider, but I don't think UberSurface raytraced reflection takes the map into account when there's no geometry. Or maybe it does. It's not documented and I haven't tested.

    Either way, even if it does not - you could use a big sphere around the scene, use UberSurface on it, set a HDR map into its diffuse, forbid it to cast/receive shadows and disable GI/occlusion on it. But if you leave "raytrace" on in UberSurface, it will be visible to specular rays (reflection rays), so your blurred raytraced reflection will see it.

    With GI on, this HDR-enabled sphere should also cast some noticeable light, I think. It will definitely cast if you turn ambient on (and put the HDR there, too) - all non-shaded objects, like those with ambient channels on or the Glow shader, will act as emissive. No specular, of course, so not really a true replacement for area lights, but still very cool.

    envl2_speconly_shaderspacerotation.jpg
    1696 x 845 - 281K
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Oh BTW, for those who don't use UberSurface2 or write their own shaders - Tofusan posted another shader mixer network with the SSS brick:

    http://www.sharecg.com/v/76970/gallery/21/DAZ-Studio/Subsurface-Skin-Shader

    It's different enough from AoA's Subsurface - way easier to use, I'd say. Also has interesting additional controls.

    Its raytraced reflections won't take environment map into account, though.

    Here's a test render with my free Fantasy lights and a screenshot of the settings (not much tweaking there, but still - and I had to ditch Bree's way too dark specular maps, specular gain didn't help). No SSS scatter/absorb settings shown because they're default. Saturation slider makes a lot of difference, IMO. I think I should code one in my shader, too - I have division right now, but this may also be handy.

    settings_tofusantest.png
    937 x 514 - 52K
    tofusan_sssnetwork_bree.png
    385 x 600 - 252K
  • wowiewowie Posts: 2,029
    edited August 2014


    But - as you can see from the attached renders, the map does influence specular intensity (surface specular set to green for best visibility, diffuse off just in case; envlight2 set to spec-only, in "shader" envspace and three values of Y rotation; the map is this one - http://www.openfootage.net/?p=329 - converted to TIFF via omnifreaker's script). It may not be completely physically correct, but good enough for many purposes... A lot will depend on the map, too, I think.

    It is specular, but it's certainly not specular highlights Looks totally wrong.


    For indirect/environment specular, I have personally moved on to using easy glossy reflections in my shaders via the new capabilities of trace() shadeop (it can also automatically call an environment map when the rays don't hit geometry, very cool). UberSurface could be set up to use blurred raytraced reflections, too, and this should be quite fast with the raytrace hider, but I don't think UberSurface raytraced reflection takes the map into account when there's no geometry. Or maybe it does. It's not documented and I haven't tested.

    Either way, even if it does not - you could use a big sphere around the scene, use UberSurface on it, set a HDR map into its diffuse, forbid it to cast/receive shadows and disable GI/occlusion on it. But if you leave "raytrace" on in UberSurface, it will be visible to specular rays (reflection rays), so your blurred raytraced reflection will see it.

    If i remember correctly, that's what 3delight devs and omnifreaker recommend. Thing is, render times gets very slow once you have object(s) that has reflection and refraction in the scene, requiring you to bump ray trace depth more than 2. For instance, with the Study scene where there's various glass objects, I had set it up to 12 to get all the refractions. If I enabled reflections on all surfaces to get indirect specular, render times would be quite long even without indirect light or bounce GI. The raytrace hider is fast, but it's not that fast (yet).

    Yes, I could cheat and just composite two renders with different ray trace depth settings, but I'd rather not do it. If I wanted a cheat, I could just easily put a reflective sphere in the center of the scene, bake the reflection into an environment map and use that.

    This is interesting:
    http://www.karstendaemen.com/thesis/files/rawdraft.pdf

    If this works the way I think it is, I'm pretty impressed.

    Post edited by wowie on
  • wowiewowie Posts: 2,029
    edited December 1969

    Mustakettu85, I don't know if you aware of this, but you probably want to re-evaluate that SSS scale you recommend. Look at the below render of two M6. One with an SSS scale of 0.5 and the other at 0.1. With SSS scale of 0.1, you get over brightening of surfaces when the figure is further away.

    This is with US2, but I think it also applies to the all shaders using the same SSS shader code.

    SSSScale.jpg
    800 x 1040 - 143K
    SSSshading_rate.jpg
    800 x 1040 - 129K
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited August 2014

    wowie said:

    It is specular, but it's certainly not specular highlights Looks totally wrong.


    The distribution looks similar to a specular from a large plane light right behind the camera, but with lower glossiness (see comparison). So not "totally" wrong, but "limitedly" wrong. =)

    wowie said:

    Thing is, render times gets very slow once you have object(s) that has reflection and refraction in the scene, requiring you to bump ray trace depth more than 2. For instance, with the Study scene where there's various glass objects, I had set it up to 12 to get all the refractions. If I enabled reflections on all surfaces to get indirect specular, render times would be quite long even without indirect light or bounce GI.

    That's true.

    This is why RiAttributes are actually specified per-surface - you could have a global attribute with max specular bounce of 2, and then a specific one all the way up for one refractive object. Then you only take the hit for this object. The RiOption "trace" "maxdepth" also should be set same or higher than your max refractive depth (it is the ultimate global raytracer limit).

    In DS, we are used to simply setting globals via the render settings tab (which also conflates all the max depth attributes and maxdepth RiOption to a single value - while it does not have to be like that), and that's generally that, but there is way more flexibility "hidden". Via a render script, we can set global attributes and options separately (like I show in my GI script).

    We can also set any per-surface attribute in DS via a rendertime script attached to a shader. All SSS shaders rely on this: SSS parameters are all RiAttributes. It's just that nobody ever bothered to implement other RiAttribute calls.

    It should be a trivial matter to add this functionality to a new shader. More complicated with pre-compiled ones, but doable if the shader's integration scripts (the rendertime one _and_ the DS interface parameter-creating one) are editable (not encrypted).

    I suggest these edits to UberSurface2 files whose scripts are plaintext (if your DS is in Program Files, you will likely need admin access to edit these files):

    1) In this file - DAZStudio4\scripts\support\omnifreaker\shaderDefinitions\surface\omUberSurface2Surf.dsa:

    After line 424 (no word wrap for line count; it should be after other "Visibility" properties) insert:

    
    // Kettu edits
     addIntProperty( "Visibility", "Max Specular Depth", "Max Specular Depth", undefined, 1, 12, 1.0,
     undefined, true, false, false, undefined, undefined);
    // end Kettu edits 
    

    2) In this file - DAZStudio4\scripts\support\omnifreaker\rendertime\omUberSurface2Attribs.dsa:

    After line 21 (before Opacity starts) insert:

    
    // Kettu edits
        oProperty = g_oMATERIAL.findProperty( "Max Specular Depth" );
      if( oProperty && oProperty.className() == "DzIntProperty" ) {
      Shader.setIntegerAttrib( "trace", "integer maxspeculardepth", oProperty.getValue() );
      }     
    //end Kettu edits
    

    Use a good free text editor, like Notepad++ or PSPad.

    I haven't yet tested extensively, but it generates proper lines in the RIB file. Give it a try.

    Per-surface attributes should override any global value, whether higher or lower. Keep that in mind.

    If you find you don't want these settings anymore, simply comment them out or delete the lines.

    Then, there is also manually editing RIBs. It's not cheating - from the 3Delight POV. Maybe it is, from the DS POV =)

    You need to add this to a surface in a RIB:
    Attribute "trace" "maxdiffusedepth" [n]
    Attribute "trace" "maxspeculardepth" [n]
    Specifies the maximum depth for reflections and diffuse bounces.
    http://www.3delight.com/en/uploads/docs/3delight/3delight_27.html#SEC52

    RiOptions belong in the beginning of the RIB:
    Option "trace" "integer maxdepth" [n]
    This option sets the maximum recursion level for the ray tracer. Valid values are between 0 and 32, inclusively. Any value outside of this range is interpreted as 32 and a value of 0 turns off ray tracing. The default value is 2.
    http://www.3delight.com/en/uploads/docs/3delight/3delight_26.html



    This is interesting:
    http://www.karstendaemen.com/thesis/files/rawdraft.pdf

    If this works the way I think it is, I'm pretty impressed.

    Neat =) Larry Gritz's BMRT (a now-defunct Renderman-compliant renderer) had specular-to-diffuse light transport (not sure if it used point clouds, though). Someone had to try to do it again =) As they mention in the article, the biggest problem with that approach is speed... photon mapping is more efficient at this, although still not lightning-fast yet.


    With SSS scale of 0.1, you get over brightening of surfaces when the figure is further away.

    That is a shading rate issue, "classic" SSS artefacting when the shading rate is too high. The older SSS shaders still rely on their SSS shading rate, even in the raytracer.

    First of all, smaller scales will always need lower shading rates to calculate correctly, because small-scale scatter happens in a thinner layer - hence needs more precision.

    Shading rate is also render-space dependent, i.e. for smaller picture area, you need it to be more precise to avoid artefacting. When you move the figure away, it occupies less screen space = needs lower shading rate to get the same results.

    I actually explain this all on page 7 of the tutorial and recommend exactly that to those who follow "my" (i.e. physical-based) scale, lowering shading rate for long shots. Or not using SSS - often, when the figure is far away, it's not worth it to take a hit to render time - the effects may not be that noticeable. (It's not a cheat, it's an optimisation =))

    Also make sure the figures use different SSS groups (maybe the "0" group, the automatic one, works okay, too).

    Take a look at the renders: these are with the raytracer, sinc filter 6x6, simple direct lighting and US2 with 0.1 scale.

    raytracer_sinc66_directillumonly_comparison.jpg
    1533 x 1280 - 652K
    specular_comparison.jpg
    1125 x 880 - 234K
    Post edited by Mustakettu85 on
  • wowiewowie Posts: 2,029
    edited August 2014


    That is a shading rate issue, "classic" SSS artefacting when the shading rate is too high. The older SSS shaders still rely on their SSS shading rate, even in the raytracer.

    Take a look at the renders: these are with the raytracer, sinc filter 6x6, simple direct lighting and US2 with 0.1 scale.

    Except in my render, I've already half the shading rate for the figure further away. Both figures are using SSS scale of 0.5, the foreground with SSS shading rate of 4 and the background is 2 (same group ID). My point is that your values are set way too low. By setting the SSS scale a bit higher, you end up with faster renders and more flexibility with level of detail problems. Plus looking at your values, I would say you're adding render times (via lower shading rates) that isn't contributing much in terms of visual fidelity. In fact, you actually end up adding a new problem.

    Even with a SSS scale of 0.3, i can still place the figure more than 12 m away (1/4 the size of the foreground figure) and have no visible banding or overbrightening at a shading rate of 2. I ended up using 0.5 only when the figure is more than 25 m away. There's still no visible banding and no overbrightening at 30 m away.

    Post edited by wowie on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    wowie said:

    Except in my render, I've already half the shading rate for the figure further away. Both figures are using SSS scale of 0.5, the foreground with SSS shading rate of 4 and the background is 2 (same group ID). My point is that your values are set way too low.

    But you are adding diffuse, aren't you? I don't; and I'm not too fond of the higher scale look without it.

    Besides, I find that the rendertime hit for low shading rates is largely balanced by the decrease in render time that always comes with long shots (vs closeups - must be the mipmapping at work). Since I only do stills, not animations (and I never ever wrote anything aimed at animators), if there is an increase, it's negligible, to me. It's never been of the raytracing-through-transparency magnitude.

    I've already said that I value minimum tweaking time above all, and 0.1 gives me exactly that, consistency over a wide range of geometries.

    Shading rate will hopefully soon be a thing of the past, anyway. Someone just has to alert Omnifreaker to updating a few things in the code - when it's recompiled properly. And even if he does not... I hope to release my shader in a few weeks' time, and it will be free and open-source.

    And - the most important thing - I'm not a ruling goddess-queen of all things render-related, so everyone is able to disregard what I say and do their own thing, if they please =)

    I believe waaay more people are buying your presets than reading my tutorials (and particularly putting what they read into practice). So it's not like I've terminally poisoned the community with impractical-but-rigidly-manual-compliant advice =D

    I share what works for me; what goes into my renders. Nothing else. You share your vision; other ones share theirs. There's a choice for everyone.

  • wowiewowie Posts: 2,029
    edited August 2014


    But you are adding diffuse, aren't you? I don't; and I'm not too fond of the higher scale look without it.

    I am. But that's just my trick of basically setting how much translucence you want with the skin. If you disable the second diffuse, you can still play around with 1st layer diffuse and SSS strength to get the look you want (more diffuse, less SSS). Specific to UberSurface2, you can also play around with the SSS scattering/absorption strength. Be careful not to set the SSS scatter/absorption too high though, it can also lead to artifacts with SSS shading rate values above 1.

    I believe everyone have their own approach, technically and stylistically, while factoring a lot of things in their decision. .I'm just posting info to point out that there are some disadvantages to your approach, that you may or may not have known before. There's still a lot of misconception or general lack of knowledge about shading rates..


    Besides, I find that the rendertime hit for low shading rates is largely balanced by the decrease in render time that always comes with long shots (vs closeups - must be the mipmapping at work). Since I only do stills, not animations (and I never ever wrote anything aimed at animators), if there is an increase, it's negligible, to me. It's never been of the raytracing-through-transparency magnitude.

    Well, try rendering a scene at medium-to-high resolution, say at 1280x720 with two or three figures, all with SSS and different group IDs. All that precomputation pass can really add up, even when you're just doing stills. Me, I'd rather spend those processor cycles doing something else, like reflection, refraction etc. Or hair, transmapped or otherwise.


    I've already said that I value minimum tweaking time above all, and 0.1 gives me exactly that, consistency over a wide range of geometries.

    Like I said earlier, those values cause problems with some render scenarios. I'm simply stating that if you're willing to use a much higher scale, you can have the same look with a lot more flexibility in choosing shading rate used per each level of detail. We are talking about a difference of no more than 2 to 4 mm here.

    Post edited by wowie on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited August 2014

    wowie said:

    I believe everyone have their own approach, technically and stylistically, while factoring a lot of things in their decision. .I'm just posting info to point out that there are some disadvantages to your approach, that you may or may not have known before. There's still a lot of misconception or general lack of knowledge about shading rates.
    ...
    Like I said earlier, those values cause problems with some render scenarios. I'm simply stating that if you're willing to use a much higher scale, you can have the same look with a lot more flexibility in choosing shading rate used per each level of detail. We are talking about a difference of no more than 2 to 4 mm here.

    Well thank you, but I did know all the potential issues =) And that's great that you are posting your observations, for the sake of everyone else (I actually hope there's more people lurking here than just the handful of us "regulars"). There is actually no one-size-fits-all scenario, as much as we'd want to have one... When I read articles detailing the big name production approaches, it's amazing how complex their optimisations become.

    ------

    Okay, now Radium time. Here's a new take on my test scene, the skin is my shader doing raytraced SSS. Right now it's "naked" SSS (Grosjean model, and the diffuse inside the SSS is Oren-Nayar, this is why it looks less "waxy"). It also has bsdf()-based specular layers (Blinn and Cook-Torrance, both with Fresnel, of course, and using actual IORs), bump (I will add displacement soon) and blurred reflection, using Blinn distribution, also with Fresnel (reflection is off by default; on in the second render). For the reflection, it can simply use envmaps and blur them (fast but not accurate, as we all know) or do raytracing (also with optional envmaps to sample when there's no geometry to hit within max distance).

    I also implemented colour correction - these are Dawn's default maps, but they are desaturated and lightened within the shader. I haven't precisely measured how much render time it adds, but doesn´t seem to be much.

    There's also a cheat-y "velvet" specular layer, but it's off in these renders. I think I will include a Westin velvet somewhere down the line, it may be useful for non-skin materials.

    Actually I did a very stupid thing with the blurred reflection in the second render - by letting it trace over 10 meters, which it certainly does not need. So it's 12 minutes with GI only (384 SSS samples - it's Dawn, and she's capricious; Genesis and G2 seem to need fewer samples, or maybe maps also play a part... or maybe the oh-so-pretty PhysicalSun I'm using here is a slower light - well, it should be... I'll see if I can make it faster for this scene), and 20 minutes with the indirect specular (diffuse and specular bounces of 2 in both renders). Should be faster with a smaller trace distance. I am going to do tests to determine the really necessary max distance.

    What the blurred reflection does... actually gives that subtle extra lightening in the shadow - there seems to be something going on in the render engine behind the scenes that does not let this reflection overpower the directly-lit surfaces (you will see it under direct light, but only when the SSS colour is dark enough). I am simply adding the reflection calculation to it and speculars.

    The brows/makeup are a geometry shell - I'm thinking of adding a mix layer of diffuse to handle these without shells... The lips are UberSurface, but in the second render they are also doing blurred reflection. Unlike the "physically plausible" trace()-based blurred reflection that does a physical attenuation of reflection strength with roughness, UberSurface needs setting strength by hand. It also cannot use a map to account for when rays do not hit geometry, so it needs to have trace distance all the way to the plane-with-a-landscape-on that handles eye reflection (there's no control for trace distance in the UberSurface shader, anyway).

    Tip: I exclude transmapped geometry shells from GI when using them for non-displaced stuff like makeup etc. When you exclude a surface, it gets lit by GI okay (because the GI light is a diffuse light), but then this surface casts no GI-based shadows underneath itself (those we won't see anyway). Makes calculations faster.

    Oh yeah, eyelashes don't need GI either. They don't cast that silly a shadow as the one they do with AO only, but still: they're too tiny to really bounce anything (simple direct-light raytraced shadow is enough), and they will annoyingly eat some render time when they are included.

    dawn_radium_glossyreflection.png
    600 x 1000 - 1M
    dawn_radium_gi-only.png
    600 x 1000 - 1M
    Post edited by Mustakettu85 on
  • wowiewowie Posts: 2,029
    edited December 1969


    Okay, now Radium time. Here's a new take on my test scene, the skin is my shader doing raytraced SSS. Right now it's "naked" SSS (Grosjean model, and the diffuse inside the SSS is Oren-Nayar, this is why it looks less "waxy"). It also has bsdf()-based specular layers (Blinn and Cook-Torrance, both with Fresnel, of course, and using actual IORs), bump (I will add displacement soon) and blurred reflection, using Blinn distribution, also with Fresnel (reflection is off by default; on in the second render). For the reflection, it can simply use envmaps and blur them (fast but not accurate, as we all know) or do raytracing (also with optional envmaps to sample when there's no geometry to hit within max distance).

    I would say while the SSS doesn't look waxy, it looks too much like plastic. The reflection also looks odd. I generally see the same thing with using reflection with US/US2 with skin. I'd recommend just leave them off for skin materials.

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    wowie said:

    I would say while the SSS doesn't look waxy, it looks too much like plastic. The reflection also looks odd. I generally see the same thing with using reflection with US/US2 with skin. I'd recommend just leave them off for skin materials.

    I haven't yet figured out the perfect values, obviously. Grosjean is different enough from the dipole model, and then, Oren-Nayar is different from Lambertian. While there is diffuse roughness in Omnifreaker's stuff, it seems to be different as well (probably just a pow() because it goes both ways).

    Yafaray's page gives a few real-world values for Oren-Nayar roughness:
    http://www.yafaray.org/documentation/userguide/material (I haven't managed to find any more through the original CAVE link they cite as a source)

    Right now, I'm using 0.3 for skin. On weekend, I'll see how it goes with the recommended 0.58 (and Lambertian, just for kicks). And probably with a different texture - which would not need _that_ much colour correction to lose that orange "fake tan" I hate so much.

    As for reflection, you know, I do notice exactly this effect sometimes on people. Not under every lighting condition (mostly in dark-ish rooms with one strong source of light), but it's there.

  • wowiewowie Posts: 2,029
    edited August 2014


    As for reflection, you know, I do notice exactly this effect sometimes on people. Not under every lighting condition (mostly in dark-ish rooms with one strong source of light), but it's there.

    I believe you're talking about asperity scattering, or in more user friendly terms, velvet. It's described here, page 54:
    http://webstaff.itn.liu.se/~jonun/web/teaching/2009-TNCG13/Siggraph09/courses/amam.pdf

    Unfortunately, the velvet implementation in both ds default material or omnifreaker's shader is not quite appropriate. It should be limited only to the very edges of the object. You could try to combine this with fresnel or an outline shader.

    Post edited by wowie on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    wowie said:

    I believe you're talking about asperity scattering, or in more user friendly terms, velvet. It's described here, page 54:
    http://webstaff.itn.liu.se/~jonun/web/teaching/2009-TNCG13/Siggraph09/courses/amam.pdf

    Unfortunately, the velvet implementation in both ds default material or omnifreaker's shader is not quite appropriate. It should be limited only to the very edges of the object. You could try to combine this with fresnel or an outline shader.

    Yup, this. Thanks for the link! I agree the velvet we have right now is not completely up to the task. I'm getting an approximation with an oldschool 3Delight specular with high roughness and Fresnel, but it's obviously limited. I'll see what I can do.

    I also did some Oren-Nayar roughness tests, and I have to say I am not convinced it's worth it, sticking it inside subsurface computations (although the 3Delight guys do it in their Maya shaders). I diffed the images carefully against each other and didn't see any meaningful difference apart from the darkening that increasing roughness gives in Oren-Nayar.

    I also noticed that pixel samples will influence the bsdf()-based specular in raytracer (haven't tested in REYES). Live and learn, like. I truly hope the 3Delight team gets some more or less comprehensive documentation on the new features out ASAP.

    Here's examples with pixel samples 4 and 8.

    8_px_samples.png
    600 x 1000 - 837K
    4_px_samples.png
    600 x 1000 - 864K
Sign In or Register to comment.