Page 1 of 3 123 LastLast
Results 1 to 15 of 35

Thread: Speeding up Blurry reflections with Nodes.

  1. #1

    Speeding up Blurry reflections with Nodes.

    Thought I would share some tricks I have been working on to speed up reflection blurs using nodes.

    I discussed it over on my SQ Pluto station thread http://www.spinquad.com/forums/showt...=14476&page=49

    But in short, here's the file with the file with the nodal fiddling.

    1) I have used a gradient (could have used a logic node) to tell LW that any reflections beyond 0 have a reflection blur value of 0. So the surface will be blurry, but it is not spawning child sample rays beyond that.

    2) I have done the same to tell it that beyond N (in this case 1) to make diffuse 1 and reflection 0 - in effect give the reflections a depth beyond which they stop recursion, which is independent of the renderer ray recursion setting.

    Scene dependant, it could save a lot of time, and visually looks quite similar. If you needed too, you could raise both depth values, to move closer to visual similarity at the expense of slightly slower (but still faster than base) render speeds!

    I have a lot of reflective materials, so I am always looking for ways to lower render times!

    let me know if this works for you guys!
    Attached Files Attached Files

  2. #2
    Over 70 views and no reply for sharing a tip?

    I haven't tried it yet but bookmarked for later. Ways to speed up blurry reflections are very welcome. Thanks Tobian!
    Last edited by serge; 05-10-2009 at 08:42 AM.

  3. #3
    3D Mac Maniac Scazzino's Avatar
    Join Date
    Mar 2003
    Location
    Boston area
    Posts
    2,554
    Thanks Tobian!

    A similar approach may also be useful for limiting normal reflection recursions while allowing transparency to have more recursions. I often run into the problem where I have to crank up recursions to allow all the transparency effects but then LW wastes too much time doing extra unnecessary reflection recursions... This way we may be able to set the ray recursion limit for the transparencies and use the node trick to limit the reflection recursions only.

    I'll have to try it on a scene where I can use nodal surfaces. (Can't on my current scene since I need HD Instance, which isn't yet compatible with 9.6 nodes.)
    MikeS [LWProfile] 30+ Yrs of Award-winning Media DreamLight.com

    Drag-and-drop-dead-easy™ ScreamerNet - DLI Constellation
    BOOK - Creating a 3D Animated CGI Short & 3D CGI Short Films & DLI Blog

  4. #4
    Michael Nicholson zapper1998's Avatar
    Join Date
    Feb 2003
    Location
    spokane washington usa
    Posts
    4,663
    Blog Entries
    1
    Just took a look and wow
    Learn something new everyday
    TK

    Michael

  5. #5
    Scazzino - yes, that's exactly what the second tip is useful for.. It effectively limits reflection recursion on a per-surface basis, and I've tested it with increased global recursion, without increased render times! I intend to be using it soon for speedier renders!

    Thanks guys, hope it works out for you!

  6. #6
    Registered User adamredwoods's Avatar
    Join Date
    Jul 2006
    Location
    San Francisco, CA
    Posts
    2,030
    How does this trick compare to say, the motion blur trick?
    http://spinquad.com/forums/showthread.php?t=7003
    // To draw is to think and discover.

  7. #7
    I have no idea LOL. It would be different now as you'd use the adaptive sampling of the new perspective camera. Yes it would be interesting to see how it compares. It has to be said this optimises with ray-recursion in mind. That method would have blurry reflections in all recursions, so in theory, it SHOULD be faster, but it's difficult to say without running some tests.

  8. #8
    Ok here's the full version, courtesy of Ben Vost, and Light Wiki

    http://www.lightwiki.com/Optimising_Reflection_blur

  9. #9
    Dreamer MooseDog's Avatar
    Join Date
    Jul 2003
    Location
    Mount Whoville, VT
    Posts
    1,438
    this is working really well!! thx for the in-depth wiki too, really helpful.
    We are pirates, we are artists...

    Blog

  10. #10
    Let me know how much time you're shaving off render time, if any!

  11. #11
    Dreamer MooseDog's Avatar
    Join Date
    Jul 2003
    Location
    Mount Whoville, VT
    Posts
    1,438
    it's definitely a big time saver

    the series of images below are as follows:

    old-fashioned blurring:

    g.i. 2m38s
    render 5m31s

    new-fangled blurring:

    g.i. 41.4sec !!
    render 3m56s

    (that's a 30% decrease in render times!! congrats.)

    i also did another test with an extension to your network. it involves changing the shading process by running the whole thing through a lambert diffuse node going into diffuse shading only. imho, it provides a more realistic render, but the times really start to climb again. the gods giveth and the gods taketh away! (the idea for the lambert shading thing is not mine at all, i found it i forget where so all credit to the original creator who did the final image below. i just re-purposed it here with your blurring technique. and if anyone sees any improvement to this network, speak-up! i'm pretty sure something is logically off-kilter )

    new-fangled blurring with lambert:

    g.i. 3m41s
    render 6m24s

    tested on an aging dual-core with 2g of ram. so it should fairly rip on a newer rig.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	blurry_balls_nodes_old__fashioned.png 
Views:	427 
Size:	676.6 KB 
ID:	73831   Click image for larger version. 

Name:	blurry_balls_nodes.png 
Views:	423 
Size:	678.7 KB 
ID:	73832   Click image for larger version. 

Name:	blurry_balls_lambert.png 
Views:	460 
Size:	808.1 KB 
ID:	73833   Click image for larger version. 

Name:	reflection_lambert_nodes.png 
Views:	481 
Size:	65.4 KB 
ID:	73834   Click image for larger version. 

Name:	Reflections_Lambert.jpg 
Views:	422 
Size:	150.2 KB 
ID:	73835  

    Last edited by MooseDog; 05-27-2009 at 09:41 AM.
    We are pirates, we are artists...

    Blog

  12. #12
    Hmm, the problem with doing that is 2 fold.. You are using an extra Lambert shader for no reason (the default shading IS Lambert) and you are mixing the reflection channel into the diffuse chanel. This could cause problems if you are breaking out passes.

    The setup I have is a much more simple way to do it in a energy conserving way. Simply have a Fresnel gradient in the reflection channel, and the inverse in the diffuse. If you want more reflection, increase the Fresnel number. If you want to add in maps, multiply the Fresnel with maps, and again feed the output to the reflection, and the inverse the diffuse. It will create a correctly energy conserving shader, without too much extra overhead.

    you are right in that mixing reflection with diffuse to equal 100% is more realistic, but that's not the most efficient method, and as you have seen, slower.

  13. #13
    Dreamer MooseDog's Avatar
    Join Date
    Jul 2003
    Location
    Mount Whoville, VT
    Posts
    1,438
    Quote Originally Posted by Tobian View Post
    ...This could cause problems if you are breaking out passes.
    good point!

    Quote Originally Posted by Tobian View Post
    The setup I have is a much more simple way...
    agreed i'm lovin' it, and have gratefully folded it into my presets and renders.

    it would be cool to figure out how to get the "look" of my admittedly processing-heavy experiment from the simple power of your well thought out network.
    We are pirates, we are artists...

    Blog

  14. #14
    You can do exactly the same 'look' with my method. i am not sure what the difference is, just replace your gradient in place of my Fresnel node. It's just the Fresnel value is more 'realistic' than just using a regular incidence angle, but that's down to personal preference.

  15. #15
    3D Mac Maniac Scazzino's Avatar
    Join Date
    Mar 2003
    Location
    Boston area
    Posts
    2,554
    Hey Tobian, this is great to limit the reflection recursions below the ray recursion limit. I often have a problem where I want the overall ray recursion limit low for speed but have a few transparent surfaces that I'd like to use more recursions. Any chance this type of trick could be used in reverse to increase the recursions on transparency? Since I often have many more reflective surfaces, that can't use nodes due to HD Instance, it'd be great if I could use a low recursion limit for the overall scene, but get around that limit for a few transparencies where I could use nodes... I haven't had time to play with it myself but am just thinking out loud here...
    MikeS [LWProfile] 30+ Yrs of Award-winning Media DreamLight.com

    Drag-and-drop-dead-easy™ ScreamerNet - DLI Constellation
    BOOK - Creating a 3D Animated CGI Short & 3D CGI Short Films & DLI Blog

Page 1 of 3 123 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
  •