Make LuxRender render faster
In addition to writing blogs here at Randosity, I also like creating 3D art. You can see some of it off to the right side of the screen in the Flickr images. I point this out because I typically like to use Daz Studio to do my 3D work. I also prefer working with the human form over still life, but occasionally I’ll also do a still life, landscape or some other type of scene. Today, I’m going to talk about a rendering engine that I like to use: LuxRender. More specifically, how to get it to render faster. You can read more about it at www.luxrender.net. Let’s explore.
3Delight and Daz Studio
Daz Studio is what I use to compose my scenes. What comes built into Daz Studio is the rendering engine named 3Delight. It’s a very capable biased renderer. That is, it prefers to use lighting and internal short cuts to do its rendering work. While 3Delight does support global illumination (aka. GI or bounced lighting), it doesn’t do it as well or as fast as I would like. When GI is turned on, it takes forever for 3Delight to calculate the bounced light on surfaces. Unfortunately, I don’t have that long to wait for a render to complete. So, I turn to a more capable renderer: LuxRender. Though, keep in mind that I do render in 3Delight and I am able to get some very realistic scenes out of it, also. But, these scenes have a completely different look than Lux and they typically take a whole lot longer to set up (and a ton more lights).
LuxRender
What’s different about Lux? The developers consider it to be an unbiased renderer, that is, it is considered physics based. In fact, all renderers attempt to use physics, but Lux attempts to use physics on all light sources. What is the end result? Better, more accurate, more realistic lighting…. and lighting is the key to making a scene look its best. Without great lighting, the objects within it will look dull, flat and without volume. It would be like turning the lights off in a room and attempting to take a photograph without a flash. What you get is a grainy, low light, washed out and flat image. That’s not what you want. For the same reason you use a flash in photography, you want to use LuxRender to produce images.
Now, I’m not here to say that LuxRender is a perfect renderer. No no no. It is, by far, not perfect. It has its share of flaws. But, for lighting, it can produce some of the most realistically lit scenes from a 3D renderer that I’ve found. Unfortunately too, this renderer is also slow. Not as slow as 3Delight with GI enabled, but definitely not by any stretch fast. Though, the more light you add to a scene, the faster Lux renders.
However, even with sufficient lighting, there are still drawbacks to how fast it can render. Let’s understand why.
LuxRender UI
The developers who designed LuxRender also decided that it needed a UI. A tool that allows you to control and tweak your renders (even while they’re rendering). I applaud what the LuxRender team has done with the UI in terms of the image tweaking functionality, but for all of the great things in the UI, there are not-so-smart things done on the rendering side. As cool and tweakable as a render-in-progress is, it should never take away from the speed at how fast a renderer can render. Unfortunately, it does.
Let’s step back a minute. When you use Daz Studio, you need a bridge to operate Lux. It needs to be able to export the scene into a format that Lux can parse and render. There are two bridges out there. The first is Reality. The second is Luxus. I’ll leave it to you to find the bridge that works best for you. However, Reality has versions for both Daz Studio and Poser. So, if you have both of these, you can get each of these versions and have a similar experience between these two different apps. If you’re solely in the Daz world, you can get Luxus and be fine. Once you have this bridge and you export a scene to the LuxRender, that’s when you’ll notice a big glaring sore thumb problem while rendering.
Render Speed and LuxRender UI
When I first began using LuxRender, one thing became very apparent. LuxRender has this annoying habit of stopping and starting. Because my computer has fans that speed up when the CPU is put under load and slow down when not, I can hear this behavior. What I hear is the fans spinning up and spinning down at regular intervals. I decided to investigate why. Note, renderers should be capable of running all of the CPU cores at full speed until the render has completed. 3Delight does this. Nearly every other rendering engine does this, but not LuxRender.
Here’s part of the answer. There are two automatic activities inside of the LuxRender UI while rendering:
- Tonemapping
- Saving the image to disk from memory
- Write FLM resume file
Both of these activities outright halt the rendering process for sometimes several minutes. This is insane. Now, let’s understand why this is insane. Most systems today offer 4 or more cores (8 or more hyperthreaded cores). Since you have more than one core, it makes no sense to stop all of the cores just to do one of the above tasks. No. Instead, the developers should have absconded with one of the cores for either of these processes leaving the rest of the cores to continue to do rendering work all of the time. The developers didn’t do this. Instead, they stop all cores, use one core (or less) to write the file to disk or update the GUI display and then wait and wait and wait. Finally, the cores start up again. This non-rendering time adds up to at least 5 minutes. That’s 5 minutes where zero rendering is taking place. That’s way too long.
How do I get around this issue? Well, I don’t entirely. If you want to use LuxRender, you should run over to luxrender.net and make a complaint to solve this problem. The second thing to do is set the tonemapping interval to 3600 seconds, the image write to disk interval to 3600 seconds and the FLM write interval to 3600 seconds. That means it will only save to disk every 1 hour. It will only update the screen every 1 hour and save a resume file every 1 hour. That means that LuxRender will have 1 hour of solid render time without interruptions from these silly update processes. This is especially important when you’re not even using the LuxRender UI.
Note that many applications set up intervals as short as a few seconds. That’s stupid considering the above. Yeah, we all want instant gratification, but I want my image to render its absolute fastest. I don’t need to see every single update interval in the UI. No, if I want to see an update, I can ask the UI to provide me that update when I bring it to the front. Automatically updating the UI at 10 second intervals (and stop the rendering) is just insane and a waste of time, especially when I can simply refresh the UI myself manually. In fact, there is absolutely no need for an automatic refresh of the UI ever.
Network Rendering
The second way to speed up rendering is to use other systems you may have around the house. They don’t necessarily need to be the fastest thing out there. But, even adding one more machine to the rendering pool makes a big difference on how fast your image might complete. This is especially important if you’re rendering at sizes of 3000 by 3000 pixels or higher.
System Specs and Lux
Of course, buying a well capable system will make rendering faster. To render your absolute fastest in Lux, it’s a given that you need CPU, CPU caching and large amounts of RAM to render. So, get what you can afford, but make sure it has a fair number of CPUs, a reasonable L1 and L2 cache set and at least 16GB of RAM (for 3k by 3k or larger images). If you add one or more GPUs to the mix, Lux will throw this processing power on top and get even faster rendering. But, this doesn’t solve the problem described above. Even if you have 32 cores, 128GB of RAM and the fastest L1 and L2 caches, it still doesn’t solve the stopping and starting problem with rendering.
If you want to dabble in LuxRender, you should run over to the luxrender.net and file a complaint to fix this cycling problem. In this day and age with multiple cores and multithreading, stopping the render process to save a file or update a UI is absolutely insane. To get your fastest renders, set the update intervals to 3600 seconds. Note, though, that if LuxRender crashes during one of the one hour intervals, you will lose all of that work. Though, I haven’t had this happen while rendering.
So, that’s how you get your fastest render out of LuxRender.
leave a comment