Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => Topic started by: cgrobo on 2023-08-30, 11:25:21

Title: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 11:25:21
I have been having issues with noticable CPU/thread performance drop which seems to be caused by Corona Triplanar Map. I am attaching a graph from HWiNFO. When using corona bitmap without any triplanar maps core usage is up to 100% as expected. When using one triplanar map core usage drops to about 75%. When mixing two or more triplanar maps core usage drops to as low as 55%.

Also attaching graphs from task manager with and without triplanar map.

This issue can only be replicated on more complex geometry, I used a faucet for this test. A simple box won't show this issue. What is even more bizzare is that it happens only when an object is isolated or all the other layers are hidden.

Running on 3ds max 2024, latest Corona daily and 7950x.

Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Juraj on 2023-08-30, 12:23:01
Hmm, concerning, will test myself, as I use Triplanar in like 70perc. of ALL my materials :- ) But my render times are also eternal, so I almost never notice this easily.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 13:12:54
If you decide to test it, make sure the object is isolated (isolate selection). The drop doesn't seem to occur when rendering a full scene, but who knows if it still affects rendering times.

I usually set up the scene first, then start working on materials. But I started noticing slow performance when working on objects, then all of sudden my fans went real quiet....Turns out I mixed too many triplanar maps.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 13:38:07
So it seems like the culprit of the drop is caused by blending in triplanar map. Setting the blending amount to 0 results in no drop in performance. Attaching images.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-08-30, 14:31:38
Hi, we have received at least one similar report about Triplanar and performance issues and we are investigating with high priority.
If you can share any scene where you are able to reproduce the issue, please do. It can be here or over at our support portal.

cgrobo - support ticket #150018

(Internal ID=1154542295)
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 15:04:12
Hello maru, I think you can easily reproduce this. Create a teapot, add 2+ turbosmooth iterations. It has to be complex geometry. A simple box object won't produce this issue.

Apply a material with gloss 0.8, ior 999, anisotropy 0.4, and c triplanar + c bitmap with some imperfection map plugged into aniosotropic rotation. It's just a simple metal shader. For lighting I'm using studio HDRI from hdri haven.

With Blending set to 1 in triplanar map, there is a significant drop in thread performance. In my case core usage goes down to 65%. With blending set to 0 there is no drop. With 0.5 there is some drop. So it seems like that the perfromance drop is directly correlated with the blending amount.

Let me know how it goes.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-08-30, 15:08:07
Thanks, I will try that and let you know about the results!
The reason why we are always asking for scenes is that usually this is the easiest way of reproducing an issue. When creating a scene from scratch, it may happen that we don't enable that one specific option which is causing the issue.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 15:21:10
I understand. I suggest monitoring Core usage in HWINFO to check performance. As I understand, it is not the same as Core utility and is probably more accurate?
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-08-30, 15:50:46
I was able to reproduce the issue with the simple teapot scene. Here are my results (12-core Ryzen 3900X):

Blend set to 0
7 255 000 rays/s
CPU usage stays at around ~90%, there is some fluctuation visible, probably related to bucket rendering. 

Blend set to 0.5
5 269 000 rays/s
CPU usage stays at around ~90% again, there are deeper grooves in the graph.

Blend set to 1
3 415 000 rays/s
CPU usage hardly ever gets to 90%.

This is now reported for the dev team to investigate.

(Internal ID=1193978200)
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-08-30, 17:31:23
Cool Maru, I'm glad you were able to reproduce it.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Tom on 2023-09-03, 10:11:49
Hi,

I also have the same issue happening. Interestingly, it happens even when the object is not isolated.

I started this thread: https://forum.corona-renderer.com/index.php?topic=40872
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-09-04, 09:40:10
Hi,

I also have the same issue happening. Interestingly, it happens even when the object is not isolated.

I started this thread: https://forum.corona-renderer.com/index.php?topic=40872

Until the devs fix this, try setting blending to 0 in corona triplanar.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Tom on 2023-09-04, 09:56:30

Until the devs fix this, try setting blending to 0 in corona triplanar.
[/quote]

For now I simply got rid of the triplanar map as it was almost not involved in the final look of my shader, but I will keep your recommendation in mind next time I use it. Thanks.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: rowmanns on 2023-09-11, 11:32:10
Hi,

We should have a fix for this coming to the daily builds soon :)

We'll let you know when it is out.

Thanks,

