Author Topic: Scene optimizing  (Read 14811 times)

2017-11-27, 09:40:03

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Hi guys, this is my first post on my first project with Corona after many years of V-Ray.
As per topic title, I'm struggling to get some decent render times with Corona 1.7. I attached a screen grab of an actual render from my scene in 6k.
I watched the newbie video of the mistakes to avoid when switching to Corona. So:

- White objects with an albedo of 200 maximum
- Portals capping perfectly every holes in the scene
- Corona Sun + Sky
- Default Settings
- There's Corona displacement on the bricks behind the render and on 3 towels
- Forest Pack green wall, as you can see from the picture, which is likely to slow down the render obviously
- All the bitmaps converted to Corona bitmaps
- All the normals imported with the correct gamma
- The glass shader used for the windows is standard, with no caustic ticked on
- I'm using the 3ds max built in camera, with photographic exposure and in-camera DOF

As you an see from the screenshot, after 9 hours of render on a machine with 88 threads, the noise amount was still 9%.
I think there's definitely something wrong. If it could help, I am able to send the scene over for testing.
Thanks.

2017-11-27, 10:46:43
Reply #1

Philip kelly

  • Active Users
  • **
  • Posts: 513
    • View Profile
    • Sketchrender
I know the feeling.

Can I ask have you rendered the scene with out the vegetation, and see what the outcome is?

Dell Precision T7910

2017-11-27, 10:55:17
Reply #2

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
No, not yet. I was planning to do it tonight, as now I need the machine to work.

2017-11-27, 10:59:22
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12784
  • Marcin
    • View Profile
Something is definitely wrong. This is a relatively simple scene, so should render faster.

Some ideas:
-the glowing objects to the left, over the window, and the yellow lamps - how are they made? Maybe you are incorrectly using light/light mtl/self illumination? Check out https://coronarenderer.freshdesk.com/support/solutions/articles/5000515603
-the glass on the lamps - are you sure caustics are off? can you switch to thin glass mode?
-the window glass - can you switch to thin glass mode?
-portal - can you check if it does not render faster without it? maybe the portal is intersecting with something, like the window glass?
-materials - try simplifying them, make sure the plants are not using refraction at all, but translucency
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-11-27, 11:44:27
Reply #4

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Thanks for your reply Maru. So:

- You can check from the screenshots how the lamp bulbs are made. The left grey shape is the outside thin object, the right one is the inside thin object. I guess I can remove the inner shape and set the materials to thin? Then they have a corona light material applied to the geometry that it's supposed to cast light.
- caustics are off from the glass material as you can see from the screenshot.
- Yes I guess so.
- didn't try without. You can check from the screenshots how I set this up. From the close up you can see that I have that chamfer detail on the concrete before the portals, which I don;t know if it's creating any issue. Also, should I put portals on all the openings or just on one?
- There's no refractions at all on the plant, just translucency. All the materials are using the PBR mode, with no reflection map in the reflection slot. Only exception for the leaves, that have PBR mode on, but a reflection map as well.

2017-11-27, 16:23:16
Reply #5

James Vella

  • Active Users
  • **
  • Posts: 549
    • View Profile
check 2 addional things on your plants should speed up quite alot

- bitmap blur is 1.0 not 0.1
- opacity maps are on "Clip" and no filtering in the bitmap option


2017-11-27, 16:35:17
Reply #6

agentdark45

  • Active Users
  • **
  • Posts: 577
    • View Profile
2 things I've spotted:

1. You are using a complex light filament object as a main light source. I would make this object a self illuminating material and add a fake hidden corona light to give off the majority of the light from the bulb.
2. The light material is travelling through a thick glass bulb. Perhaps try adding a rayswitch material on the glass bulb material with an no material in the GI slot.
Vray who?

2017-11-27, 17:06:42
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12784
  • Marcin
    • View Profile
