Reducing Render Times

Often I’ll hear folks in 3D forums mention how they are doing a render which takes 4, 8, 12 or even 24 hours. Or longer. And often the assumed solution is a faster computer. And there’s nothing wrong with faster computers. We all want them.

However, for those who may not have considered different, non-hardware alternatives, there are many other ways to significantly decrease your render times, often with very little effort. All it takes is a little knowledge and planning, and maybe even some free software or other free assets.

Way back in the dark ages, when 3D was just starting, computers were archaic and slow, they had maybe a few MB of memory if you were lucky, and users had to come up with some smart work-arounds to get stuff done in a reasonable amount of time and with limited resources. Otherwise their renders would take days or weeks, and max out their computers.

Techniques similar to those developed long ago can still be used today to decrease render times and limit memory usage.

This thread is intended for people to discuss what methods are available for decreasing render times. If you’re not interested in this subject, or feel you might be offended if someone mentions alternatives to the methods you’ve chosen, please stop reading now.

«1

Comments

  • JoeMamma2000JoeMamma2000 Posts: 2,615

    First, there are a million and one alternatives for decreasing render times. But there are some key areas that might be more common with Carrara users, especially considering the environmental content, etc., that Carrara users have in their libraries.

    One area that can generally cause super long render times is vegetation. Y’know, like trees and bushes and stuff. Carrara has a library of pre-made vegetation that you can drag ‘n drop into your scene. Or you can buy some gorgeous pre-made environmental scenes that can take ages to render.

    The problem with vegetation is that typically it has a lot of polygons (like a zillion individual leaves on a tree), and often has translucency and soft shadows on a gazillion leaves and branches. And if you want a bunch of trees in a forest, along with other vegetation, you might as well just take a week vacation while your computer renders.

    So how do you deal with environmental scenes with lots of vegetation?

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    Well, when you drag and drop one of Carrara’s pre-made trees into your scene, you are accepting that you really don’t care about the details of the tree, and don’t need a lot of creative control over it. A tree is a tree, right? You’re happy to use a pre-made tree that someone else modelled and textured, even if (some might say) it doesn’t really look much like a real tree, right?

    So why not just use a real tree? Especially if it will greatly decrease render times?

    Because when you think about it, the final render that you’re producing is just a bunch of colored pixels. And it may not really matter how you got there.

    So here is an image with two trees side-by-side. The tree on the left is a drag-n-dropped foto of a real tree, and the one on the right is a drag-n-dropped (and rendered) Carrara tree.

    Clearly, the one on the left looks a lot more realistic because, well, it’s a foto. And to get the same results with the Carrara tree might take many hours of re-texturing and lighting and re-rendering.

    So if the one on the left takes zero render time, and zero time for texturing and lighting and rendering, why not consider using it instead of a 3D tree?

    TreeComparison.jpg
    1920 x 1080 - 267K
    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    The basic concept here is this:

    Make it 2D.

    If an element of your scene doesn't need to be 3D rendered, then don't make it a 3D rendered element. Add it to your final image in 2D, not 3D.

    So how do you do that? Well, there are, again, many ways to accomplish it. First you need to obtain a 2D image of your vegetation, preferably with an alpha mask/channel so you can easily drag-n-drop into your scene:

    1. Take a photograph of trees or other vegetation, then make an alpha channel/mask in PS, and save the image for future use.

    2. Make a 3D render of a tree or other vegetation, with an alpha channel selected, and save the image for future use.

    3. Download some of the MANY freely available alpha masked vegetation images from the web

    Once you have an image with an alpha channel, you place that image on a billboard/card in your scene and render. Or, if you are going to composite the image later, you can load the image into the compositor and add it later.

    And of course you can fully populate your scene with an entire forest using this method. And render time will be, well, almost zero

    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    Now you may ask, "If I don't render it in 3D, how can I cast shadows and stuff?"

    Well, below is an image of a simple plane with a tree image mapped onto it, using its built-in alpha channel for transparency. And you can see that, with the right configuration, you can generate some nice shadows in your 3D scene.

    AlphaShadows.JPG
    680 x 660 - 25K
    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    And you can even combine two image-mapped planes (one is only the visible tree, and the other is only a shadow caster) and generate an apparently 3D shadow from a 2D image plane...

    Tree Shadows.JPG
    988 x 576 - 34K
    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    And once you have your "super groovy 3D shadow casting 2D image planes" all set up, just duplicate them (or replicate them in Carrara?), and make a grove of trees. And even though they are identical, your viewers might not even notice you've got a bunch of identical trees. Or just tweak them a bit (random scaling, or texture coloring, whatever...) so they aren't as obvious.

    Or better still, use the same setup of planes and just load a different tree image...

    Tree Grove.JPG
    960 x 540 - 63K
    Post edited by JoeMamma2000 on
  • HeadwaxHeadwax Posts: 9,964

    Hi joe great stuff! Attachment in post 3 not showing for me ;( 

     

  • JoeMamma2000JoeMamma2000 Posts: 2,615

    I deleted and re-loaded. Maybe try to reload on your side.

  • evilproducerevilproducer Posts: 9,050
    edited July 2015
    Billboards and splats can be useful, that is for sure, however it is important to not disregard their very real limitations. For instance, the lighting for the tree and the scene will need to match. The angle the camera is placed will need to be logical. Forget an overhead view with the example Joe posted. The other thing is that it can take much longer to render light through an alpha channel as opposed to rendering a tree with a shaped leaf. With one or two billboards the speed will be very fast. Add them to replicator to make hundreds, thousands or even one hundred thousand replications, and you lose the advantage of the billboard method, and it may even take longer to render. I will agree Carrara's stock trees aren't that great, but they are a good starting point to create your own trees. If you use a low poly leaf that is actually leaf shaped it will also render much faster than a single polygon billboard leaf that uses an alpha channel. The other advantage to a Carrara tree is the flexibility with camera angles and the fact that it is a 3D shape, so you can adjust the amount of random rotation and scale in a replicator and make a single tree look like many. So, this thread is about speeding up render times, and since outdoor scenes were mentioned, my method would be to use a Carrara tree, sufficiently beautified, but don't use translucency in the leaf shader except for trees that are in the foreground and where the effect will be visible. Also certain trees, such as some Oak trees (as an example) have fairly opaque leaves as compared to a Maple or a Poplar, so keep that in mind. One other thought about leaves. If you are using a billboard or a shaped leaf and it uses an image map for the texture, you can fake translucency by using a glow channel in the leaf shader. You may need to make a copy of the texture map and do a little editing in an image editor, but it can look good. The leaves in a Carrara tree are themselves replicated onto the tree, so the overhead in your scene is actually fairly low. My render settings would be to avoid full Indirect Light, and instead use a faked GI or Skylight with additional accent lights where needed. If the Skylight is used, it can also be a benefit to render your scene at a lower resolution (maybe half the resolution of the final render) and enable the Save Irradiance Map (IR Map) option in the render room, and then for the final render, disable the save IR Map option and instead enable the Use Saved Map option and then load the IR Map that was created when the low res version of the scene was rendered. Anti Aliasing settings for the low-res render don't seem to effect the IR Map in my experience, so they can be set to a lower value for the low res render to speed it up. Once an IR Map is saved for a scene, as long as you don't change the lighting ore move something, you can render the scene from any angle.
    complete terrain.jpg
    2000 x 2000 - 425K
    cliff jumping.jpg
    2000 x 1333 - 327K
    Averting-Disaster02-PW.jpg
    2000 x 1500 - 1M
    Post edited by evilproducer on
  • evilproducerevilproducer Posts: 9,050
    Sorry for the run-on paragraph. I don't see any formatting tools. Am I missing something?
    Picture 2.png
    1150 x 454 - 29K
  • mikael-aronssonmikael-aronsson Posts: 549
    edited July 2015

    1. Hide objects that are not visible from camera and don't cast shadows in camera view, in animations you often have a bigger scene and don't show all in camera view, can make a huge difference.

    2. Replace objects far away with simple proxy objects (or with 2D replacements as Joe said)

    3. Avoid reflections if possible (don't just silly low levels of reflections, turn it of and stick to specularity or fake it).

    4. Don't use index of reraction <>1 unless you must, saves one ray fired.

    5. Keep maximum number of ray recursion to a minimum (as low as possible without artifacts)

     

    Post edited by mikael-aronsson on
  • mikael-aronssonmikael-aronsson Posts: 549
    edited July 2015

    Sorry for the run-on paragraph. I don't see any formatting tools. Am I missing something?

    Is your old computer using an old browser also ;) ?

    It should format itself at new lines but you should also have a "p" button at the button where you can add P tags.

    There should be a toolbar above the text area with formatting tools.

     

    Post edited by mikael-aronsson on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    Forget an overhead view with the example Joe posted.

    Well, not necessarily. The concept here is to use 2D instead of 3D when you can. And there is nothing that says you can't, as I mentioned before, render your Carrara trees from an overhead view once, then re-use those renders as a 2D image to populate your scene for future renders/animations. Like you say, it's not a perfect solution for every situation, but nothing is. You just need to use your head and find ways to reach your goal.

    The other thing is that it can take much longer to render light through an alpha channel as opposed to rendering a tree with a shaped leaf. With one or two billboards the speed will be very fast. Add them to replicator to make hundreds, thousands or even one hundred thousand replications, and you lose the advantage of the billboard method, and it may even take longer to render.

    Again, it depends on your limitations and ingenuity. Do you really need a hundred or thousand replicators, or can you just use a single background image with lots of vegetation to populate your scene? Often it's sufficient to have a stock background image with trees and mountains and stuff, with a little blur or mist to give it a distance effect, and spend the rendering resources on the foreground. 

    And as I mentioned in the thread on compositing, you can do a TON of stuff in a 2D compositing app that can be infinitely more efficient and provide realtime results without rendering.

    I'm not negating what you're saying, just trying to get folks to think outside the box a bit. Often, limitiations aren't really limitations if you think about it.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    By the way, to be clear about the replicators issue....

    Yes, you can reproduce a bunch of stuff in your 3D scene using replicators, then render. But you probably can do the same thing in 2D, in a compositing app. For example, if you want to build, say, a forest scene using a ton of replicators that are replicating bushes and trees, etc., why not just do that later, and arrange all of those images in 2D to get the forest background you want. Render time is basically zero.

    For example, the last image I posted of a grove of trees was the result of rendering some duplicated "cards/splats/billboards" that had alpha mapped images on them. But that image could just as easily been made by arranging copies of a simple 2D image of a tree and its shadow in a 2D compositing app.

    Post edited by JoeMamma2000 on
  • don't use soft shadows with plantes or indirect light.

    for water use only reflection not refraction.

     

  • 3DAGE3DAGE Posts: 3,311

    I'm all for reducing render times,  but please try to post information that's correct.

    Carrara has a library of pre-made vegetation that you can drag ‘n drop into your scene. Or you can buy some gorgeous pre-made environmental scenes that can take ages to render.

    This is incorrect .It's more accurate to say that Carrara has a Plant creation system. although it does come with a few prebuilt plants. your comment sugests that it's all premade, and High polygon, which is untrue.

    The problem with vegetation is that typically it has a lot of polygons (like a zillion individual leaves on a tree), and often has translucency and soft shadows on a gazillion leaves and branches. And if you want a bunch of trees in a forest, along with other vegetation, you might as well just take a week vacation while your computer renders.

    Carrara's Plant system uses replication, and although It's possible to have "multiple" (leaf) models on a Single plant, the Individual leaves are Replicated on the branches,  to save system resources, and increase rendering times.  Not (like a Zillion individual leaves on a tree)

    Well, when you drag and drop one of Carrara’s pre-made trees into your scene, you are accepting that you really don’t care about the details of the tree, and don’t need a lot of creative control over it. A tree is a tree, right?

    Have you actually ever used Carrara's Plant editor system,. ?

    When you insert a Plant, It's completely editable by the user. who also has the ability to create thier own leaf, flowers or fruit models for that plant,.and create textures or Shaders for the leavs and Plant.

     

  • just to make a point

    45 minutes~ with soft shadows & indirect light

    gamma 2.2 no ambient.

     

    22 secounds~ without soft shadows or indirect light

    other gamma & ambient.

     

     

  • TangoAlphaTangoAlpha Posts: 4,584
    edited July 2015

    When it comes to distant trees, I think splats and billboards certainly have a place. But close up, I'm not so sure. The lighting becomes ultra-critical otherwise the trees will look wrong. Take the grove of trees picture above: even a casual glance shows the shadows on the trees don't match the shadows on the ground, there's no highlight on the left of the trunk and so on. The viewer might not consciously pick up on these, but they are all cues of something not right.

    When it comes to existing & pre-built scenes, I think you are trading time saved in the render against time spent in the setup. Is that a win or lose scenario? particularly if you need to match trees to other scene elements, or trees interract with the scene in other ways. What I'm saying is, if you spend 5 hours tweaking the setup in order to save 4 hours of render time, was it worth it? YMMV of course.

    I don't use splats in my own scenes, because they're designed to be used with camera positions all over the set, so there's no area that can easily be designated as "background" - everywhere is foreground to one camera or another. But then scenes do take a long time to render - typically 5-6 hours for scenes like the attached. It can hit 8+ hours if there's significant amounts of water in the scene (one reason I tend only to render overnight). For me, compositing is a no-no, because I'm (generally) trying to show off the set to its best advantage, not show off my skills in photoshop. For others of course, that may be an option.

    Generally I render with either Fake GI or Skylight. I use one of DimensionTheory's HDRI sky images in the background if the sky is going to be particularly visible, otherwise I'll use a realistic Sky setting. There doesn't seem to be a huge time difference between Fake GI and Skylight. I've never completed a render on full GI - life is too short! I'm going to experiment with EP's glow channel idea, because he is right in saying that for model trees, leaf translucency is a real time killer.

    Post edited by Richard Haseltine on
  • evilproducerevilproducer Posts: 9,050

    Sorry for the run-on paragraph. I don't see any formatting tools. Am I missing something?

    Is your old computer using an old browser also ;) ?

    It should format itself at new lines but you should also have a "p" button at the button where you can add P tags.

    There should be a toolbar above the text area with formatting tools.

     

    Yeah, it's an old browser on an old computer. Curse the advance of time!
  • evilproducerevilproducer Posts: 9,050
    Tim_A said:

    Generally I render with either Fake GI or Skylight. I use one of DimensionTheory's HDRI sky images in the background if the sky is going to be particularly visible, otherwise I'll use a realistic Sky setting. There doesn't seem to be a huge time difference between Fake GI and Skylight. I've never completed a render on full GI - life is too short! I'm going to experiment with EP's glow channel idea, because he is right in saying that for model trees, leaf translucency is a real time killer.

    It's not something I've posted any examples of yet because I haven't had the time to really come up with a quality image map. Subtlety would be the operative word I think.
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

     

    3DAGE said:

    I'm all for reducing render times,  but please try to post information that's correct.

    Andy, your constant attempts to discredit me by misreading and misunderstanding what I post get very tiring. I always try to post correct information. Please at least give me a tiny bit of respect for my contributions, and try just a TINY bit to understand the point I'm making. I tried to make this as simple and basic as possible.

    3DAGE said:

    Carrara has a library of pre-made vegetation that you can drag ‘n drop into your scene. Or you can buy some gorgeous pre-made environmental scenes that can take ages to render.

    This is incorrect .It's more accurate to say that Carrara has a Plant creation system. although it does come with a few prebuilt plants. your comment sugests that it's all premade, and High polygon, which is untrue.

    I have no clue what you're mis-interpreting from my post. I never addressed Carrara's plant creation system, only that if you drag and drop from Carrara's library of premade plants that the resulting renders can take FAR longer than if you just use an alpha-matted billboard/card, or a 2D compositing solution. Especially if you replicate and tweak those plants and the renders to get maximum realism, such as you'd have with a photo. And also especially if you buy one those pre-made scenes with lots of vegetation. How many times has somebody posted about how long the renders take with one of Howie's (or other) scenes? It's a very simple point I'm making, Andy. A 2D solution, IF it's appropriate for what you're doing, can take much less time and be far more efficient than doing a realistic 3D render. How anybody can disagree with that is beyond my comprehension. 

    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015
    Tim_A said:

    When it comes to distant trees, I think splats and billboards certainly have a place. But close up, I'm not so sure. The lighting becomes ultra-critical otherwise the trees will look wrong. Take the grove of trees picture above: even a casual glance shows the shadows on the trees don't match the shadows on the ground, there's no highlight on the left of the trunk and so on. The viewer might not consciously pick up on these, but they are all cues of something not right.

    Tim, you're absolutely correct. Every solution has its place. And no solution applies to all situations. It appears that the focus in your render IS the vegetation, which implies that you need to focus on those elements. And in that case, simplifications are probably not appropriate.

    On the other hand, the concept of using 2D billboards/cards that I'm describing is, as I've said before, used countless times in virtually every feature film you've ever seen. It is extremely common. I'm sure that anyone who is interested can find numerous "making of" videos on the internet which describe the techniques used, and you can be pretty much assured that the "layered 2D card" approach is one of the primary techniques used in compositing a final image.

    Again, I'm not saying it's "right" or for everyone, I'm just trying to mention a simple technique that some might not be aware of.

    By the way, those renders are gorgeous... smiley

    Post edited by JoeMamma2000 on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,038

    except Carrara native render hates transmaps but is fine with replicated mesh

  • JoeMamma2000JoeMamma2000 Posts: 2,615

    except Carrara native render hates transmaps but is fine with replicated mesh

    Gosh, another Carrara limitation.  smiley

    Maybe that's why I suggested that one of the most efficient options is to do it all in a 2D compositor. Stack and arrange a bunch of "transmapped" vegetation images in your favorite 2D compositing application. LIke the rest of the world does. smiley 

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    Okay, now that we've beaten to death the concept of 2D cards, let's move on to another extremely common area where optimization can drastically reduce render times. And that is with the renders themselves...

    First, there are two main types of renders in Carrara: Raytracing and Global Illumination.

    In short, raytracing is an older render technique that was developed for the reasons I mentioned in my first post. Computers were slow, and you needed to find ways to do some incredibly tedious mathematics to simulate a 3D scene, but make it happen fast enough that you could use it to do renders for Star Wars before the impending release date. smiley

    So they developed a simplification that doesn't really simulate how light behaves (ie, bounces off surfaces many times and causes shadows before it enters your eye), but rather performs a simulation of light merely coming from a light source and bouncing ONCE into your eye. Well, except for reflections. Usually raytracing renderers allow you to simulate multiple reflections. Anyway, they also developed very simplified materials/shaders that didn't really describe how surfaces are in the real world, but were good enough for 3D rendering. As a result, raytracing gave you some decent realism, but did it relatively quickly.

    And as computers got faster, they realized they could now do more accurate simulations ("physically based" and "unbiased") that mimicked how light and materials behave in real life, so the renders got more photo-like. So Global Illumination renders can give a more realistic render (if done correctly), but they can take much longer than raytracing. Why? Well, one reason is that if you simulate how many times light can actually bounce off surfaces and generate shadows before it enters your eye, it can take a very long time. And add some other realistic effects (reflection, refraction, caustics, SSS, etc.), and renders can take forever.

    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    Now, does this mean that global illumination is necessary if you're striving for "realism"? Absolutely not. I previously mentioned that the vast majority of feature films you've seen in the last decades used raytracing for their 3D elements. And it's pretty much guaranteed that in the vast majority of those films there were 3D elements that you and I and everyone else found totally believeable. And many we didn't even realize were 3D/CG elements.

    So the point is that if your GI scene is taking a very very long time to render, you might want to consider using some other, more time-efficient methods to render your scene. And one of the ways that has been used for decades by VFX professionals is "simulating GI". Also known by the slightly derogatory term of "faking GI"  smiley

    How do you do that? Well, I mentioned bounce light. And if light in the real world only bounced once before it entered your eye, raytracing would be all you needed to reproduce photo-reality.

    And in the real world, there are cases where light doesn't really bounce a lot. Such as some outdoor scenes light by a single sunlight. Sunlight hits the sidewalk in front of you, then bounces into your eye. If there are not nearby walls or other objects to bounce off off, then "one bounce and in" is all you need.

    However, in other cases, such as an indoor scene, light typically enters a window and bounces around on the furniture and the walls and the floors and finally enters your eyes.

    The idea here is this:

    You can simulate each bounce of light off a surface with a separate light in your scene (such as a spotlight with soft shadows). And you can choose how many bounces to simulate.

    So for example, if you have a room with a sliding glass door, and bright sunlight entering and hitting the floor near the door, it will then bounce around the room, hitting each wall/floor/object in the room. And each time it bounces it's intensity drops significantly (depending upon the surface), and it's color changes since it inherits the color of the surface it's bouncing off.

    The image below is a GI simulation using only 5 spotlights. Not perfectly photo-like, but for many it might be sufficient. And the savings in render time vs. a full GI render is huge.

    Five Lights.jpg
    808 x 644 - 82K
    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615

    Now I also mentioned that while raytracing simulates only "one bounce and in", it does allow you to specify multiple bounces for reflections. So if you have mirrors or other reflective surfaces in your scene, you need to decide how much stuff will appear in your reflective surfaces. Just one reflection, or a reflection of a reflection, etc? And in Carrara, that setting is called "Maximum Ray Depth".

    However, if you don't have any reflective surfaces, you can crank that down and limit the amount of unnecessary calculations the renderer makes. And that same concept applies to any render settings. If you don't need it, turn it off.

  • JoeMamma2000JoeMamma2000 Posts: 2,615

    Again, there is no perfect solution for every situation. Can you live with 80% realism if it takes only 1 minute to render, compared to a 95% realism that takes 6 hours to render? It's up to you.

    But it's important to have those additional tools at your disposal, and you fully understand them and their uses and benefits and limitations.

    For example, I recall someone commenting on the indoor scene render I just posted, and saying that the bright specular on the far wall was one reason why the technique using a single bounce spotlight wasn't the best. However, a simple modification in a compositing app in which you dial down the specular contribution in a specular pass would alleviate that. It's all about what techniques your are familiar with and willing to investigate.

    My only point here is to open people's eyes to what techniques are out there and available and widely used in the industry.

  • JoeMamma2000JoeMamma2000 Posts: 2,615

    Now, in my thread on compositing I described MANY techniques you can use in a 2D composting workflow in conjunction with a 3D workflow that will make your projects far more efficient. Please refer to that thread if you're interested in using 2D compositing to improve efficiency and quality.

    But I will mention one common usage that can greatly reduce render times.

    If you use render passes, you can render both a shadows pass and a reflections pass, and in your compositing app you have the option to perform a blur operation, as well as other modifications to those elements. And as you know, doing shadow and reflection blur in a 3D render can be extremely time consuming, while in 2D it can often happen in real time, and provide realtime feedback.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2015

    1. Hide objects that are not visible from camera and don't cast shadows in camera view, in animations you often have a bigger scene and don't show all in camera view, can make a huge difference.

    mikael-arronsson, that's a good technique to keep in mind in general.

    I *think* with Carrara's ray tracer, and most ray tracers, the way they work is to start from the camera's view and fire rays into the scene, and bounce those rays off any object within the camera view, and then to the light source. They calculate kind of backwards. Instead of from the light source and into the camera, it's done the opposite way just so the renderer won't waste time with scene components that are outside its field of view. So their render calculations are ONLY for what the camera sees, and anything else is ignored. Now that's not the case for all renderers, and with some you need to do exactly what you describe, and delete stuff outside of the camera view to cut down render time.

    Good point.

    Post edited by JoeMamma2000 on
Sign In or Register to comment.