Author Topic: How to optimize my scene to render faster?  (Read 2527 times)

2023-06-28, 14:28:45
Reply #15

James Vella

  • Active Users
  • **
  • Posts: 571
    • View Profile
What if you just remove the wall behind the camera? Alternatively where the door would be just leave it open?


2023-06-28, 14:41:53
Reply #16

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8892
  • Let's move this topic, shall we?
    • View Profile
    • My Models
So I'm not sure why there's no change in the rendering times. I used a resolution of 640x618 pixels and a target noise level of 10%.
The fastest combination was sampling balance of 16 (1mn08s) and the slowest sampling balance of 48 (1mn32s).

That's quite strange. Maybe that's because in low resolution the balance between GI and AA changes significantly, or maybe there's something else going on. I honestly have no idea. If you're still in experimentation mood, you can try to add CESSENTIAL render elements and see which one is the noisiest. Maybe that would give you a clue where to look for scene performance gain.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-06-28, 16:16:42
Reply #17

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 581
    • View Profile
Thanks.
Out of curiosity I started a new scene from scratch: I modeled a simple box, put a Corona Sun and environment, an override material and hit render.

The same problem is happening: after 5mn of rendering (6000 px wide) the noise level is only 11% and the remaining time announced to hit a 3% noise level is 1hour ... something is wrong.

Too bad I didn't do this test when I was still on Corona 9.

You can share the sample scene here so other users can test the exact same scene too, and share their results.
Honestly the timing seem strange to me, yet I would not directly co-relate the noise level percentage to image cleanliness - in higher resolutions, you get higher noise % for relatively the same cleanliness of the render in lower resolution. Plus the 1:4 zoom shows the image much noisier than it actually is (like a high resolution image previewed in low resolution).
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2023-06-30, 11:49:04
Reply #18

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
What if you just remove the wall behind the camera? Alternatively where the door would be just leave it open?

I didn't try that. It would probably make the render faster indeed, but it would also make the image look more flat because of light coming from behind the camera.

2023-06-30, 13:02:31
Reply #19

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
That's quite strange. Maybe that's because in low resolution the balance between GI and AA changes significantly, or maybe there's something else going on. I honestly have no idea. If you're still in experimentation mood, you can try to add CESSENTIAL render elements and see which one is the noisiest. Maybe that would give you a clue where to look for scene performance gain.

I added all CESSENTIAL render elements but I can't really tell whether or not one is particularly noisier than the others. The noise seems pretty consistent across all of them. Maybe INDIRECT pass is a bit noisier than the others but not sure.

2023-06-30, 17:34:57
Reply #20

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12818
  • Marcin
    • View Profile
This kind of scene is very challenging to sample. This dark room with a single bright spot of sunlight is basically using indirect illumination as key light in your scene. What you can try here if you wish to render to high-res like 6k is bumping GIvsAA to some crazy value like 256 (from the original 16). This way you will put a lot of processing power into GI, and you won't get nice smooth edges, but it doesn't matter that much when rendering in high-res. Even if you get something like 4-8 AA samples (4-8 Corona passes), the image should look good in terms of AA in such resolution.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-07-02, 11:39:05
Reply #21

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
@Aram Avetisyan: Thank you for your feedback.
You are right: going down to 3% noise level target seems excessive for a high resolution like 6000 pixels wide, and it increases rendering time by almost 3 times compared to a 5% noise level target according to my tests on this scene.

2023-07-02, 12:05:08
Reply #22

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
Actually, I don't really understand what the problem is with this particular scene. I started from scratch with a blank max file and gradually merged all the objects from the original scene. Then I rendered it in 6k with a 3% noise level target with all objects having a simple white material override except for the glass. The estimated rendering time was 1 hour and 40 minutes, which seems normal.

Then I removed the material override and the estimated rendering time increased to 17 hours! So, I concluded that there was a problem coming from the materials, probably the one applied to the walls since it is the most dominant material in the scene.