Most probably that glowing light filament is the issue. Give it a self illuminated material or a light mtl with "emit light" off, and add a simple fake light as agentdark advised.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-11-27, 17:38:14
Reply #8

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Ok, thanks guys.
I'll try all the suggested advices in a bit. Should I add the fake Corona light inside the bulb or outside?

2017-11-27, 17:58:48
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12784
  • Marcin
    • View Profile
Outside will be definitely safer. :)

For a start you can place some super simple spherical corona lights just below the light bulbs and see if there is a difference.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-11-27, 21:17:04
Reply #10

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Ok, quick test done.
I changed the bulb glass to a thin mesh with a glass material with the thin option ticked on.
Estimated time dropped from 40 hours to 21.
Then I tried again with all the artificial lights hidden, but it didn't change anything.
So it's either the vegetation or the portals.
As I asked before, do you guys usually use portals just on one opening or on all of them?
Another thing that popped in my mind is that I have a glass with glossy refraction behind the camera, set up like you can see in the screenshot.
Can that be one of the problems?

@James Vella - with no filtering in the opacity map, you mean blur to 0.01 for the opacity maps?
« Last Edit: 2017-11-27, 21:33:52 by Hadi »

2017-11-27, 22:11:30
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Filtering of opacity maps is disabled globally by default. If you didn't mess with dev/debug settings, you can worry not about it. Usually it is a good idea to clip opacity maps in the material, just don't expect huge speedup if your opacity maps are made decently. As for texture filtering bluring, that shouldn't have measurable effect in Corona 1.x and higher. And it won't have any effect on opacity maps anyway, since filtering for those maps are disabled.

AFAIK, portals should be added to all major openings or not to be added at all.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-11-27, 22:44:31
Reply #12

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Ok, so after few tests we are now sure that the problem is with the green wall.
Without it a get an estimated time of 2 hours 40 minutes for a 6k which is ok. Adding the clip options on the opacity maps definitely helped, but I still get too high render times.
I posted 2 screenshot of the foliage shaders, nothing fancy, but if someone could help me to spot any error within could be great.
I showed how I set up all the opacity maps as well, linking them to a forest edge node that allows me to use the edge mode within forest object to have a clean cut of the edges.

2017-11-27, 23:30:07
Reply #13

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. I would definitely make a test with the forest edge mode turned OFF. I believe I read somewhere that this could slow things down considerably. But can't find it ATM and not sure if it's still so. But anyway... I would make a test without it, to see if this is the "killer" or not.

2017-11-28, 08:33:50
Reply #14

James Vella

  • Active Users
  • **
  • Posts: 549
    • View Profile
Filtering of opacity maps is disabled globally by default...

thanks for clarifying the filtering, I remember reading this but glad to hear it verified.

...@James Vella - with no filtering in the opacity map, you mean blur to 0.01 for the opacity maps?

Change this to 1.0 on all the maps for the vegetation if they have been changed - usually the diffuse map is the killer one for this.

Bitmap 0.1 filtering blur is great for things like floorboards where you want to see the texture on grazing angles perfectly, however on leaf maps its generally a bit over kill unless its a hero tree right next to the camera.

2017-11-28, 11:27:11
Reply #15

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
@James Vella, you keep telling that filtering bluring is significantly affecting performance. Do you have evidence for that? I didn't do any tests on that recently, but i know, that back in the Alpha days it was very true and i know that this was fixed long time ago. Curious to know if that problem has surfaced again. Should be reported as a bug if so.

Bitmap 0.1 filtering blur is great for things like floorboards where you want to see the texture on grazing angles perfectly, however on leaf maps its generally a bit over kill unless its a hero tree right next to the camera.

AFAIK, filter bluring has little to do with grazing angle, instead it controls how much texture will be filtered (blurred) depending on its relative size in the view, so for something as small as leaves, it might make sense to keep bluring on the lower side.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-11-28, 11:43:36
Reply #16

James Vella

  • Active Users
  • **
  • Posts: 549
    • View Profile
@James Vella, you keep telling that filtering bluring is significantly affecting performance

