Author Topic: Managing with many lights in corona  (Read 26512 times)

2013-12-22, 10:27:11

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
   I'm trying to investigate the truth with huge amount of lights in Corona renderer.

   Testing different scenes with Corona reveals some of strong sides of it along with the weakneses of course. Some of weakneses was our faults, but some of them are not.
In testing of night scenes I was found that increasing the lights amount has downside in increasing the noise amount. It may be normal, but time needed to remove this noise is terrible. In some cases it is few hours and  tens hours and even more (http://forum.corona-renderer.com/index.php/topic,2268.msg16956.html#new). But I found that some people managed huge amount of lights with no problem at all (http://forum.corona-renderer.com/index.php/topic,1487.0.html).

   In this case I started to investigate the problem in very simple scene with plane and 2500 light sources. With no GI at all. At default settings and 50 passes (to have nice DoF if needed) the noise is completely terrible in 11 seconds.
   The next step is increased Light Samples Multiplier from 2 to 100 (max settings). This variant is noisy and waaaay too long to render - 7:00 min (if we keep in mind that it is plane with default material with no details at all). But as I know from real scene rendering if we have LSM that high the HD Cache is waaaay too long to compute.
   Changing PT samples to 800 and LSM back to default (2) lead me to same amount of noise and time to render - 7:07, so nothing changed (except that HD Cache will compute much quicker in render with xxGI).
   Well, does it possible at all to render this simple scene with no noise (even if we close our eyes on render times)? Heh. PT-200 and LSM-100 in 55 minutes... Nearly clean but not as Vray in 11 seconds (scene attached).


   So. The main question is it really possible to render scenes with huge amount of lights in acceptable rendertimes? In huge amount of lights I mean not only Corona lights and dedicated light sources with emission, but even one plane with checker texture that creates huge amount of virtual lights. I ask all to particiate in testing of this scene to fing the truth!
« Last Edit: 2013-12-22, 10:44:53 by fobus »

2013-12-22, 12:22:58
Reply #1

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus

Have you tried to use 2500 source emitter, to see the behavior of light with the noise?

2013-12-22, 13:12:55
Reply #2

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Hmm... I can't get Corona to understood the texture with 2500 light samples. It is simply too much of them and too small each of them on texture to render the light from each other separately. If You could render my scene with setup You describe I'll be appreciated.
« Last Edit: 2013-12-22, 14:08:14 by fobus »

2013-12-22, 14:42:40
Reply #3

Polymax

  • Active Users
  • **
  • Posts: 830
  • CG Generalist
    • View Profile
    • maxkagirov.com
This is not a correct comparison, because completely different sampling algorithms.
Issedovaniya need to spend on complex scenes, for a full understanding.
And I'll say exactly what raytrace in Vray a lot slower than in the corona.

If you put an object in this scene and enable GI with LightCache - Vray will die. Or BF as secondary with 25 bounces ;)

No solutions in Corona for this case (IMHO).

for lighting with small texture use texture resolution (default=0.3). you need set to 1 or more. (but I've tried this method and got the same result like with separate light sources)

Note: Corona not working without GI. Even if you set primary solver to "none"
« Last Edit: 2013-12-22, 14:51:57 by Polymax »
Corona - the best rendering solution!

2013-12-22, 14:49:34
Reply #4

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
This is not a correct comparison

There is no comparison at all. I just want to render clean direct light from many lights in Corona. I found it is impossible at the moment. This scene is made just to find a way to render direct light clean. If You have any tips how to render it clean please give us an idea. VRay here just for understanding what I mean clean and quick.

2013-12-22, 15:02:45
Reply #5

Polymax

  • Active Users
  • **
  • Posts: 830
  • CG Generalist
    • View Profile
    • maxkagirov.com
This is not a correct comparison

There is no comparison at all. I just want to render clean direct light from many lights in Corona. I found it is impossible at the moment. This scene is made just to find a way to render direct light clean. If You have any tips how to render it clean please give us an idea. VRay here just for understanding what I mean clean and quick.

I already answered that, within 1 minute - no solutions. (in this case)
Corona - the best rendering solution!

2013-12-22, 15:12:52
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
If you really want to render with no GI, set "max ray depth" to 1.
update: at least I think so, and it seems it has no impact on render time here :)
update: or maybe it has, I'm confused
« Last Edit: 2013-12-22, 15:47:55 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-12-22, 15:47:19
Reply #7

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
If you really want to render with no GI, set "max ray depth" to 1.
update: at least I think so, and it seems it has no impact on render time here :)

