Tricks for speeding up Iray rendering? Let's hear 'em!

I have my system well tuned, but there are certain products that kill me on rendering time.  A typical render takes about 10-15 minutes, but for example I recently purchased "Foam Party" which as the name suggests is basically a foam prop I'm using for a bubble bath.  Renders of a scene with this product in it are going beyond an hour.  It may not be fixable, but I was interested in what strategy others are using to try to speed it up.

«1

Comments

  • Ongoing MomentOngoing Moment Posts: 78
    edited July 2017
    optix on, speed in the IRAY editor->optimization->instancing, IRAY editor->filtering-> nominal luminance to 400-800. Don't use the CPU, unless you know it doesn't create a bottleneck. Also IRAY slows down with translucency and emmissive objects. Maybe your bubbles are very translucent.
    Post edited by Ongoing Moment on
  • areg5areg5 Posts: 617

    I never use the CPU.  Yes, I'm sure the bubbles are translucent.  Is there any way around that, short of doing the bubbles another way like in photoshop?  I'll try the Iray editor.  Where would I find that?

  • Render Settings Tab

    areg5 said:

     I'll try the Iray editor.  Where would I find that?

  • PadonePadone Posts: 3,437

    In my experience the best method to speed up iray is to reduce textures size and simplify materials. You can get up to 10x faster rendering times this way. As a final step you can use Gimp or Photoshop to eliminate fireflyes instead of rendering forever to get rid of them. This gives you another 10x speed up. Below some links that may help.

    https://www.daz3d.com/forums/discussion/158961/11-gb-vram-insufficient-for-5-characters-for-iray-rendering

    https://www.daz3d.com/scene-optimizer

    p.s. I didn't know of the nominal luminance trick. In my tests it slows down instead of speeding up. Also I did some research and it seems to me that this is a value for clamping out fireflyes. Leaving it to zero makes iray getting the optimal value from the tonemapping settings.

  • areg5areg5 Posts: 617
    Padone said:

    In my experience the best method to speed up iray is to reduce textures size and simplify materials. You can get up to 10x faster rendering times this way. As a final step you can use Gimp or Photoshop to eliminate fireflyes instead of rendering forever to get rid of them. This gives you another 10x speed up. Below some links that may help.

    https://www.daz3d.com/forums/discussion/158961/11-gb-vram-insufficient-for-5-characters-for-iray-rendering

    https://www.daz3d.com/scene-optimizer

    p.s. I didn't know of the nominal luminance trick. In my tests it slows down instead of speeding up. Also I did some research and it seems to me that this is a value for clamping out fireflyes. Leaving it to zero makes iray getting the optimal value from the tonemapping settings.

    Have you used the scene optimizer?  Does it work?

  • PadonePadone Posts: 3,437
    edited July 2017

    I do not use the scene optimizer but I do "by hand" all the things the scene optimizer does. I feel doing things myself I get a better control. The scene optimizer is for people who don't have the time or attitude to dig into DS technical details.

    Post edited by Padone on
  • bitwelderbitwelder Posts: 212

    AprilYSH (a Daz Published Aritist) shared the idea of rendering at double size for half the time, then resizing the render by half in Photoshop/GIMP. I've been trying it, and it actually works! It is detailed on her Facebook page https://www.facebook.com/AprilYSH.3d on the June 20 post.

  • PadonePadone Posts: 3,437
    edited July 2017

    Yes I know and it actually works. But, for the way iray works internally, the larger the final image the more vram it needs. So doubling your final size may not be an option depending on your card. Using a denoiser in Gimp or Photoshop gives the same result without having to double the rendering size.

    https://www.daz3d.com/forums/discussion/157401/iray-failed-to-allocate-device-frame-buffer

    Post edited by Padone on
  • areg5areg5 Posts: 617
    Padone said:

    I do not use the scene optimizer but I do "by hand" all the things the scene optimizer does. I feel doing things myself I get a better control. The scene optimizer is for people who don't have the time or attitude to dig into DS technical details.

    Do you have an algorithm for what you do, i.e. a sequence of events?  I would like to try it myself before I spend the money on the product.

  • PadonePadone Posts: 3,437
    edited July 2017

    yes of course, also you can do a "before and after" comparison

    1. load the default g3f alone and render with default settings so you know your "before" rendering time, then quit DS

    2a. go into the g3f content folder and make all the textures half the size, ex. 4000x4000 becomes 2000x2000, do not forget to backup all your data first

    2b. start DS, load the default g3f again, then go into the g3f surfaces panel and turn off subsurface into all the g3f materials

    2c. now render again with the same default settings as before and check out your "after" rendering time

    Post edited by Padone on
  • areg5areg5 Posts: 617
    Padone said:

    yes of course, also you can do a "before and after" comparison

    1. load the default g3f alone and render with default settings so you know your "before" rendering time, then quit DS

    2a. go into the g3f content folder and make all the textures half the size, ex. 4000x4000 becomes 2000x2000, do not forget to backup all your data first

    2b. start DS, load the default g3f again, then go into the g3f surfaces panel and turn off subsurface into all the g3f materials

    2c. now render again with the same default settings as before and check out your "after" rendering time

    Would that strategy also apply to props and objects?  I'm not having any issues with rendering figures, it's more of an environmental thing.  For example, in my current project I had 4 figures in a scene:  a G3f, G2f and 2 gen figures.  I have this old dungeon set I used and applyied the Iray uber shader to it.  Lighting was 1 overhead spot and 3 emissive surfaces.  It rendered in 5 minutes.  When I put the G3f and G2f into another set, this time the Trustyles contemporary home which I applied the Uber shader to, it takes over an hour and all of my cards are running.  I have similar issues when putting the figures into the Classic Comfort Bedroom and Toon Nursery products.  So my issue is environmental.

  • PadonePadone Posts: 3,437
    edited July 2017

    Yes the "strategy" is the same. Reduce textures size and simplify materials. For most materials you may be fine even with the default shader with plastic model, since the textures will anyway fake it enough. You may try to apply the default shader and to half the textures just to see how much you gain. Then you can refine and/or apply a different shader just to those materials that you don't like with the default shader.

    Hope this helps and happy rendering.

    Post edited by Padone on
  • AndySAndyS Posts: 1,434
    edited July 2017

    Hoh,

    be careful when reducing the texture resolution!
    With iRay I experienced bad artefacts for textures with low resolution. It may depend on the packing formalism of the different jepg methods - but be warned!

    https://www.daz3d.com/forums/uploads/FileUpload/54/354e86cdbf155eda5bd42bb7948750.jpg

    Reducing the resolution only speeds up the pre-compile. The render itself is not affected. OK - of cause it helps to fit into the GPU-card. wink
    But getting bothered by those artefacts? Is it worth?

    btw: For 3Delight it didn't matter!

    Post edited by AndyS on
  • PadonePadone Posts: 3,437

    @Andys

    The artifacts you're talking about are caused by the iray texture compression, not by the texture resolution. You can change the compression thresholds in the iray render settings panel. The low compression is almost always good, the high compression tends to generate artifacts with thin lines.

    For example if you have 4K textures containing thin lines they will show artifacts anyway, until you switch off the high compression by setting its threshold to 8K.

  • ebergerlyebergerly Posts: 3,255

    One thing I learned that can make a huge difference...

    If you're rendering an interior scene (like inside a box with maybe a window), and you have any external lights such as HDR's or regular scene lights like a sunlight, the render can take vastly longer than if those external lights didn't exist. 

  • PadonePadone Posts: 3,437

    Yes I agree that interior lighting with iray can be slow in most cases. In Blender we have light portals for this kind of lighting. iRay has the architectural sampler that you can activate in the rendering panel. This sampler is specialized for indoor lighting and should work faster in these scenarios. Also a couple of links that may help.

    https://www.daz3d.com/forums/discussion/160336/grainy-lighting-is-there-a-way-to-remedy-this

    https://www.daz3d.com/iray-ghost-light-kit

  • ebergerlyebergerly Posts: 3,255
    edited July 2017

    And one of the best things for speeding up Iray (or any other) rendering is scene management. Usually the less stuff in your scene the better. 

    Personally, I tend to want as much stuff in my scene as possible so I can just move around at will and render. However, big complicated scenes often take a lot longer to render. 

    So if you can break your scene down into smaller scenes, and load only the sub-scene you need for the particular render, that can save a ton of time. 

    And a side benefit is that your renders might be more interesting, and focus more on a smaller area which holds more interest. IMO, a lot of renders tend to try to fit as much stuff as possible in the scene and keep it all in focus, which makes it kind of annoying for viewers trying to figure out the point of the render. 

    As an example, you don't always need an entire city scene to tell the viewer you're in an industrial part of a city. Maybe just a sidewalk and a big trash dumpster are enough to place the scene. And that will save you a ton of resources. 

    Post edited by ebergerly on
  • AndySAndyS Posts: 1,434
    edited July 2017

    Nope,

    Padone said:

    @Andys

    The artifacts you're talking about are caused by the iray texture compression, not by the texture resolution. You can change the compression thresholds in the iray render settings panel. The low compression is almost always good, the high compression tends to generate artifacts with thin lines.

    I used the textures in the original low res size as delivered with the old base content of the earlier DAZ version.
    No usage of any of those optimzation tools offered in the different products over here.
    Only as I increased the resolution by myself (2x, 4x) those artefacts disappeared.
     

    So, iRay has serious problem with low res textures in close-ups - and its own optimization as well. angry

    Post edited by AndyS on
  • PadonePadone Posts: 3,437
    edited August 2017

    @ebergerly

    I totally agree with you. There are a number of "tricks" you can use to speed up iray rendering, but at the end a good scene planning to fit the storytelling is what matters most. At this level I feel the most effective way to fake complex scenes is to use 2.5D techniques.

    https://www.daz3d.com/magical-daz-studio-2-5d-effects

    https://www.daz3d.com/billboard-nodes-plugin

    Post edited by Padone on
  • MinamMinam Posts: 55
    edited February 2018

    @bitwelder @Padone andAndyS
    Thank you. 

    My rig from 2014 with a Nivdia Card that has no cuda cores but used to do really nice renders under 20 minutes at 350 irritations. I started using @SickleYield 's Beautiful Skin for G8 males and females, and to her credit, even though my irritations dropped to 50 in 14 minutes the beauty of the renders using her recommended lights was amazing (see attached file). So now how to optimize while maintain those Beautiful Skin standards. Moreover, without Cuda cores, my rig can only render for 20 minutes without overclocking the graphics card. 

    Sadly, I did not do this scientifically, whereas I recorded each change with some type of measure. And to add to that, I realize that I should have restarted my computer after each change because it seems Daz3d doesn't really unload changes (i.e. textures or removing assets from a scene until you restart the computer). I state this because after all the changes I made, I set my computer to 50 iterations given that was what happened each time I rendered. 50 iterations happened in 4 minutes instead of 14... However, what did the render look like? terrible. I have to now figure what to turn on or off when I get back to it. But, I can now render 300 Iterations again. 

    I don't think it's the default lights from "Beautiful Skin for G8 males and females", however having only natural iray light made the time faster. I have Ghost lights 2, which did make my renders faster, so I'm going to try that again tonight and will see. 

    Buying new content that's is Iray ready is pretty high for textures. So yeah I dropped the size of the Jpegs by half and pngs wherever I could. This seems to have worked. My preload is faster, but so is my render. @Outoftouch which I am a huge fan of, like many venders is shooting for 4k, but I don't need that for my needs nor can my current rig really do that. Oh in Summer, rendering itself is a fire hazard for my rig. Note: Hair bending 2.0 is amazing, but lowering the textures seemed to have worked the most for this product. 

    Also note, there are 2 specular settings on new hair products from Outoftouch, so I turned all those off, the hair still looks amazing, and the scene renders faster. 

    " nominal luminance to 400-800" I didn't try. I tried -1 which probably was stupid, and I need more time to play around with this to figure out what it really does. I did find it under filter>>firefly>>, so I'm just turning it off for now. And, yeah the rednder over 100 iteration look good, but I have to fix lighting. 

    "scene optimizer" Yeah, turn it off. To be honest, I don't have to do much post work, and yeah even a dark render in 14 minutes can be fixed with layer manipulation in most graphic image software. I use Manga Studio, but I think Kitra https://krita.org/en/ is the best free photo imaging software as compared to Gimp. My aim is making comics, but I can understand and respect the artists who brag their renders have no post work. Plus, resizing image files is easier in these types of programs especially if you are going from big to small.

    Scene Planning: (The big thing I learned) This real talk from someone who doesn't use Cuda Cores.

    Before I get started, I design characters, lock characters settings in place, put them all in the scene to check propositions, and now thanks to this post... I optimize all their textures and places those opt textures in individual character files under my runtime. I save the new texts as (originalinfo)_low.jpeg or ...._low.png . Notably, and mods I make I don't plan to sell. Also, it would be stupid to opt me collection of products as there's a lot things I'm not using. Damn you amazing sales and freebies! :P 

    Now on to the scene...
    First, sketch out at least a blue print of where things are, or at least write out the scene. This something I do when something is rendering. 

    Second, have everything in the scene as to pose or move everything into places. Place lights accordingly as well. Do not turn anything invisible  .  If you dig through early posts related to this topic, you'll find that Daz3d still processes everything in the scene, and if it's set to invisible that will take more processing time. Even more so, if your rendering a close up of a face, the entire body and background are going to be processed. So remove clothes, textures, or anything else that not visible. 

    Third, plan out what to render and make a list. Billboards are awesome, and If I'm planning a large scene, I need to have the camera in place and the figures in those places. Yup, I will make billboards for one render that I may not use again, however, those are custom characters with custom clothes, so I can't just buy or use something third party... not even Zombies ;(. However, keeping track of rendering billboards to prospective of a camera takes planning and accounting.



    Forth, delete everything you don't need. Yup, I mentioned it before, but yeah, delete anything not needed. This is why the sketch and the list are important because as this process may take days, you need a way to keep track of your progress. 

    Fifth, save a file for 1 render, and restart the machine after 1-3 renders. It’s been stated in the forums before, but Daz3d to free up space needs to be restarted.  

    Thanks again for the new and review of tips.

    @areg5 Follow up: How are your renders now?

     

    delete.png
    1064 x 710 - 768K
    Post edited by Minam on
  • MinamMinam Posts: 55
    edited February 2018

    From the Ghoast Lights 2 User Manual: These are the opt suggestions there...

     

    Performance Optimization

    Both the

    Iray Ghost Light Kit

    and the

    Iray Ghost Light Kit 2

    are designed to be as performance enhanced

    as possible. There are however ,several mitigating factors that make up render

    performance and render load. Outlining all the factors is far beyond the scope of this

    tutorial, however there are a few key lighting elements to consider when composing your

    scene.

    Direct light vs indirect light

    : Surfaces that are lit indirectly rely on light bounces from the

    GI path-tracer to illuminate believably. This is far more taxing than lighting a

    surface with a direct light source, which is why interiors are especially difficult when it

    comes to rendering. It's a good idea to light as many surfaces as you can directly in order

    to avoid costly calculations that could have been avoided. Ghost lights are a great choice

    for directly lighting surfaces without having physical lights dotted around your scene.

    Translucency and SSS

    : Translucency passes light through a mesh, whereas SSS

    scatters light through a mesh surface. Both effects are very costly and should be

    avoided if raw render performance is a priority. Once again though, if these effects are a

    must, it's better to use direct light wherever possible.

    Mesh complexity and light transmittance

    : If you plan on using mesh lights in your

    scene, it's useful to remember that each polygon is considered its own unique directional

    light source. This means that a 1000 poly light bulb has a higher render overhead than a

    single emissive plane. The props included with IGLEK take this into account, with each

    emissive surface being as low poly as possible. If you wish to use a light from another

    creator, it would be useful to check mesh density via wire view to better determine

    its render cost.

    Thank You

    Thank you for purchasing

    Iray Ghost Light Kit 2

    . If you need further support you can

    message me on the Daz3d forums or email me at:

    [email protected]

    Post edited by Minam on
  • Silver DolphinSilver Dolphin Posts: 1,586
    edited February 2018

    Don't try to render dark scenes. Add more light also helps. HDRI lightsources seems to cut down my render times. Use Decimator if you own it. Use Gimp or Photoshop to fix fireflies or artifacts don't just keep rendering. If a model is wearing clotes and you only need to see face and head and hands use a Modeling program to delete unused geometry and all textures not facing the camera can be deleted or just use a shader. Render extra Large and use photshop to scale down render this will also remove artifacts and allow you to fix things before scaling down. Working on original large render will allow you to getting rid of those ugly skin fold from just natural posing your figures. Render main actor in Iray and use 3delight for scene and composit full render in Gimp or Photoshop.

    Post edited by Silver Dolphin on
  • PadonePadone Posts: 3,437
    edited February 2018

    So now how to optimize while maintain those Beautiful Skin standards. Moreover, without Cuda cores, my rig can only render for 20 minutes without overclocking the graphics card. 

    I'm afraid there's no way to effectively use Iray without cuda cores. Reversing to cpu just sucks. If you have a good processor you will find yourself much more comfortable with 3Delight. Moreover lately it seems 3Delight is back due to the excessive cost of graphics cards. So there are new interesting addons as the one below.

    https://www.daz3d.com/ibl-master-for-daz-studio

     

    Don't try to render dark scenes.

    One trick for dark scenes is to render in "daylight" then use tone mapping to make it dark. This way Iray has enough light to compute fast. Though personally I believe the result is different from a real dark scene.

    Post edited by Padone on
  • OstadanOstadan Posts: 1,123

    Pretty similar to what movies and TV shows have done for a long time.  See https://en.wikipedia.org/wiki/Day_for_night

  • Here are a few things I've learnt over the past few days:

    1. Light. LOTS OF IT - The emissive shader uses cd/m^2, which means that the smaller your light source (say a led spotlight prop), the less light comes out of it. As an example, an average clear sky is 7000 cd/m^2, but you have to remember that the sky is big. The small filament of a 100 watt bulb, by comparison, is 7,000,000 cd/m^2. So if you just have a few point style light sources, crank them up!

    2. Turn off the Architectural sampler unless your scene is in a small room with a single light - Anything more than that and your iteration rate will tank. Better to turn it off and run more iterations to get rid of noise than to keep it on.

    3. If you're getting decent speed, but there's noise you just can't get rid of, try using something like Topaz DeNoise (full disclosure - I can provide a referral link to this product that will get you $20 off).

    These three things dropped my render time from 3-5 hours to 20-30 minutes (using a 1070ti)

    Also, regarding dark scenes... I haven't tested this, but I think that an interior dark scene with a single weak light should render pretty quickly with the architectural filter on. Exterior dark scenes should never take too long to render because less of the light gets reflected off of anything.

  • rustajrustaj Posts: 33

    Sorry if this is a dumb question but do objects in the scene but not in the render's view affect render time?

  • rustaj said:

    Sorry if this is a dumb question but do objects in the scene but not in the render's view affect render time?

    They will be sent to the renderer, since they might be needed (for shadows or reflections, for example). Beyond the memory effect how much impact they have will dpend on how often theya re touched by rays/paths during the render.

  • MinamMinam Posts: 55

    Found this from teh Blender Guru. It can up images with AI. 
    https://topazlabs.com/ai-gigapixel/

    Demo and talk

  • RobinsonRobinson Posts: 751

    Yes, that's what the Tensor cores in the new RTX line-up are for.  Basically super-resolution technique allowing you to denoise (fewer rays).  But I believe DLSS requires pre-training in scene specific ways, i.e. it's not a general technique for all scenes.  Training involves presentation of fully converged examples, so I don't think it'll help us much.  I think the idea is that studios pay NVIDIA to train the networks.  Ouch.

     

  • marblemarble Posts: 7,449
    Padone said:

    @Andys

    The artifacts you're talking about are caused by the iray texture compression, not by the texture resolution. You can change the compression thresholds in the iray render settings panel. The low compression is almost always good, the high compression tends to generate artifacts with thin lines.

    For example if you have 4K textures containing thin lines they will show artifacts anyway, until you switch off the high compression by setting its threshold to 8K.

    I don't know whether this is the same issue but I use the Scene Optimizer product to halve the texture sizes almost invariably. Most of the time I'm happy with the results especially as I don't do much close-up work. However, I have noticed that on some characters, the skin seams start to show (as white lines separating the torso and limbs, for example). This doesn't happen with all commercial characters and the seams definitely don't show on the same character without texture size reduction.

Sign In or Register to comment.