Light Cache Problems while Rendering Animations

I’m in the process of creating a 1-minute flythrough animation of a building. My primary engine is the Irradiance Map and my secondary engine is the Light Cache. I have about 60 scenes on SU (1-second transition to each scene) and my computers are a little slow, so I have to have each computer render only a few scenes at a time to prevent them from crashing.

The problem is, each time I start a render it takes the computer about 3-4 hours just to get through the Light Cache phase, then it takes about 15 minutes to go through the prepasses for each frame.

Is there a way to speed up the Light Cache process for an animation?

Re: Light Cache Problems while Rendering Animations

You’d have to give way more of a description of your scene and settings for me to be able to say something remotely relevant as I have no idea what your working with. I will say that at this point, I don’t highly recommend using LC for animations. The needed workflow for using LC in animations isn’t hooked up yet, so using it frame by frame has the potential to introduce artifacts. Based on that and the high LC times you’re experiencing I’d recommend giving DMC for secondaries a shot.

Also, LC will NOT be shared across DR nodes (I haven’t taken a look at your other thread yet). So if you were trying to use DR it would not help speed up the LC calculations at all (and could potentially slow down the whole process of the frame if your spawners are slower than your host machine).

Re: Light Cache Problems while Rendering Animations

Well, I have an older version of V-Ray for SU (version 1.00). I’m not exactly sure which version I have specifically, because when I look in the “About” tab of the Render Options it says “V-Ray for Rhino,” which I obviously don’t have.

In terms of my settings, most of them are the default settings. Here are my few exceptions:

My Outputs are 1200x900 jpeg images.
My QMC Image Sampler Adaptive Number is set to 0.85.
My Color Mapping is Set to Reinhard.
My Primary Engine is the Irradiance Map
---The Min/Max rate is set to -3/0
---HSph Subdiv / Samples = 50/20
---The Mode is set to “Incremental add to current map”
My Secondary Engine is the Light Cache
---The Mode is set to “Flythrough”

My model is a high school, and I already know that the biggest contributor to the render time are the trees. I created realistic low polygon trees by using real images of branch clusters attached to a 3D trunk.

The trees are very low polygon, though. I could literally have a hundred on the screen in SU and barely slow down my work progress. But in V-Ray, the rendering cores take forever and I believe the trees are the reason why the Flythrough Light Cache takes so long.

Re: Light Cache Problems while Rendering Animations

There isn’t really any reason to have your LC mode set to FlyThrough as this is not currently supported.

Incremental Add to current map should on only be used if you’re precalculating your IR map. If you aren’t switch back to Single Frame.

At 1200x900 you could probably get away with a max rate of -1 instead of 0

Re: Light Cache Problems while Rendering Animations

Also, I tried making the QMC my secondary engine. That definitely worked in terms of getting past the Light Cache calculation, but now the prepass phases take about an hour per frame to render.

I had one idea, but I’m too afraid to try it: I had set one of my computers to render 4 scenes (at 24 frames per second, that’s a total of 96 frames). It crashed after a few frames, but I was able to save the Light Cache Flythrough calculation. Then what I did was have another computer render those same 4 scenes, but I set the Light Cache Mode to “From File” and uploaded the calculation that I saved. When I clicked render, it instantly skipped the Light Cache calculation and started the prepasses for each frame. The frames came out beautifully.

My theory is, if I set up one computer to start rendering the entire 60 scenes, it’ll create a Light Cache calculation for the entire animation, which I can then save and upload for each of the other computers.

I have 2 problems with this theory:

1: The Light Cache Flythrough calculation file size for just those 4 scenes was 320MB. So the file size for all 60 scenes would be huge!

2: It took my computer over 4 hours to calculate to Light Cache for just those 4 scenes. I don’t even want to know how many days it would take to calculate the Light Cache for the entire 60 scenes.

Re: Light Cache Problems while Rendering Animations

Hey Damien,

I noticed a lot of people have said that the Light Cache doesn’t work for Flythrough, but it looks like it definitely worked for those 4 scenes I rendered.

Could this be a glitch in my favor from the older version of V-Ray? Or did I just luck out? I haven’t tried the Light Cache theory for any of the other renderings yet…

Re: Light Cache Problems while Rendering Animations

Well I’ll be damned… Just tried it and it is working. I tested it as recent as this summer (it was not working then…and hadn’t any of the previous times I tested it), and I didn’t think there were any changes made that would make it work, so I’m quite surprised at this. This however is in the newest version (1.05.30), so that is very odd that its working for you.

That being said, I think you’re generally confused about how this is supposed to work. The goal of LC flythrough mode is to created one LC map for the whole camera path. Therefore what it will do is generate sample areas for every place that’s visible in the scene from all points on the camera path. Then it will distribute the subdivisions specified in the LC parameters equally along the path. Therefore, when calculating the LC solution, there really isn’t the concept of frames.

The LC file might be larger for the whole scene, but most likely it will not be 4 times larger. Maybe 1.5 times as large, but certainly not 4 times.

The amount of time the LC calculation will take depends largely on how many samples you are using. If you had the whole animation in a single file and changed nothing else, your LC calculation would likely take about the same time as with a smaller section of the animation because the same number of subdivisions are being used.

My theory is, if I set up one computer to start rendering the entire 60 scenes, it’ll create a Light Cache calculation for the entire animation, which I can then save and upload for each of the other computers.

That theory is standard workflow when doing LC with animations…Calculate a single LC map (in FlyThrough mode) for the whole animation, then distribute to any computers that need that LC map.

You should really look into the proper animation workflows as that will help you better get this animation going. Your tip toeing beside some of the steps, so you should just go through and do what needs to be done. Below is the animation tutorial from Spot 3d. Its specifically for Max, but all of the V-Ray concepts are the same. Follow its steps on the whole animation, then use the saved IR and LC files for rendering out the final images with the smaller segments of the animation

Re: Light Cache Problems while Rendering Animations

The only thing I have to say about the tutorial itself is that it really won’t matter if you set your LC scale to World or Screen. I keep it on Screen and it works out fine.

Re: Light Cache Problems while Rendering Animations

Wow, when I read that tutorial, it looked like I was almost doing exactly what it was telling me to do, lol! I’ll give it a try and see what happens overnight. Hopefully, my older version of V-Ray will still be able to produce the same kind of results as from the tutorial.

I’ve been egging my bosses to buy the newest version of V-Ray so that I can render faster and more efficiently, but they’ve been keeping a tight budget around the office.

Thanks again for the tips, I’ll let you know how everything goes.

Re: Light Cache Problems while Rendering Animations

At this point, there’s nothing to buy. The most latest version is just a free upgrade, so if you have a license you can use the latest version.

Re: Light Cache Problems while Rendering Animations

It works also on the original release!
Just now I’ve tried the Fly Through option and used that map (from file) for the whole animation. so each frame it skiped the “building light cache” and started at “prepass”