Ok. This image with no GI as Max Ray Depth was set to 1. But it is really no impact on render time in this case. What I need is clean direct light. Not only in this scene. If you check links in my first post you can find out why I really want to find out a way to clean direct light. And not only this scene needs to render quickly. I'm doing night scene with many small lights now and ther is no way to get clean image with corona in accepable render times just because of this NOISY DIRECT LIGHT.

Polymax in test with 165,000 light sources was able to get clean image and I think we're all interested how it was possible.

May be someone can test my scene with many lights and will find any errors in scene setup to point me the problem.


I think that rendering average scene with high amount of lights must be not such big problem with Corona, but I can't get it right. HELP please.

2013-12-22, 16:30:59
Reply #8

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus

I'm trying to understand this your example
work in progress

2013-12-22, 16:39:38
Reply #9

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Hello fobus

I'm trying to understand this your example
work in progress

Thank You for your try. If You want to see real example use this link http://forum.corona-renderer.com/index.php/topic,2250.msg16927.html#msg16927

2013-12-22, 16:56:03
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Here is my try on my i3. Had to modify some stuff because of version difference. This is after 10 minutes. What is your goal time?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-12-22, 17:27:23
Reply #11

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Here is my try on my i3. Had to modify some stuff because of version difference. This is after 10 minutes. What is your goal time?

Goal time? I think it is 11 sec as Vray do. But I think it is impossible to have clean picture in that amount of time. Can You tell us what settings You have changed to archive this result?

2013-12-22, 18:36:50
Reply #12

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus & maru

here my test!

2013-12-22, 19:06:48
Reply #13

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Hello fobus & maru

here my test!

Noise and render times is ok, but I see no 2500 particular lights. Looks like some fluctuated light sources randomly placed in the scene.

2013-12-22, 19:11:12
Reply #14

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Another test

09sec.

2013-12-22, 19:25:37
Reply #15

Stan_But

  • Active Users
  • **
  • Posts: 526
    • View Profile
    • https://www.behance.net/archdizs
And also bad AA setting in vray cannot show all of lights
Same number of lights would be only with maximun AA. For example with DMC 1/4 thresh 0.000. And it would be not 11 sec but 11 min))

2013-12-22, 19:52:41
Reply #16

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Another test

09sec.

Try to match our pictures with all 2500 lights. Every light has to be presented, not just a few of them.

And also bad AA setting in vray cannot show all of lights
Same number of lights would be only with maximun AA. For example with DMC 1/4 thresh 0.000. And it would be not 11 sec but 11 min))

It is no AA comparison/ And it is no comparison at all. I just want to find a way to get clean picture in this year. BTW in Corona pictures not all lights are rendered too.
« Last Edit: 2013-12-22, 19:56:45 by fobus »

2013-12-22, 21:24:11
Reply #17

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus

I could not count them all, but a row is made ​​up of about 60lights x ..!

Test passes 50 | Time 0:01:00

2013-12-22, 21:27:27
Reply #18

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
About my 10 minute render from previous page:

The lights are made with a gradient map applied to the plane (tiling 50x50).

Settings: I changed primary solver to pt (btw, what happens when you have both solvers set to none? It looked different and rendered slower), max ray depth to 1 and played with adaptivity - but it probably had no effect. Maybe there is a time difference between A5 and newer builds?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-12-22, 21:45:19
Reply #19

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello maru

The settings are the way from the file that has attached fobus
Primary solver: none

Corona Alpha5 - I just changed the values ​​you see in the image and UVW Map


2013-12-23, 02:24:20
Reply #20

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Every light has to be presented, not just a few of them

2500 lights are not...TEST in progress!


