PDA

View Full Version : How can I speed up a complex glass render?



digitalimagery
12-27-2013, 10:07 AM
This frame took 1 Hr 39 Mins. to render. Given there are numerous glass blocks with the usual duplicate with normals facing in for proper refraction this is possibly not that unusual. I'm rendering a logo animation (what else?) and I'm curious if there's anything I can do to speed things up and make up the frames already rendered to this point (64 presently).

I'm using LW 10.01 and am using a medium anti aliasing setting. BTW, if I put anti aliasing on the camera and again on the global render setting, is that slowing me down or does it just use the global setting when rendering the scene?

Also on the string titled "Little Help" I'm asking what may be causing these sparkly artifacts.118949

Thanks
DI

spherical
12-27-2013, 06:28 PM
This frame took 1 Hr 39 Mins. to render. Given there are numerous glass blocks with the usual duplicate with normals facing in for proper refraction this is possibly not that unusual.

There's your problem. This is the old way of doing it. Remove all of the duplicate geometry. Turn off Double Sided, if you had that turned on. Use Dielectric material with Partial Internal Reflections turned off. Turning that on will yield better glass but does incur a render hit.


I'm using LW 10.01 and am using a medium anti aliasing setting. BTW, if I put anti aliasing on the camera and again on the global render setting, is that slowing me down or does it just use the global setting when rendering the scene?

Can't remember the settings well enough in 10. I uninstalled it when 11 came out, as I never did much with it, so didn't need to keep it around for re-rendering. IIRC, the old "Antialiasing" as was in 9.6.x, is still in 10.x. Unified Sampling came in 11. The AA setting in Global is only for the Classic Camera which, unless you really need it for something, it is better to use Perspective Camera or one of the other modern cameras. If using Classic Camera, the Global setting changes when you make changes in the Camera Properties anyway. They aren't separate.

Sensei
12-27-2013, 07:01 PM
You can use material which has cache & interpolation..

Also change Render Globals > Ray Recursion Limit.

JonW
12-31-2013, 02:46 PM
Only have Ray Recursion Limit one number higher than the total number of transparent surfaces which are in front of each other. If you only have 4 rows of objects in front of each other you should be able to use 9.

Also if you are not looking at the back of the glass or bottom edges & corners etc. Make these surfaces non reflective. If you are doing a fly through around different sides then this will be more tricky at what you can have as not reflective.




I like the scene. The edges of the glass could be a bit darker.

Our shower screen:

XswampyX
12-31-2013, 03:56 PM
You could use the bounces node input to switch materials on every bounce. Use different Reflection/Refraction interpolation variables as the ray traverses the scene.

http://i465.photobucket.com/albums/rr16/xXswampyXx/Var_Interpolation_zps4ca87144.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Var_Interpolation_zps4ca87144.jpg.html)

JonW
12-31-2013, 08:32 PM
You could use the bounces node input to switch materials on every bounce. Use different Reflection/Refraction interpolation variables as the ray traverses the scene.

http://i465.photobucket.com/albums/rr16/xXswampyXx/Var_Interpolation_zps4ca87144.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Var_Interpolation_zps4ca87144.jpg.html)

Do you sell a book on nodes?

spherical
12-31-2013, 09:35 PM
Really!!!!

XswampyX
12-31-2013, 10:07 PM
Do you sell a book on nodes?

No book i'm afraid. :)

Here's a comparison --->

http://i465.photobucket.com/albums/rr16/xXswampyXx/Glass_Speed_zpsb4bb27dd.gif (http://s465.photobucket.com/user/xXswampyXx/media/Glass_Speed_zpsb4bb27dd.gif.html)

spherical
12-31-2013, 11:24 PM
Ok, I've looked at the previous post and am wondering... comparison of what?

spherical
12-31-2013, 11:29 PM
The edges of the glass could be a bit darker.

Our shower screen:

This depends upon the specific glass. Starfire, for example, isn't that deep a green. Crystal has no color whatsoever. This is why we chose to cast our own 0.5" thick plates for our Solar System Orrery (http://glasssculpture.org/motion/orrery/). Even the Starfire, which is darn clear, was too green for our taste, so we cast our own glass. Looking into the edge, there is zero green.

digitalimagery
01-02-2014, 07:13 AM
I like the scene. The edges of the glass could be a bit darker.:

Thanks JonW. I appreciate your advice/expertise.

DI

Taro Yoshimoto
01-02-2014, 04:31 PM
Hey XswampyX, this technique look absolutly wicked. Would you care attaching the scene or at least give us a higher resolution image of your node tree? I would really like to study it as I also have a glass animation to do for January 14.

