Author Topic: Tracking down the cause of a slowdown  (Read 854 times)

2023-05-04, 16:34:51

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
Hi all,

I have a huge scene im working on and after merging an object from another file, rendering has slowed to a crawl with five minute parsing times 5 minute UHD cache times and rays/s under 200k.
I cant figure out what is causing the issue as the object im merging in, is fine when rendering in its original file and has no immediately obvious issues.

I was wondering if anyone had any tips and tricks they use for tracking down the causes of slow renders whether it be rogue objects or complex shaders.
If any of the devs have tips on what they do when assesing out scenes that would be really useful to know too!

2023-05-04, 16:55:48
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
In general, hide half the objects and render. Still slow? Hide half again and repeat. If faster on the first halving, switch which half is hidden and continue as before. This should identify objects or materials, and once you pin it down, you can investigate why.

You could use material overrides too, usually worth enabling that globally and see if magically everything gets faster as then you're most likely looking for a problem material. You can still likely track it down with the steps above (probably easier than using exclusions to the material override).
Tom Grimes | chaos-corona.com
Product Manager | contact us

2023-05-04, 17:15:47
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Exactly what Tom said, or start a new empty scene, then start merging your objects one by one (or first half, then half of the remaining objects, and so on until the slowdown appears).

But since you mentioned the slowdown appears after merging a single object ("after merging an object from another file, rendering has slowed to a crawl") - then I guess that object is the culprit and the remaining part of the investigation is to figure out why it's slowing down.
Is that object related to some 3rd party plugin?
Is it using a complex material and/or a material using 3rd party plugins?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-05-04, 17:25:23
Reply #3

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
Exactly what Tom said, or start a new empty scene, then start merging your objects one by one (or first half, then half of the remaining objects, and so on until the slowdown appears).

But since you mentioned the slowdown appears after merging a single object ("after merging an object from another file, rendering has slowed to a crawl") - then I guess that object is the culprit and the remaining part of the investigation is to figure out why it's slowing down.
Is that object related to some 3rd party plugin?
Is it using a complex material and/or a material using 3rd party plugins?

It could be a bit of column A and a bit of column B.
It has a railclone object in it thats gernerating lots of lights. However, the same number of lights when created manually doesnt cause the slowdown it would seem.
So i think it could be railclone, lights and material complexity coming together into a perfect storm.

I think ill put ijn some hours this evening and strip back the file.

One thing i have noticed though is that even when i hide the imported objects, the slow rendertime stays there.
If i dont import it, the scene renders fine.

2023-05-04, 17:27:47
Reply #4

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
In general, hide half the objects and render. Still slow? Hide half again and repeat. If faster on the first halving, switch which half is hidden and continue as before. This should identify objects or materials, and once you pin it down, you can investigate why.

You could use material overrides too, usually worth enabling that globally and see if magically everything gets faster as then you're most likely looking for a problem material. You can still likely track it down with the steps above (probably easier than using exclusions to the material override).

Material override isnt something ive considered before so thats a good one to try early on thanks Tom.

2023-05-04, 17:29:27
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
You can also try this as a troubleshooting step: https://support.chaos.com/hc/en-us/articles/13940160485009
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-05-04, 23:30:55
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
One thing i have noticed though is that even when i hide the imported objects, the slow rendertime stays there.
If i dont import it, the scene renders fine.

What if you delete those objects instead of hiding them, does it affect render time in any way?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-05-05, 00:07:36
Reply #7

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
One thing i have noticed though is that even when i hide the imported objects, the slow rendertime stays there.
If i dont import it, the scene renders fine.

What if you delete those objects instead of hiding them, does it affect render time in any way?

As i track down the cause, i will test this out.
The railclone tip above helped with the parsing but my UHD Cache is still multiple minutes long so ive got some digging to do.

2023-05-05, 07:08:25
Reply #8

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 476
    • View Profile
Just a tip:

If you can use one of the Sini tools called Sini Forensic, it can help you scan your scene and provide you with an overview of problematic issues present in your scene.

https://sinisoftware.com/Plugins/Forensic
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2023-05-05, 10:39:17
Reply #9

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 543
    • View Profile
A known thing for slowdowns are some of the effects (e.g. Fire effect) in Environment and Effect menu.
Have a quick look and see if there are any "unexpected" effects, and delete them.
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2023-05-05, 11:01:46
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
A known thing for slowdowns are some of the effects (e.g. Fire effect) in Environment and Effect menu.
Have a quick look and see if there are any "unexpected" effects, and delete them.

An idea - could Corona check for the presence of such effects and give a warning to the user, like it does for bitmap paging, FTH and other potential causes of slowdown?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-05-05, 11:06:03
Reply #11

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
Just a tip:

If you can use one of the Sini tools called Sini Forensic, it can help you scan your scene and provide you with an overview of problematic issues present in your scene.

https://sinisoftware.com/Plugins/Forensic

Yeah thats my first step every time and the file isnt showing anything problematic.

Is there any way to set up any of the corona passes to highlight complex materials?
Would be super useful to be able to do like a false-colour pass to identify shaders causing slowdowns.
« Last Edit: 2023-05-05, 11:35:37 by Jpjapers »

2023-05-11, 14:34:24
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Is there any way to set up any of the corona passes to highlight complex materials?
Would be super useful to be able to do like a false-colour pass to identify shaders causing slowdowns.

There is!

You can use the CInfo_TimePerSample element for this - https://docs.chaos.com/display/CRMAX/Render+Elements#RenderElements-CInfo

Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-05-15, 22:15:32
Reply #13

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile
Is there any way to set up any of the corona passes to highlight complex materials?
Would be super useful to be able to do like a false-colour pass to identify shaders causing slowdowns.

There is!

You can use the CInfo_TimePerSample element for this - https://docs.chaos.com/display/CRMAX/Render+Elements#RenderElements-CInfo

Ah fantastic, for some reason i assumed that was a render stamp type pass.