2013-12-23, 06:41:08
Reply #21

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
To understand this lights problem I was prepareв more reallife scene. It reproduces a kind of evening shot with lots of lights in windows or street lamps. In my scene it's just a boxes with shell and without upper face. In each of 2500 boxes there is a light in a random position. Total 2500 lights as in previous scene. In this case any trick with 1 plane with texture on it is unacceptable and we're really need to use all 2500 lights separately. Of course you can ask me: "Why we need to render all of them at once if we see only few of them?". Ok. We can render only few of them and it will be a lot quicker withour noise, BUT. But we're want to see the light from this "windows" on trees for example, cast shadows from it, see them in reflections of cars and so  on. Again, if we have few shots, then cheating with on and off parts of the lights is super tricky and boring. I don't remind that if we're doing an animation this is not acceptable at all.

So at the picture we're see that our skylight is clean and AA is fine. But our lights are terrible noisy! Max Ray Depth-1 (no GI i think), PT-64, LSM-2, Passes-50.
« Last Edit: 2013-12-23, 07:09:51 by fobus »

2013-12-23, 15:15:18
Reply #22

agentdark45

  • Active Users
  • **
  • Posts: 577
    • View Profile
Definitely interested in seeing the above posts problems resolved as I've faced the same issues.
Vray who?

2013-12-23, 16:29:38
Reply #23

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
What happens if you leave max ray depth at default?

2013-12-23, 20:20:52
Reply #24

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
What happens if you leave max ray depth at default?

Nothing. It has no effect on this problem. No ray depth no GI solvers has no impact with it. It's just first bounce I think. Too low sample density for direct lights at my opinion. My be Ondra can say more. I do not know the tech and math to understood this, but results are not good at the moment.

2013-12-23, 21:21:04
Reply #25

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
I know about this problem, but it is not a "bug" in sense that there was some error made and some easy fix is possible. I will need to improve the sampling algoritms instead, and that will take some time.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-12-23, 21:45:01
Reply #26

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus

The rendering time of the image of vray?
In what amounts?

..minutes or seconds?

2013-12-23, 22:50:17
Reply #27

agentdark45

  • Active Users
  • **
  • Posts: 577
    • View Profile
I know about this problem, but it is not a "bug" in sense that there was some error made and some easy fix is possible. I will need to improve the sampling algoritms instead, and that will take some time.

Any tips for rendering a scene like this before a fix is available? What about using the corona light material?
Vray who?

2013-12-24, 00:28:26
Reply #28

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
light mtl and separate lights work the same. 3dsmax standard lights in the daily builds should work differently, you can try that.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-12-24, 01:13:17
Reply #29

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
HugeLightsTest_2-Sky_max_2011

Test in progress..!


2013-12-24, 02:21:48
Reply #30

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
test emission plane


2013-12-24, 03:55:55
Reply #31

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
I will need to improve the sampling algoritms instead, and that will take some time.

Is it planned? May we awaiting it before next public build?

Hello fobus

The rendering time of the image of vray?
In what amounts?

..minutes or seconds?

Seconds (0H 0m 56.4s)

3dsmax standard lights in the daily builds should work differently, you can try that.

I was hoped that it may be a solution, but even 2500 standart spots are freezing project file for a while. But I did a test. Sampling of standart lights is completely different as Ondra said. As you can see at pictures we're have clean direct light from standart sources at first pass. Voila? No. Other sampling is going veeeeery slow. With 2500 standart lights we nee huge amount of time to sample even skylight that was clean nearly at start of rendering in test with Corona lights. So I scared to think how long it will take to render Standart lights + SkyLight + CoronaLights...

As long as we're testing I really coming to conclusion that without "FIX" from Ondra we're can't render scenes with many lights (any type) in acceptable time. Sad... I hope that someone can dissuade me from this conclusion by any trick to handle this huge amounts of lights.
« Last Edit: 2013-12-24, 05:41:40 by fobus »

2013-12-24, 15:35:30
Reply #32

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
This night I left work by rendering only

the time bar shows the hours of rendering
(Material :emission) plane object = segments3x3 - density 5



2013-12-24, 15:50:38
Reply #33

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
This night I left work by rendering only

the time bar shows the hours of rendering
(Material :emission) plane object = segments3x3 - density 5

OMG! So much time to remove noise...

BTW: 3x3 segments with density 5 on 2500 planes are over 1.000.000 triangles total. It's too much for lights only in arch scenes for example.

2013-12-24, 16:05:54
Reply #34

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus , yes

Other tests, will lower the level of the segments 1 and to keep the density between the values ​​2.5 to 4