Rowan
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: clemens_at on 2023-09-11, 12:17:47
can we also get a hotfix for corona 10?
I'm still on 9 because of this.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: pokoy on 2023-09-11, 12:40:38
Same here - won't switch until v10 is good to go without headaches.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: TomG on 2023-09-11, 13:40:11
We'll have to wait til we know we have a working fix before we decide on hotfix or not :) Once it's out, tested, proven to work and cause no problems, we'll then be in a position to decide what to do with it.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: hrvojezg00 on 2023-09-13, 14:16:44
We are also having a lot of rendering speed problems with  10.1. Will files be affected in any way if we revert to 9.3?
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: TomG on 2023-09-13, 15:23:08
We are also having a lot of rendering speed problems with  10.1. Will files be affected in any way if we revert to 9.3?

Depends on what was used in the scene, if it is anything new in Corona 10, then reverting will not give the same results. For our information while we investigate possible performance issues, what is the hardware configuration of the machine(s) experiencing problems? Also, is the Triplanar map used a lot in those scenes that are having issues? Thanks!
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: hrvojezg00 on 2023-09-13, 16:03:19
Reverted to 9.3, everything works normally. Render nodes are all single and dual 7742 epycs, performance dropped to roughly 25%. Scenes have triplanar maps, all are cleaned with sini forensic so no errors.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: TomG on 2023-09-13, 16:26:05
TY for the info!
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Tom on 2023-09-18, 13:23:11
Hi,

I also have the same issue happening. Interestingly, it happens even when the object is not isolated.

I started this thread: https://forum.corona-renderer.com/index.php?topic=40872

Until the devs fix this, try setting blending to 0 in corona triplanar.

I currently work on a simple with a single Triplanar map with Blending Amount set to 0.0 but the rendering uses only 60% cpu power.
The only fix I found to have 100% cpu usage is to totally getting rid of the Triplanar map.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: cgrobo on 2023-09-18, 13:50:44
Hi,

I also have the same issue happening. Interestingly, it happens even when the object is not isolated.

I started this thread: https://forum.corona-renderer.com/index.php?topic=40872

Until the devs fix this, try setting blending to 0 in corona triplanar.

I currently work on a simple with a single Triplanar map with Blending Amount set to 0.0 but the rendering uses only 60% cpu power.
The only fix I found to have 100% cpu usage is to totally getting rid of the Triplanar map.

I noticed the same thing the other day.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Majeranek on 2023-09-18, 17:07:44
The same problem here.
I have very simple scene where wall material has CoronaTriplanar. If it's on then I have ~60% of cpu usage. When off then it's 100%. Blending value doesn't change anything. I tried 0,0 and 0,5.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: rowmanns on 2023-09-19, 10:38:47
The same problem here.
I have very simple scene where wall material has CoronaTriplanar. If it's on then I have ~60% of cpu usage. When off then it's 100%. Blending value doesn't change anything. I tried 0,0 and 0,5.
Are you able to send over a scene? Instructions on how to do this can be found in my signature.

Cheers,

Rowan
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-09-22, 14:13:31
It's been a while but we have just released a new daily build of Corona 11 with a fix for Triplanar map performance issues. You can find it here:
https://forum.corona-renderer.com/index.php?topic=40442.msg217142#msg217142
 
Please test it and share your results with us.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: Majeranek on 2023-09-25, 10:31:54
Now it works like a charm :)
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-09-25, 10:34:40
That's great to hear, thank you! If you notice anything unexpected, please do let us know.
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: brr on 2023-09-25, 10:53:38
Hello corona team,

I want to ask the same question as @alexyork did in my thread about chaos scatter:

Would the devs consider pretty clear bug fixes like this as something you can roll out into a Corona 10 hotfix? New features and tools certainly make total sense pushing into dailies, but if something's found to be a bug and doesn't conflict/require anything new from a daily/new core then it would be a huge benefit bringing it to the current version of Corona instead of having to push into dailies/full new version (which takes time to be released, tested, HF released etc.). It'll be a looong time before we're moving to Corona 11 final + HF, presumably, since C10's only just been released.

would it possible ?

Best regards
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: hrvojezg00 on 2023-09-25, 13:31:05
It's been a while but we have just released a new daily build of Corona 11 with a fix for Triplanar map performance issues. You can find it here:
https://forum.corona-renderer.com/index.php?topic=40442.msg217142#msg217142
 
Please test it and share your results with us.

Will there be a hotfix for C10 with this applied?
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: maru on 2023-09-25, 15:26:28
Yes, we are planning to release a hotfix (for Max and C4D).
Title: Re: CPU/thread performance drop with Corona Triplanar
Post by: alexyork on 2023-09-26, 12:10:20
Yes, we are planning to release a hotfix (for Max and C4D).

Awesome news. Thanks guys!