Yes, it has a major affect on speed - Ive been doing this with vegetation textures for quite some time to speed up the render time (quite a lot in in some scenes). You can test for yourself when you get time. I am not referring to the Filtering method on opacity maps as this was clarified by you earlier which I have acknowledged and thanked you for.

AFAIK, filter bluring has little to do with grazing angle, instead it controls how much texture will be filtered (blurred) depending on its relative size in the view, so for something as small as leaves, it might make sense to keep bluring on the lower side.

I have no doubts you are correct. I use this specifically for sharpening textures when I need to - especially those close to camera.
« Last Edit: 2017-11-28, 11:51:26 by James Vella »

2017-11-28, 12:03:46
Reply #17

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
@James Vella, you keep telling that filtering bluring is significantly affecting performance

Yes, it has a major affect on speed - Ive been doing this with vegetation textures for quite some time to speed up the render time (quite a lot in in some scenes). You can test for yourself when you get time. I am not referring to the Filtering method on opacity maps as this was clarified by you earlier which I have acknowledged and thanked you for.

Ok, i'll try to test this out when i'll have free time. Thanks for letting to know about the isue!
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-11-28, 12:21:43
Reply #18

James Vella

  • Active Users
  • **
  • Posts: 549
    • View Profile
I had a spare 20 minutes so I thought id share.

Model I made of a plant recently with Blur of 1.0:


Nothing changed except Blur to 0.1:


Time saved 5 seconds per plant, I was expecting a little more. Im guessing on average if you had 100 plants on that wall your only saving yourself 8minutes or so. Probably not enough to warrant changing workflows over - which is a relief to be honest, less buttons to click :) You may be correct in saying this has been addressed in some way, I would be curious to see the result over the wall of plants. I would also suspect the Alpha Clipping to help dramatically as this shaved time off this Plant render as well - cant remember how much but I tested this while making it to ensure speed.
 

2017-11-28, 12:52:04
Reply #19

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Quote
Another thing that popped in my mind is that I have a glass with glossy refraction behind the camera, set up like you can see in the screenshot.
Can that be one of the problems?
On my opinion yes, because of the volumetric scattering.

2017-11-28, 19:57:56
Reply #20

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Hi. I would definitely make a test with the forest edge mode turned OFF. I believe I read somewhere that this could slow things down considerably. But can't find it ATM and not sure if it's still so. But anyway... I would make a test without it, to see if this is the "killer" or not.

Nice one! Removing it killed the render times in half. I still get an estimate of 8 hours which is 5 hours more than the same render without the green wall.
Any other suggestion on how to speed it up?

2017-11-28, 20:15:08
Reply #21

iancamarillo

  • Active Users
  • **
  • Posts: 281
    • View Profile
whats the estimate when the greenwall is material override to basic corona material (geometry only). then diffuse only, then opacity, etc?

2017-11-28, 20:55:55
Reply #22

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Disabling the opacity maps bring it down to 6 hours and 40 minutes. If I just leave the diffuse, removing the translucency map, I get half an hour more, 7 hours, which is crazy.

2017-11-28, 21:52:28
Reply #23

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
real approximate time will be showed after 5 passes then adaptivity will calculated, so it can reduced much

2017-11-28, 22:02:44
Reply #24

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
That's the time taken after 5 passes, and it was keep increasing and increasing.

2017-11-29, 02:31:13
Reply #25

arqrenderz

  • Active Users
  • **
  • Posts: 1000
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
Check your greenery materials, some will have refraction turned on, always avoid such material setups!

2017-11-29, 09:30:05
Reply #26

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
There's no refraction, already shown in the screenshots.
It's definitely frustrating, I'm gonna try with other models with no opacity tonight.