2013-12-25, 06:25:54
Reply #35

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Another test. Closest to reality. I was made this scene for cristmas and now it's in gallery. Really big problem with huge lights amounts.

As You can see the picture was rendered very quickly without christmas lights. But as soon as I light them rendering becomes noisy and long. Skylight was sampled well after 3 passes only, but other lights required 50 passes to be clean. Don't mind the DoF, without cristmas lights it was sampled quickly.

I have a question to Ondra again. Is it possible to implement light samples multiplier in light material to control sampling over every light we have separately? May be it will be a quick solution before improving the sampling algoritms as You said? I sak for this because I was in situation where there is just few lights need to increasing samples when all other was nearly ok. And overall light samples multiplier was unable to help me without seriously sacrifying time for rendering (http://forum.corona-renderer.com/index.php/topic,2268.0.html).

2013-12-26, 18:11:26
Reply #36

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
- the example with the method Bucket oder Progressive :  Primary solver + Secondary solver = none  ( is not productive ) -

1°  TEST  "in progress"

Method     : Bucket  + PT  |Secondary solver=none|
Pass Limit : 0:30:00

PTS=1800  MSI=0,2  LSM=0,12

show bucket
AA=1 A Steps =1   At=0,05

NB:from this first test bucket + PT all the values ​​will be calibrated

2013-12-26, 23:33:22
Reply #37

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
2° TEST  "in progress"

Method     : Bucket  + PT  |Secondary solver=none|
Pass Limit : 2


PTS=2200  MSI=0,2  LSM=0,37

show bucket
AA=2  ASteps =2   At=0,05

2013-12-27, 04:03:32
Reply #38

fobus

  • Active Users
  • **
  • Posts: 388
    • View Profile
Hi rafpug,

I think it's the same amount of noise with different techcnics as seen from your tests. In picture with progressive rendering (http://forum.corona-renderer.com/index.php/topic,2306.msg17100.html#msg17100) done in 15 minutes I see noise is the same as in latest picture with bucketed rendering mode. But even this time is catastrophically huge if we keep in mind that it is only boxes without materials in this test scene. When we fill scene with real models and materials it will be veeery long to render with this settings. Can You try this settings on any of your real scenes with all 2500 lights from this test scene added?

Thank You for you testing,
Pavel

2013-12-27, 12:01:28
Reply #39

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello fobus

It 'just a test to compare.
  The image refers to the link, you will remember that I changed the plan into segments 3x3 and density 4 .... otherwise    render showed greater noise.

In all cases, with the method set to "none" for both the Bucket for the Progressive, you have to pass more than 48 minutes to see a clean image.

The test is still to be finished... I have to compare some values ​​using the method Bucket/Progressive associated with Primary solver: Path tracing

Regard
Raf

2013-12-27, 20:10:48
Reply #40

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
" Remove Noise "

Test final

2013-12-27, 20:23:06
Reply #41

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
UI type : Devel/Debug     DEFAULT


2013-12-27, 20:37:35
Reply #42

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
1- Reduce/Remove noise  -  modification to UI type (see image)


2 - About the Random Sampler (see image) I leave the explanation to the staff in order to better understand what they mean 9 entries.

After several tests I preferred to use the "Alpha3 Emulation"

2013-12-27, 20:49:20
Reply #43

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Fast rendering test

Max ray depth :25   Max normal.. : 0,55


Method     : Bucket  + PT |Secondary solver=none|
Pass Limit : 2


PTS=2200  MSI=0,2  LSM=0,37

show bucket
AA=1  Asteps =2   At=0,05


2013-12-27, 20:54:02
Reply #44

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Medium level

Pass Limit : 4

show bucket
AA=1  Asteps =2   At=0,05



2013-12-27, 20:57:13
Reply #45

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
rafpug: please do not flood the forum with multiple subsequent messages. If you have some more complicated stuff to show/discuss, prefer creating one bigger post.

Also I am sorry, but most of the settings values you listed have no effect on the resulting image ;). I see not only here, but also in other threads that you seem to overthink the settings. Most of the settings are for testing/obsolete and will be removed at some point.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-12-27, 21:01:00
Reply #46

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Sorry Ondra,
next time I'll write it all in one page "did not know"