I have a forest scene I’m rendering with a LOT of plants in it, almost 300 weeds/bushes, and over 100 trees. When I render the scene by itself, it only takes around 2 minutes to render, but when I add in my character, it takes over 13 minutes! The character itself only takes around 2 minutes to render. This is all for an animation project that I’m trying to get done as soon as possible, and 14 minutes just isn’t fast enough per frame. When the scene renders, it uses over 2 GB of my ram, and 4 threads for all 4 cores of my CPU, and I have 8 xparts/yparts. I’m wondering if there are any ways I could optimize my scene to render much quicker? I just started blender last October so I learn pretty quick.
You might want to look into compositing :
Can you explain more about how this would help me?
Render just the forest (self described about 2 min right?)
render only your char, in the position you’d want him (another 2 min right?)
photoshop both together into one image (or use blender nodes as hinted at above) (another what 4-5 min?)
do this for every frame (may not have to if using nodes…I dont know)
I just took your 14 min of work rendering just one frame and turned it into 9 min of work effectively cutting up your entire render time for your full animation by about half.
Read the rest of the manual pages on compositing / nodes, then google “compositing”.
Basically, you eliminate repetively rendering frames that are not changing, i.e. your background. Or if for some reason the combination of the char and the background is slow, you could parent / substitute an empty for your character, hide the character, set the camera to track that empty, render out the “characterless” background (with the animated camera movement), then
render the character alone, then composite them together.
One thing that I’m not sure about though is the shadows the trees are producing, if I render the character alone the shadows would not be placed on top of him right? Also, what If I wanted some trees to pass in front of him on screen when he is walking through the forest? Could rendering the trees shadows only (instead of the whole tree) in the character pass affect render time?
HouseArrest, I can’t Photoshop every frame, but I could probably use Nodes or even Adobe Premiere/After Effects to composite them.
BTW, I just did a test and the character pass alone took 8 seconds, while the background alone took 64 seconds in this particular frame (but there are no trees or weeds in the shot, only their shadows) I honestly don’t understand why combining them would take 13-14 minutes, if alone they take 72 seconds total.
Are you using ray traced shadows ?
Or even buffered shadows.
Both will increase render times, ray traced shadows substantially.
There are techniques for baking shadows / lighting / texturing, but I’m not proficient with them.
Don’t photoshop, for god’s sake. Use the nodes via the link Mike gave u and just mix the two renders together using the mix node. simple and easy, and only 4 min per frame.
I tried making all the trees invisible, only there to produce the shadows on my character and still got a 13 minute render.
Mike_S, I’m only adding the character’s shadows, is that enough to add ~12 minutes to my render? Also, I thought baking shadows would only work for static objects like the background, not my character. Because the tree’s shadows would be on a different spot on the character every frame.
PapaSmurf, I figured nodes would probably be the route to go, but I’m still worried about the shadows. I really would like the tree’s shadows to be cast on my character. It would definitely add to the realism of the scene.
Is it necessary to actually use the trees to cast the shadows? Would it be obvious if the “shadows” were faked by a projected texture rather than raytracing a shadow? In a wooded area I’d think it would be hard to tell which trees are casting which shadows.
Hmm, that projection texture actually sounds really good. I can bake the shadows into the ground, save that as a texture, then project it onto my character? How exactly would I do that? I’m baking my shadows now
EDIT: Hmm, is there some reason my shadows aren’t being rendered with OSA, OSA is turned on…?
Alright, I’ve been playing with a bunch of settings and it seems to render decently without the ground in shot (so all the trees/weeds and character but no ground). What could be the reason for this? Could it have something to do with the fact that my character is touching the ground (I wouldn’t think so since there are hundreds of plants touching the ground).
So it renders okay wither either the ground or the character disabled, but if I render just the ground+character, I still get a long render (I didn’t let it finish so I don’t know how long, but it was noticeably longer than the other methods.
So what I’ thinking is take my prerendered shadow bake and use it on the ground and render that as a pass, then render trees+character as a second pass and combine them with nodes/compositing (I still have to figure his out, shouldn’t be too hard)
If you have any other ideas let me know
BTW to fake OSA on the bake I just baked it at 4k resolution then downsampled it to 2k in photoshop to emulate 4x OSA.
EDIT: I might just render the ground with real shadow (from OnlyShadow trees) to get a more realistic effect, because even with those, the total render time is still less than 3 minutes. (at least for this frame, later frames will for sure be longer as I will be having the trees in the background)
If you are using ray-traced shadows, then try increasing the octtree resolution. This might help reduce the render time.
Holy crap! I increased the octree resolution from 128 to 512 and the 13.5 minute render (the original one) was reduced to 1.5 minutes! WOW!!! Thank you so much ypoissant! This makes things so much easier.
You have to find the sweet spot. 512 may or may not be the optimal size. Have you tied 256 just to make sure?
Not yet, though 1.5 mins is just fine for me, also what exactly is this doing? I’ll check later just to be sure though.
You really want to know?
The OctTree is a ray-tracing acceleration structure. It subdivides the whole scene into a regular 3D grid of cells and places every polys of every objects into their corresponding cell. When rendering, it is quicker to determine which cell a ray is intersecting and then test the polys in those cells instead of testing every polys in the scene.
When you have a large low-poly scene with a small high-poly model in the middle, if the octtree resolution is too small, most of the scene’s poly that comes from the small high-poly model, end up in a very small number of cells. And so, even though it is relatively quick to figure which cell to test, when a cell contains a large number of polys, we gained nothing because all those polys must be tested.
On the other hand, if the octtree resolution is too large for a given scene, then the raytracer looses time checking for cells that contains no polys. That is why each scene have its own octtree resolution sweet spot that must be found experimentally.
Yeah, lol I actually enjoy learning those kind of things. Anyways, 256 gave me a render time of 3.5 mins, so 512 looks right
I have a scene I just started and this one renders faster with an octtree resolution of 64 instead of the default 128. Not much faster but from 1:37 to 1:15… And at 256, it took 2:34. It really depends on the scene.
good stff, eh?wiki updated.