At this point, I removed the glossiness map of the walls tiles material and the rendering time dropped to 5 hours. To be more realistic, since it was said that a 3% noise level target is excessive, I re-rendered it with a 5% noise level target and the estimated rendering time was now 1 hour and 50 minutes, which looks fine to me.

I then reconnected the glossiness map to verify the consistency of my investigation. Normally, Corona should have again announced a rendering time of 17 hours, but now it announced 2 hours and 15 minutes ... which is not logical. Then I remembered that the initial render (announced with 17h00 rendering time) was done with Corona 10, and since then, I had restored my system with Corona 9 ...

So in conclusion, this scene is ultimately probably not problematic. It just required reducing the noise level target from 5 to 3% to obtain normal rendering times.

However, this seems to highlight a potential problem with Corona 10, which takes abnormally long to render this scene compared to Corona 9. In this regard, I also noticed a very noticeable difference in shadow rendering on an HDR-lit scene between Corona 9 and Corona 10. I will open another dedicated thread for this problem with screenshots when I finish my tests.

And when I reinstall Corona 10, I will re-run calculations on this bathroom scene to see if Corona 10 continues to announce a rendering time of 17 hours.

2023-07-02, 13:36:55
Reply #23

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
This kind of scene is very challenging to sample. This dark room with a single bright spot of sunlight is basically using indirect illumination as key light in your scene. What you can try here if you wish to render to high-res like 6k is bumping GIvsAA to some crazy value like 256 (from the original 16). This way you will put a lot of processing power into GI, and you won't get nice smooth edges, but it doesn't matter that much when rendering in high-res. Even if you get something like 4-8 AA samples (4-8 Corona passes), the image should look good in terms of AA in such resolution.

Thanks for the advice @maru.
I'm doing a test render currently with 5% noise level target, 6K wide, it's rendering since 1hour+ and Time Remaining is still showing ??:??:?? so I'm not too sure what time it will take to complete.

It rendered 5 passes so far.

Rays/sample is around 410.

... it's now rendering since 1h30 and estimated left time to render is 1h20 so it would be 2h50 to complete the render which is as fast as GI/AA set to 16 .

2023-07-02, 19:42:37
Reply #24

James Vella

  • Active Users
  • **
  • Posts: 571
    • View Profile
What if you just remove the wall behind the camera? Alternatively where the door would be just leave it open?
I didn't try that. It would probably make the render faster indeed, but it would also make the image look more flat because of light coming from behind the camera.

I do this for rooms like this, doesn't look flat at all. If the direct light is coming from the side then you only get more bounced light. I mean try it and see for yourself maybe in this case you could be right.

2023-07-03, 08:39:16
Reply #25

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
Thanks James, I will try placing the light on the side instead of behind the camera.

2023-07-03, 09:02:21
Reply #26

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
I installed Corona 10 and started a rendering without changing anything to the scene.
The announced rendering time is 2.6 x longer than with Corona 9: 16 hours and 30 minutes instead of 6 hours and 15 minutes. So it looks like there's an issue with Corona 10 rather than with the scene itself.

Additionally, I noticed that strangely only 60% of the CPU cores were utilized when rendering with Corona 10.

On another scene I also noticed a strong discrepancy in the render itself between Corona 9 and Corona 10: I opened a dedicated thread for this https://forum.corona-renderer.com/index.php?topic=40393.msg214436#msg214436

2023-07-03, 09:55:18
Reply #27

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8892
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Noise percentage calculation can change significantly from version to version, therefore noise level target is not a good way to compare speed of different Corona versions. Much better way is to render the images for set time and then visually compare them side by side. Alternatively you can set pass limit and see which version will render them faster.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-07-03, 10:20:19
Reply #28

Tom

  • Active Users
  • **
  • Posts: 257
    • View Profile
    • www
Noise percentage calculation can change significantly from version to version, therefore noise level target is not a good way to compare speed of different Corona versions. Much better way is to render the images for set time and then visually compare them side by side. Alternatively you can set pass limit and see which version will render them faster.

Thanks, I didn't think of that. I'm not sure I will have an opportunity to roll back to Corona 9 and do the test like you say, but if I do I'll update this thread.