thanks!!

XswampyX
01-02-2014, 04:42 PM
Hey XswampyX, this technique look absolutly wicked. Would you care attaching the scene or at least give us a higher resolution image of your node tree? I would really like to study it as I also have a glass animation to do for January 14.

thanks!!

Yeah, no problem. :)

You might want to add more intermediate materials to get a better look depending on your scene.

COBRASoft
01-02-2014, 05:22 PM
My answer would be to use Octane :)

adk
01-03-2014, 06:57 AM
Thanks for the scene XswampyX and the technique. I took it for a quick spin in Octane with these results. My second day in octane so excuse any mistakes / misunderstandings.
There's no way to quickly do the gradient background as per the LW scene (unless I baked stuff) so I did not bother trying to replicate it.

Your optimised scene rendered in around 100 secs on my machine so that's what I gave octane to render per frame for the HR version using the direct lighting kernel (1 in the GIF). Animation - HR_01.zip

Next I used the same setup but gave octane 6 seconds per frame (2 in the GIF) and did some noise reduction in post (3 in the GIF). Animation - MR_01.zip

Lastly I used the PMC kernel, which does caustics as far as I can gather, and gave it around 20 seconds per frame (4 in the GIF), again with noise reduction in post (5 in the GIF). Animation - LR_01.zip
Very different look and I way overdid the noise reduction (soft) but with a bit more time I think the results would be more interesting.

Last frame in GIF (6) is the 6 second per frame with noise reduction in post to compare against the 100 second render. Not bad results in this scenario.

digitalimagery
01-03-2014, 09:45 AM
Yeah, no problem. :)

You might want to add more intermediate materials to get a better look depending on your scene.

Thank you XswampyX!
DI

XswampyX
01-03-2014, 05:11 PM
Glad you like it! :)

Did it manage to speed up your render any?

Cheers!

Nice test with Octane, Number 6 is most impressive. Octane just loves rendering Glass, It would be brilliant if it took ages, but it doesn't..... :)

spherical
01-03-2014, 10:51 PM
XswampyX, I've been playing with your scene and see that turning on Interpolated in Dielectric Advanced makes a significant difference in render times. Never knew that the Blurred switches didn't need to be active for the Interpolated switches to work.

The trade-off is noise in the shadows and refractions. Ran a straight Dielectric (no Multi Switch) and the shadows and refractions are pristine but, of course render time went up by a factor of roughly 2 to 3m17s. Put Multi Switch back into the tree, set both Sample Sizes to 1.0 in Dielectric (2) and those cleaned up a bit, with only a 22s render hit above the original 1m38s. Then dropped the Blend Size in both to 2.0 and they cleaned up even more, with only a marginal hit to the render time above the Sample Size change to 1m52s. Of course there's a difference between the clean straight Dielectric when you A/B them but, not having that, it's pretty difficult to tell that there's a quality loss. Pretty cool.

erikals
01-04-2014, 09:19 AM
Great share XswampyX! http://erikalstad.com/backup/misc.php_files/king.gif

ADK, that's amazing, 6 seconds with almost no loss... http://erikalstad.com/backup/misc.php_files/047.gif


Thank you both! http://erikalstad.com/backup/misc.php_files/smile.gif

Tobian
01-04-2014, 10:31 AM
XswampyX - Just to check, why do you need to change the materials, can't you just use the bounces, in combination with a boolean logic to alter the glass' properties, or are you enabling/disabling 'interpolation' ? I wouldn't use interpolation for a number of reasons, mostly because it's **** :D A simple trick I often use is to simply dial down roughness after n bounces, which would save some time in high recursion environments. (NB, can't load your scene as I am rendering hehe).

XswampyX
01-04-2014, 12:02 PM
You are correct..... on both counts. :)

It's using interpolation, but only after the 2nd bounce. So a lot of the glass is rendered full quality and only the glass seen through glass gets the interpolation. It's up to the artist if the quality degradation is worth the speed increase.

For a 50% improvement on a 1 hr 30min render, per frame over 1200 frames then it probably is!

adk
01-05-2014, 03:31 PM
Great share XswampyX! http://erikalstad.com/backup/misc.php_files/king.gif

ADK, that's amazing, 6 seconds with almost no loss... http://erikalstad.com/backup/misc.php_files/047.gif


Thank you both!
http://erikalstad.com/backup/misc.php_files/smile.gif

Yeah, 6 seconds is pretty hard to beat! Forgot to mention specs in case you're interested. This was using Titan + gtx780.