2017-12-01, 23:18:04
Reply #27

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
So I've been able to set up another green wall, with new models and shaders completely redone by me from scratches, without using any opacity map and without the Forest Edge mode.
They all have a front/back corona map in the diffuse, front/back corona map in the glossiness and a bump map. PBR mode on, no reflection map and thin (no refraction) tick on for all the leaves.
I was quite ok with the estimated time after 5 passes, which was 5 hours and a half, but as you can see from the screen-shot, it went up quite quickly to almost 9 hours for a target of 3% noise., and it was still going up.
How could it be that the estimated time get almost doubled after 20 minutes?
And, in any case, is it possible that all the time that I will have to deal with vegetation with Corona, I'm gonna end up with such big render times?

2017-12-02, 00:08:45
Reply #28

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. I'm a bit confused about your material description. As Maru said in an ealier post, you should not use refraction, but use translucency instead. But still you talk about refraction set to "thin". So are your refraction level value set to 0 as well, or are you still using refraction instead of translucency?

2017-12-02, 08:29:35
Reply #29

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Hey Proh, sorry for being unclear. All the materials have refraction set to 0. I was just pointing out that I ticked thin refraction just in case, not knowing if it would have made a difference even if the refractions are set to 0

2017-12-02, 09:51:09
Reply #30

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
What render limit you're using to estimate rendering time? Is it noise level? Maybe it's set too low? I would suggest to do small region render tests in most problematic places to see what noise level is acceptable for you. Also do you consider to use denoising? It could significantly reduce render time at the cost of barely noticeable quality loss.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-12-02, 10:14:05
Reply #31

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Hi Romullus.
I set it up to 3%. Is it too low? What would you recommend?
Never experienced with denoise, but I assume that in this case I won't have any other option. Since I'm working with vegetation quite often, it's still frustrating to see how much render times goes up whenever vegetation is used.

2017-12-02, 10:24:17
Reply #32

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There's no universal noise limit. It can vary from scene to scene and from user to user. Also in Corona 1.7 noise level can be set to slightly higher values due to changes in sampling alghoritm. Since your scene doesn't have smooth featurless surfaces, i'd try 4-5% without denoising and 7-8% with it. Also you may want to increase GIvsAA to 32 or so, since you don't need so much antialiasing samples here.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-12-02, 10:57:29
Reply #33

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Also you may want to increase GIvsAA to 32 or so, since you don't need so much antialiasing samples here.

Even If I have in-camera DOF?

EDIT: I tried it on a small 800px test and it doubled render times.
EDIT 2: Sorry for the multiple edits, but I tested with GIvsAA set to 8 and it cut the render times in a half! Is it because I'm using DOF and vegetation probably needs more AA?
« Last Edit: 2017-12-02, 11:10:16 by Hadi »

2017-12-02, 11:13:31
Reply #34

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8873
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Noise level isn't ultimate tool to tell you how clean your image will be. Even if noise level will tell you otherwise, you may still find image rendered with increased GIvsAA cleaner than rendered with default settings in the same amount of time. Humans perceive noise differently than machine code does. I'm not saying that higher GIvsAA will definitelly gives better render time for the same quality in your scene, it may be the other way round, but DOF in that shot isn't sshallow enough and usually noise in out of focus area isn't perceived as much as in focused area. By human brain that is.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-12-02, 11:25:29
Reply #35

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
I know what you mean, I definitely had to test it though.
Setting it GI vs AA to 4, decreased render times drastically, more than a half.
I'll test it in small regions and post the results.

2017-12-02, 12:01:32
Reply #36

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
So I test it with Gi vs AA set to 4 (left) and to 8 (right).
I let them render 100 passes and the left one has way more noise, but it render 30% faster.
So what do you advice? Render it with a value of 8 or go back to 16? 32 was slowing it down too much unfortunately.
Also, as you mentioned before, Corona estimated the left image and the right image in the screenshot having the same amount of noise?

2017-12-04, 09:43:42
Reply #37

Hadi

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • Behance
Romullus, I tried as you suggested with a noise limit of 7% and denoise of 0.4 and I'm quite amazed with the result achieved in not even 2 hours for a 6k.
That's definitely the way I will work for this set. Thanks for your help.