Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 62

Thread: So what's up with the Cook Torrance shader?

  1. #31
    Super Member Captain Obvious's Avatar
    Join Date
    Dec 2004
    Location
    London
    Posts
    4,502
    Quote Originally Posted by 3dWannabe View Post
    Um, stupid question above my pay grade, but ... do any of these issues change with FPrime or other renderers (Kray?).

    I'm digging thru the LW v9 Lighting book, and trying to think ahead.

    And will Radiosity get faster with 64 bit - or do you just have to throw more cores at it?
    Haven't tried with Kray or FPrime, but I can't imagine it would change anything. The problem lies inside the shader code, and it's the same regardless of your render engine.

    It's important to note that FPrime and Kray do not try to replicate LW's node shaders — they use exactly the same code as Lightwave's renderer. Any* shader-specific bug you encounter in one renderer is likely to be present in the rest of them.

    As far as 64-bit... it only matters in terms of memory usage. Buy more cores. Overclock.


    * multi-threading issues aside
    Are my spline guides showing?

  2. #32
    It means the workaround should work for those renderers, too



    Gerardo

  3. #33
    Super Member Captain Obvious's Avatar
    Join Date
    Dec 2004
    Location
    London
    Posts
    4,502
    Quote Originally Posted by gerardstrada View Post
    It means the workaround should work for those renderers, too
    Most likely, yes.
    Are my spline guides showing?

  4. #34
    A useful tip from Weepul to improve this hack here



    Gerardo

  5. #35
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,054
    There are a few variation arount the original
    Cook Torrance Algorithm but the geometric
    attenuation (which is clamped to 1.0) is
    always the same, differences come in
    the roughness distribution,
    "Beckmann 1" is almost identical to LW node,
    "Beckmann 2" near the original algorithm and much brighter,
    "Gaussian" is totally different.
    All modes include also a simple fresnel
    factor.

    A standalone win32 node for testing,
    http://pagesperso-orange.fr/dpont/pl...rrance_x32.zip

    Denis.

  6. #36
    That's pretty sweet Denis!

    here's some gamma adjusted (LCS workflow) black test spheres, at 5% glosiness. The Beckman 2 falloff looks a little weird, as it hollows out in the centre, the Gaussian model looks.. weird!

    That said it might still be physically accurate
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	cook-torrence-test-b1.png 
Views:	276 
Size:	18.1 KB 
ID:	82605   Click image for larger version. 

Name:	cook-torrence-test-b2.png 
Views:	277 
Size:	21.6 KB 
ID:	82606   Click image for larger version. 

Name:	cook-torrence-test-g.png 
Views:	314 
Size:	28.6 KB 
ID:	82607  

  7. #37
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,054
    The Gaussian distribution needs to be fixed this is sure,
    This model is still considered as an approach,
    and Cook & Torrance approach is more based on physics
    than mathematics.

    Denis.

  8. #38
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,054
    I fixed weird specularity on the 'dark side',
    the "Gaussian" mode is also smoother,
    no change in the "Beckman 2" distribution.

    Denis.

  9. #39
    Yeah that's much nicer, same settings, on the Gaussian distribution. No idea what's 'physically accurate' but it looks nicer anyway hehehe
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	cook-torrence-test-g-2.png 
Views:	270 
Size:	21.6 KB 
ID:	82632  

  10. #40
    It looks excellent here in LCS!



    Thank you very much, Denis!



    Gerardo

  11. #41
    Hi,

    DP Cook-Torrance appears to render with artifacts under radiosity when raytraced reflections are involved. Here's a simple example.

    This is a radiosity render with DP Cook-Torrance on the objects in the center...


    Now with Mr. Stanford Bunny. He surfaced with standard diffuse/specular and no reflection...


    And here with the addition of a simple incidence gradient for reflection on Mr. Bunny...


    Rendering in FPrime doesn't show the artifacts, but the shader doesn't quite work the same, either...


    Finally, if DP Cook-Torrance is unplugged from the center objects and replaced with the LW native Cook-Torrance node...


    Renders (besides the Fprime sample) are shown with interpolated Final Gather, but similar artifacts also occurred with interpolated MC.

  12. #42
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,054
    DP CookTorrance was a standalone node mainly for testing,
    could be limited internally with a flag, but can't be sure
    with your exact settings,
    But do yout get artefact with DPKit Light Group node?

    Denis.

  13. #43
    Thanks for the reply, Denis.

    I might not be setting it up correctly. Is this right?


    It seems to fix the problem.

  14. #44
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,054
    Your Light Group node is an older version
    it has now both Diffuse Color and Specular Color ouputs
    with a choice between different algorithms,
    included Cook Torrance for specularity,
    it can work like a simple shader with
    all lights in the scene if you don't set a prefix.

    About your settings, if you input a Diffuse Color,
    then the normal Color input is overwritten.

    Denis.

  15. #45
    Well that explains a lot! Time to update my dpont nodes...

    Thanks, Denis!

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •