Author Topic: Rendering Trees Efficiently  (Read 3908 times)

2019-04-30, 16:41:19

hughannes

  • Active Users
  • **
  • Posts: 30
    • View Profile
Quick question:
I noticed rendering a lot of trees in fore- and middle ground is quite slow.
Are other people experiencing the same? Why is that? If so, what are some of your tricks to speed up rendering?

Thanks in advance!

2019-05-01, 14:59:29
Reply #1

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1251
    • View Profile
    • My personal website
There is an issue with Corona or C4D (not sure which, probably depends on how you look at it) and how alpha maps work. Try rendering a scene with alpha maps and then off and you'll see your render times quadruple (literally).

It goes without saying, 3ds Max doesn't have this issue.

Personally, if I may be totally honest, whenever there is a lot of foliage or alpha maps involved I rent 3ds Max for a month. The performance difference when rendering with alphas and without is like going from a quad core cpu to a 2990wx. It is unfortunately not ready for exterior production. That is my honest opinion, wrong or right :)

Here is an example:
https://www.dropbox.com/s/zsu5vfba5s21f0w/Alpha%20Maps.flv?dl=0
(The last 5 minutes are probably the most telling :) )
« Last Edit: 2019-05-01, 15:03:21 by nkilar »
Nejc Kilar | chaos-corona.com
Educational Content Creator | contact us

2019-05-01, 16:46:54
Reply #2

hughannes

  • Active Users
  • **
  • Posts: 30
    • View Profile
Very interesting. Thank you nkilar for that.
At least now I know what to look for.

2019-05-01, 16:56:33
Reply #3

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1251
    • View Profile
    • My personal website
Actually, Cinemike just suggested to me that maybe there are performance gains to gain if you use the Corona Bitmap to load in your alpha. Maybe it would be good to check that out.
Nejc Kilar | chaos-corona.com
Educational Content Creator | contact us

2019-05-01, 17:21:15
Reply #4

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5468
    • View Profile
And for pure on/off bitmaps (such as leafs), don't forget to enable Clip in the Opacity section of the CoronaMtl.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2019-05-01, 22:10:35
Reply #5

hughannes

  • Active Users
  • **
  • Posts: 30
    • View Profile
Thanks for the suggestions guys. Will investigate.

2019-05-02, 09:30:28
Reply #6

DBK

  • Active Users
  • **
  • Posts: 7
    • View Profile
    • 3drender.jonathansabbadini.com
There is an issue with Corona or C4D (not sure which, probably depends on how you look at it) and how alpha maps work. Try rendering a scene with alpha maps and then off and you'll see your render times quadruple (literally).

Oh wow, I opened a ticket about this issue a month ago and I'm still waiting for answers. At least I can stop worrying that something is wrong with my machine.

I will try the suggestions posted here. This thing is driving me nuts.

Thanks :)

Edit: Enabling Clip in the Opacity section of the CoronaMtl and/or put the alpha map in a Corona Bitmap changed nothing for me (using the file that I prepared when I submitted the ticket).
« Last Edit: 2019-05-02, 10:08:37 by DBK »

2019-05-02, 10:12:08
Reply #7

katzenwaffe

  • Active Users
  • **
  • Posts: 42
    • View Profile
    • Katzenwaffe.se
Using CoronaBitmap increases rendertimes in all my tests - so I never use it. My thought was it would make things faster - but nope. And the UV-tiling parameters does not work either, so pretty useless.

What DOES impact rendertimes is if I have scenes with heavy foilage (leaves, trees, grass) using alpha opacity maps - is that i make sure checking "Clip". More than halfed render times.

Also, using "None" in native c4d-filtering in Bitmap seems to gain speed.

2019-05-02, 14:01:45
Reply #8

DBK

  • Active Users
  • **
  • Posts: 7
    • View Profile
    • 3drender.jonathansabbadini.com
What DOES impact rendertimes is if I have scenes with heavy foilage (leaves, trees, grass) using alpha opacity maps - is that i make sure checking "Clip". More than halfed render times.
Also, using "None" in native c4d-filtering in Bitmap seems to gain speed.
Thank you Katzenwaffe! Using "None" in filtering and checking "Clip" does help.
I tried your suggestions in one of my latest scenes that have a lot of foliage and it helped mitigate the issue.
In the file I've submitted for the ticket (a much simpler scene) I tried to use the Clip suggestion but without Using "None" in filtering and there was no improvement. Maybe the scene is too simple.
Anyway I really hope that the team can solve this issue.

2019-05-02, 14:38:36
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I don't know how it's in C4D, but Corona for max has global opacity filtering switch, meaning that by default opacity maps are not filtered. Filtering opacity will be slow in any renderer. I believe that's the nature of raytracing.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-05-06, 13:03:01
Reply #10

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1251
    • View Profile
    • My personal website
Just did a quick test and here are some of my impressions. Please treat these as impressions and not necessarily real proper tests.

Same HDRI rotation, same model, same materials, same VFB settings. The camera angle is slightly off, that is why I'm saying its not a proper test. Still, you'll see that the conclusion is the same regardless.

- Opacity maps noticeably reduce the speed in Corona for C4D.
- Opacity map sampling doesn't make much of a difference.
- Opacity map clipping (filter, clipping) doesn't make much a difference.


- Corona Bitmap does make a difference although the performance disparity between 3ds Max and C4D is quite large. Example scene needed 50 seconds to get to 12 passes in C4D and only 18 seconds in 3ds Max. The difference in ray performance is 10-7 million (3ds Max) versus 2.5-3.5 million (c4d).

Stats:

3ds Max with Opacity maps: 18 seconds (10-7 million rays)
C4D with Opacity maps (+Corona Bitmap): 50 seconds (2.5 - 3.5 million rays)
C4D with Opacity maps (without Corona Bitmap): No idea, takes too long. (Only 800k rays)

3ds Max without Opacity maps: ~11 million rays
C4D without Opacity maps: ~11 million rays

As a note, turning off opacity maps in 3ds Max nets about +1 million more rays cast, in C4D it boosts them up by about +8 million. To keep it simple, there is performance parity between the DCC applications if there are no opacity maps involved. As soon as they are, the C4D implementation hits a major brick wall.

Another funny thing I noticed is that there is visual difference in the VFB contrast / exposure levels even when using the same HDRI. Not sure why but I'm just putting it out there.

edit:
The VFB difference is actually due to 3ds Max's default color picker not being sRGB while in C4D it apparently is. Values match better (although not identical obviously) if one switches to 3ds Max + Corona Color Picker. Just a heads up! :)





« Last Edit: 2019-05-06, 21:16:44 by nkilar »
Nejc Kilar | chaos-corona.com
Educational Content Creator | contact us