Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Bug Reporting => [C4D] Resolved Bugs => Topic started by: anton taf on 2017-06-13, 09:37:50

Title: Slow rendering of high resolution images
Post by: anton taf on 2017-06-13, 09:37:50
I'm having a lot of difficulties with high resolutions. Is this normal for now? I'm rendering in 3500x2300 and it's very slow. It took me almost 2 days for one render to reach 6% noise. I have a lot of plantation and it's a big scene, but it seams not normal. In resolution 2880x it renders fine...
c4d r17.055, corona DailyBuild 2017-05-17, dual xeon pc, 32gb ram.

How can I check which objects or areas slows down the scene so I can optimize it? Is there a Multipass channel for this?
Also for exterior shots with plantation I'm using Path Tracing solver. I think this is better right? Thanks
Title: Re: Slow rendering of high resolution images
Post by: fabio81 on 2017-06-13, 09:43:07
Yes, with high resolution is very very slow .. hopefully in the future it will solve ..
Title: Re: Slow rendering of high resolution images
Post by: houska on 2017-06-13, 10:30:13
I'm having a lot of difficulties with high resolutions. Is this normal for now? I'm rendering in 3500x2300 and it's very slow. It took me almost 2 days for one render to reach 6% noise. I have a lot of plantation and it's a big scene, but it seams not normal. In resolution 2880x it renders fine...
c4d r17.055, corona DailyBuild 2017-05-17, dual xeon pc, 32gb ram.

How can I check which objects or areas slows down the scene so I can optimize it? Is there a Multipass channel for this?
Also for exterior shots with plantation I'm using Path Tracing solver. I think this is better right? Thanks

It shouldn't be a problem. 2 days is really weird... What are your render times up until 6% noise with the 2880x... resolution? And yes, for exteriors, UHD cache should not give any significant benefit.
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-13, 12:58:06
I'm attaching a screenshot of my scene (in ID channel) to have an idea of my scene size.
You can see the rendering time at the moment is 1:26, 13 Passes rendered, 11,89% noise level.
I think this is kind of normal. The problem is when I want higher resolution...
Title: Re: Slow rendering of high resolution images
Post by: Ondra on 2017-06-13, 13:00:31
rays/s is way too slow, what is your RAM and CPU usage?
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-13, 13:25:24
rays/s is way too slow, what is your RAM and CPU usage?

I'm attaching two more screenshots with cpu and memory usage.
Title: Re: Slow rendering of high resolution images
Post by: Shawn Astrom on 2017-06-13, 16:59:00
I'm having a lot of difficulties with high resolutions. Is this normal for now? I'm rendering in 3500x2300 and it's very slow. It took me almost 2 days for one render to reach 6% noise. I have a lot of plantation and it's a big scene, but it seams not normal. In resolution 2880x it renders fine...
c4d r17.055, corona DailyBuild 2017-05-17, dual xeon pc, 32gb ram.

How can I check which objects or areas slows down the scene so I can optimize it? Is there a Multipass channel for this?
Also for exterior shots with plantation I'm using Path Tracing solver. I think this is better right? Thanks

I can also confirm that once you need to render above a certain resolution like 4096 for example Corona brings my 40-core machine to a stand still... Whole computer becomes very unresponsive... I tried limiting the amount of cores and Corona still get weird and slow at higher resolution renders...

- Shawn
Title: Re: Slow rendering of high resolution images
Post by: 4b4 on 2017-06-13, 17:15:53
I'm on a i7-4930 but get a similar problem however I've found culling down the number of lights really helps on some scenes. Appreciate this isn't always possible but I noticed a very high light count in the screen grabs, can you reduce this down (even temporarily) to see if that speeds things up?
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-13, 17:56:38
What I do to optimize my scene are the following:
1. I use render instances for all plants and trees, or forester plants.
2. I use for grass, 3 different resolutions of the grass based on the distance from camera (LOD).
3. I create instances (not render instances) for each corona light that is repeating. (and I add the source light + the instances in the LightSelect...)
4. I merge as many as possible objects in one.

On the other hand, I have many Light Selects in Corona Multi-pass and I have many objects in the scene, that I turn off depending on the camera I use each time. (Here I try to use the Take system, but as I said in a previous post I have some issues with this. Or I'm not sure if it's this, but I think it slows down even more the rendering)
Also I'm using Vertex Maps for the scattering (I don't know if this has to do with the speed...)
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-13, 18:17:52
I'm on a i7-4930 but get a similar problem however I've found culling down the number of lights really helps on some scenes. Appreciate this isn't always possible but I noticed a very high light count in the screen grabs, can you reduce this down (even temporarily) to see if that speeds things up?

What I didn't do is to Uncheck all LightSelects (from Multi-pass) that I have off for the current camera. I will try this and see how it goes, thanks
Title: Re: Slow rendering of high resolution images
Post by: TomG on 2017-06-13, 21:20:10
Tried a simple scene (HDRI + Corona Sun, interior) at 16,000 x 9,600 resolution. One thing I note is that your CPU is only showing 50% utilization.