erikals
01-05-2014, 03:54 PM
Titan and 780... i thought i "saw" it fly... http://erikalstad.com/backup/misc.php_files/wink.gif

spherical
01-05-2014, 04:20 PM
I took it for a quick spin in Octane with these results. My second day in octane so excuse any mistakes / misunderstandings.

This is my third day in Octane, trying to evaluate it. You've gotten farther than I. Can you share your steps, 'cuz I'm missing something. I can't even get the standalone to load its own examples and show anything in the viewport. There is a "Script" mentioned on one of the Octane pages and in the PDF that seems like it will automate the transfer process but I'll be darned if I can find one. The plugin is found and installed, the .dll and .dat files are in /bin, the menu tab is installed and works. If I choose Switch to Octane, I get an F9 render in the IPR but it seems that I need to re-create the Dielectric, as the blocks are all looking like Default. What am I missing? Thanks.

COBRASoft
01-05-2014, 06:37 PM
Octane uses its own materials. Dielectric and the like won't work with Octane. It takes some time to learn this, but the result is really worth the effort!

XswampyX
01-05-2014, 06:43 PM
Yes it even has its own selection of nodes. :)

http://i465.photobucket.com/albums/rr16/xXswampyXx/Question_Mark_Glass_zps2c52edfa.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Question_Mark_Glass_zps2c52edfa.jpg.html)

erikals
01-05-2014, 06:45 PM
wonder, any good SSS in Octane, or can i use LightWave's SSS nodes... ?

looks very voxy, but maybe it's exaggerated


http://vimeo.com/64817671

adk
01-05-2014, 06:47 PM
This is my third day in Octane, trying to evaluate it. You've gotten farther than I. Can you share your steps, 'cuz I'm missing something. I can't even get the standalone to load its own examples and show anything in the viewport. There is a "Script" mentioned on one of the Octane pages and in the PDF that seems like it will automate the transfer process but I'll be darned if I can find one. The plugin is found and installed, the .dll and .dat files are in /bin, the menu tab is installed and works. If I choose Switch to Octane, I get an F9 render in the IPR but it seems that I need to re-create the Dielectric, as the blocks are all looking like Default. What am I missing? Thanks.

Will do mate tho in a separate thread... think I derailed this one enough as it is.

spherical
01-05-2014, 09:17 PM
Ok, thanks!

spherical
01-05-2014, 09:31 PM
wonder, any good SSS in Octane, or can i use LightWave's SSS nodes... ?

As far as I've read, Octane doesn't use much of anything from LW, except camera placement and a Sun light:



Octane currently doesn't support complex polygons or polygons with holes. To avoid artifacts user must work only wth 3 or 4 vertex polygons.
Octane is a GPU render engine. It can't use any kind of CPU shaders, materials, textures or any other kind of nodes available inside Lightwave. You must always use the Octane nodes to shade the objects. Lightwave material parameters like "T" texture layers or Lightwave nodes are not supported by the plugin.
Only a few basic material parameters (color, diffuse, specular or transparency) are supported by Octane.
Lightwave native lights doesn't work with Octane. Users must use only the Octane light to work with Octane.
Octane has it's own color space functions and tone mapping. To work with Octane user must always disable the Lightwave color space (set all values to Lineal).
Lightwave color space functions are not supported by the plugin.
Currently Octane doesn't support ray visibility options, so all visibility options of Lightwave don't work. Features like all "unseen by" or cast or receive shadows are not supported.
Octane for Lightawave currently can't render particle systems. It also can't work with 1 or 2 vertex polygons
FiberFX is not supported.
Current version of Octane doesn't support Motion Blur.
Lightwave Image Editor options are not supported by the plugin. Octane read the maps from the files itself, and can't process the Image Editor options.
Limited region rendering is not supported by Octane.
This first version of the plugin doesn't support Octane Live materials within Lightwave.
Octane doesn't support multiple UV maps. User must be sure that each vertex doesn't have more than one UV map. To avoid problems it's best to work with only one UV map in each object layer.


Unsure what the plugin is good for if a scene has to be re-invented. Other than a node editor that appears in the LW interface, that must use Octane's nodes, because LW native nodes don't cross over, it seems that just starting from scratch in Octane's standalone with exported OBJ objects would be the same. I mean I get that it is a different renderer and that unbiased needs to be handled in different ways but a little more interchange might be good. Perhaps in a later release...

erikals
01-05-2014, 10:18 PM
hm, certainly some lacks. could still be valuable for freelancers.

Motion Blur is now supported... http://erikalstad.com/backup/misc.php_files/047.gif