Will see if I can test with render elements and / or more lights. BTW what render elements do you have set up in the Corona Multipass?
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-14, 01:00:38
Ok now it looks much better.
I unchecked all unused LightSelects and deleted all Takes. I'm not sure if the Takes have to do with it. But the lightselects for sure.
I don't know about the Utilization of my CPU. Now it is 100%. I didn't change anything for this. (The Virtualization setting has any affect in the rendering?)

Just to note here that I had more than one Suns, Skies and HDRi in the same LightSelect (see image below - With one of them On at a time). Also in the render that took me almost 2 days I had DOF on, with more lights in the interior (also exterior shot). In this one I have DOF off with just two lights + hdri.
I use very basic passes as you can see. ID, Reflect, ZDepth and lightmix.

I will retry again the other camera and check if the number of lights causes a lot delay. Thanks


Title: Re: Slow rendering of high resolution images
Post by: Nejc Kilar on 2017-06-14, 08:37:45
@anton taf If I may have a crack at your problem as well... Your disk usage is off the charts in each of your screenshots. That usually happens when you run out of RAM - probably due to the exterior scene and a lot of lights active in lightmix. I do see your RAM is below 90% for the most part but it might have already offloaded most of the content back onto the HDD / SDD drive.

As for problems with Corona being slower when rendering big... I posted a similar topic under General as I have literal VFB / UI slowdowns when I render complex scenes. Funny stuff :)
Title: Re: Slow rendering of high resolution images
Post by: Rhodesy on 2017-06-15, 10:46:46
Yes I get those slow downs too. I appreciate there are a lot of calcs going on and more pixels to shift but it would be interesting to see if its the same on MAX. I would have thought the 2 corona VFBs would be identical as its all corona? Maybe its something to do with having to sync with the PV? Getting some better save options in the Vfb would mean we could ditch the PV and hopefully improve performance. But im only guessing at that.
Title: Re: Slow rendering of high resolution images
Post by: Nejc Kilar on 2017-06-15, 10:52:10
Thats the funny thing. 3ds Max works fine for me :) Smooth even with the IPR. In C4D however, if I render a 3k preview I sometimes (and it seems a bit random) can barely move the render region around.
Title: Re: Slow rendering of high resolution images
Post by: TomG on 2017-06-15, 14:46:17
Hi all!

Do we have (or need) a separate thread or Mantis report for the performance slowdowns anyplace?

I can confirm that on my system, as resolution increases, there are hits to the system performance, where the mouse pointer will slowdown etc. At 2K square I see none, at 4K it's slight, at 8K noticeable, at 16K very noticeable (and indeed the render just stopped before showing anything, leaving a black VFB).

It does seem related to the updating of the native picture viewer, if I have both open at the same time, whenever the picture viewer refresh gets to the bottom of the window, I experience the lag (lag happens even if the PV is closed, just leaving it open shows that it is related to it refreshing).


Thanks!
   Tom
Title: Re: Slow rendering of high resolution images
Post by: Rhodesy on 2017-06-15, 14:55:58
Yes that's it. Very noticeable at full res with lots of layers. But more of an issue when actually tone mapping and tweaking. Even more pronounced with bloom and glare changes. Why is the C4D vfb not just the same as the MAX one? Is it because it saves the settings back to the scene?
Title: Re: Slow rendering of high resolution images
Post by: TomG on 2017-06-15, 15:00:26
The Corona VFB would be the same, looks like the difference would be in copying the results back over to the C4D PV. I have no idea what the Corona VFB does with the Max native viewer, as I never ever open the native Max viewer at all :) But looking to me more like differences in the native viewers and the sync to them, rather than differences in the Corona VFB.
Title: Re: Slow rendering of high resolution images
Post by: Nejc Kilar on 2017-06-15, 15:22:42
Hi all!

Do we have (or need) a separate thread or Mantis report for the performance slowdowns anyplace?

I can confirm that on my system, as resolution increases, there are hits to the system performance, where the mouse pointer will slowdown etc. At 2K square I see none, at 4K it's slight, at 8K noticeable, at 16K very noticeable (and indeed the render just stopped before showing anything, leaving a black VFB).

It does seem related to the updating of the native picture viewer, if I have both open at the same time, whenever the picture viewer refresh gets to the bottom of the window, I experience the lag (lag happens even if the PV is closed, just leaving it open shows that it is related to it refreshing).


Thanks!
   Tom

www.dropbox.com/s/tp31fsy3hpupbs3/c4d%20corona%2C%20VFB%20suttering.mp4?dl=0

I've uploaded an example from my box. The cursor is fine but everything else isn't :)

Oddly, I get similar stuttering when I refresh / tweak certain materials. In that case the whole C4D stutters including the menus. The good thing though is that all of the threads are busy. I get way less stuttering if I limit the thread amount to like 36 and then render but as described in another thread... 36 and lower is the only value that works but thats like half of the threads available here.

I get stuttering (although usually less) when rendering a shader ball as well.

I tried the 3ds max version with the demo (demo max, demo Corona) and its way waaay more fluent :)

Not sure if thats helpful but hey... Can't hurt me posting.
Title: Re: Slow rendering of high resolution images
Post by: 4b4 on 2017-06-15, 17:17:23
One idea with the picture viewer / VFB slowdown that I can't test myself at the moment.

If you go edit > preferences > Corona and then go down to VFB settings you can change the default frame buffer and the update interval. I vaguely recall playing with this a few months back but stopped using it as forester didn't work well with the VFB only. Perhaps setting this to just the VFB and maybe decreasing the update frequency might speed things up on larger renders?
Title: Re: Slow rendering of high resolution images
Post by: TomG on 2017-06-15, 17:39:45
Changing Default frame buffer to Corona VFB, unchecking Show VFB render in PV, and unchecking Update PV image after rendering did not seem to change anything. However, raising the Update interval to the max 100 seconds did - there were still some stutters during scene parsing before rendering begins, and some after I stopped the render, but during the render no sign of the performance hits (well, most likely it would have had a stutter every 100 seconds, but I didn't leave it running to see :) )
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-15, 18:01:26
I still have issues with high resolutions.

I have this interior camera now. I try to render in 3500x resolution in two PCs. One Ryzen1700x, 32gb ram and one Dual xeon, 32gb ram.

With the Ryzen I got low memory errors and it crashed at 3500x. So I tried in lower resolution 2880x and it started fine (see image below).
With the xeon it started at 3500x after a lot of time Preparing. It used the disk a lot when preparing. It stopped using it for a while I think in the Passes 1 or 2. Now it is in Pass 4 and it goes slow. CPU utilization is lower than 100% with high use of the disk and memory.
Also the Rays/s Numbers are much lower when it uses the disk.

Let me know what you think. It's a bit strange for me, because this scene has very few plantation. It has many lights though...
Do you think 32gb RAM is very low for this kind of renders? Thanks

Notes for the screenshots:
The Ryzen is at 2880x resolution
The Dual Xeon is at 3500x resolution
Title: Re: Slow rendering of high resolution images
Post by: leo3d on 2017-06-15, 21:25:39
It's strange cause i already made more 6000px render and no crash (Sometime)
My feedback:
High and/or lot of displacements
Laubwerck instance
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-16, 10:05:56
Ok I think I found the issue.
I tried to delete as many unused objects from the scene as possible. And what I also turned off was some Planes with Portal material that I had at the openings. But in this scene my camera was actually outside of the Portal planes. I'm not sure, but I think this was the problem. So it was my mistake, sorry.
In the screenshot below you can see the Stats from the finished render at 3500x resolution
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-19, 11:19:04
I'm still having issues with the CPU performance while rendering. It is probably memory related, but sometimes it renders with CPU utilization 100% and some around 50% (very slow performance and render time)

Also I've noticed that when I have two scenes open, my main scene, and another one for render testing some elements from the main scene (copied), corona crashes when I switch back to the first scene to start render in high resolution. I need to fresh restart cinema in order to avoid crashing..
Title: Re: Slow rendering of high resolution images
Post by: anton taf on 2017-06-19, 21:36:35
This one (screenshot) was rendering for 19:59 hours in 3500x1867px and it stacked at about 5.35% noise (I had 4% limit in my settings). With low CPU utilization, high usage of the disk and ram.
I can't understand yet when it does it and when not... :/ 
(The main lighting of the scene was Corona sun and Sky)

Do you think it has something to do with the light instances? What do you suggest as best:
1. Corona lights only ?
2. Corona lights + Instances ?
Title: Re: Slow rendering of high resolution images
Post by: houska on 2017-06-20, 09:57:48
Hi Anton. Your findings are strange, indeed. In any case, remember that even the rendered image itself takes a lot of memory. For example your 3500px render has 50% more pixels than the 2880px one. This means that the framebuffer will take 50% more RAM. Also, the more passes you have in multipass, the more memory your framebuffer takes. You can do the math yourself - a 4-component pass (e.g. beauty) will typically take 16 bytes per pixel, which is about 100MB per pass in your 3500px render. With 20 such passes, you'll need 2GB of memory only for framebuffers...
Title: Re: Slow rendering of high resolution images
Post by: Nikola on 2017-06-20, 13:55:25
Hi Anton,

according to your screenshot https://forum.corona-renderer.com/index.php?action=dlattach;topic=16553.0;attach=65872 (https://forum.corona-renderer.com/index.php?action=dlattach;topic=16553.0;attach=65872) (committed and cached values) it really looks you don't have enough physical memory and system is heavily swapping. Would it be possible to send us the same screenshot for the lower resolution which renders fine (some 2880x as you wrote in the first post)? Thank you.

Nikola