Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: Sam75 on 2012-10-18, 03:20:23

Title: Skylight Portals
Post by: Sam75 on 2012-10-18, 03:20:23
I did some quick tests of interiors and it appears that the difference (noise/rendering time) between using environment light only vs Corona planar lights on openings is quite significant.

So the question, are skylight portals on your to do list ?
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 08:38:30
Nope, Corona should be quite efficient without them and from my tests, difference is only minor, almost none. Any chance you could post your renders and some description on scene setup?

A few important notes when rendering interior scenes:

1, Always make sure all objects in your scene have enabled shadow casting in objects properties. Disabling shadow casting is a fake, and fakes in Corona affect performance in a negative way. So if you intend to disable shadow casting for example on glass planes in the windows, you can actually make whole situation even worse.

2, if you have any glass in the windows, or any other light entrances to the space you are rendering, make sure geometry of the glass is only one sided (one face, no thickness) and apply glass material with glass mode set to twosided (thin). This mode not only can render objects of very thin glass without need of adding thickness to the geometry (like light bulb glass) but also does not affect rendertime at all if you use it in windows.

If you use regular thick glass with refraction in windows, any ray that passes through it is considered a caustics and your scene will take extremely long time to render...

3, For interior scenes, switch secondary GI solver to HD Cache and leave it at defaults, it is going to work well.

Don't use opacity maps for any elements covering windows (like curtains) unless you have really good reason to. For fast rendering, use just translucency and refraction level value with mode set to twosided.

I wrote this because most of the people have problems with slow rendering caused either by having glass in windows, or secondary GI solver set to path tracing on an interior scene. And then they come up with nonsenses like silly portal light, which other renderers implement because their GI solutions suck ;)
Title: Re: Skylight Portals
Post by: Sam75 on 2012-10-18, 22:21:05
I guess I don't need to tell which one is which.

I would not call that a minor difference.

How is using PT as second solver a nonsense ?


Gonna try Hd cache, thanks for the tip.
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 22:36:53
I am gonna do some test to make sure i am not the one who is talking nonsense ;) So hold on... :)
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 22:48:05
Ok, just did the test, and results with and without corona lights in windows are in my case identical :)

My render settings are at defaults except that secondary GI is changed to HDcache which too is left at default settings.

You can tell which is which by file naming ;)

If you still have some quality difference, you can try increasing Light samples multiplier value (Samples multiplier setting in Lights frame in Main Corona Settings rollout)

Cheers! :)
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 22:54:11
Oh, and i never said using PT as secondary GI is a nonsense.... it makes perfect sense, especially in exterior scenarios with heavy geometry (foliage, grass, etc...)

I said portal lights are nonsense... And i was not exactly right. It's a nonsense in context with Corona, because we got a lot better solution for these situations. For example our environment illumination is actually done on a light basis, so you can think of our enviro light like for example Vray Dome light set to full sphere mode, or MentalRay's Built-in IBL  :)
Title: Re: Skylight Portals
Post by: Ondra on 2012-10-18, 22:56:27
ehm... the scenes are quite different. The smaller the windows are, the better using lights/portals in them becomes.

Anyways, portals will be implemented eventually, as an optional way to speed up rendering of interiors with small windows
Title: Re: Skylight Portals
Post by: Sam75 on 2012-10-18, 23:00:53
Ok I just tested HD cache, much faster indeed.

HD cache GI is as accurate as PT in any situation ?
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 23:05:40
Ok I just tested HD cache, much faster indeed.

HD cache GI is as accurate as PT in any situation ?

Very significant speed up at the very slight cost of accuracy, but no blotches or anything like that....  just some minor light intensity deviations...  in most situations it pays off ;)
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 23:13:34
Ok, so i made the openings bit smaller, but i still observe only very minor difference.

The difference favors the version with the lights though, so some scenes might indeed benefit from portals, but the fact that difference is so small indicates that sky portals are not urgent :) Although, of course...  can come handy in future :)

Title: Re: Skylight Portals
Post by: Sam75 on 2012-10-18, 23:19:56
I guess it makes more difference with PT.

I was using PT because I was concerned with blotches indeed but so far HD cache looks good.
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-10-18, 23:24:49
I guess it makes more difference with PT.

I was using PT because I was concerned with blotches indeed but so far HD cache looks good.

Yes, you are probably right...  and about HDcache, you should not see any artifacts unless you do an animation, where it might cause some issues. But for static renders, it should always work well.

EDIT: Btw you can create a tests thread in the gallery section and post your tests there, it would be interesting to look at ;)
Title: Re: Skylight Portals
Post by: Javadevil on 2012-10-21, 00:37:29


Portal lights will be useful once Irradiance cache is up and running :)

Title: Re: Skylight Portals
Post by: Ondra on 2012-10-21, 00:39:37
ummmm.... no ;) They will be exactly as useful in both PT and IC. There is no magical reason that PT wouldnt need them. Maybe its just that the unbiased renderers are better at brute-forcing it without the portals.
Title: Re: Skylight Portals
Post by: maru on 2012-10-21, 17:46:52
In unbiased rendering a window (hole in the wall) works like a light portal, am I right? Adding extra light portal would be like adding additional data which could even make the rendering longer?
Title: Re: Skylight Portals
Post by: Ondra on 2012-10-21, 18:51:07
In unbiased rendering a window (hole in the wall) works like a light portal, am I right? Adding extra light portal would be like adding additional data which could even make the rendering longer?

It would allow better importance sampling of the environment map (for direct lighting/shadow rays). And it works the same in biased and unbiased.
Title: Re: Skylight Portals
Post by: zouhair_psi on 2012-12-15, 23:02:40
Hi , i did a test with corona light at the window and without and the diference i so huge.

Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2012-12-16, 11:14:58
Have you increased light sampling multiplier and PT samples in case of using environment?
Title: Re: Skylight Portals
Post by: maru on 2012-12-16, 13:17:26
Someone should make an obligatory FAQ for new users. :)
Title: Re: Skylight Portals
Post by: zouhair_psi on 2012-12-16, 22:08:45
Have you increased light sampling multiplier and PT samples in case of using environment?

yes i dead 10 for ligh sampling and pt sample in HD 4000 , and 64 for pt sample , even i play with all settings , light coroan is much faster than skylight and light material
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 01:21:38
Implemented as an OPTIONAL way to speed up rendering. Still need some work though
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 07:51:11
Mega!
Title: Re: Skylight Portals
Post by: ecximer on 2013-03-12, 09:35:31
I have so far only tested positive Portals.
Cache calculated longer, but eventually for the same time, the result is much cleaner noise.
I'm testing on.
Title: Re: Skylight Portals
Post by: andreupuig on 2013-03-12, 10:41:49
Just tested skyportals in a small windows configuration. Both images have 20 passes and the image with portals is much cleaner with few seconds more of calculations.
PT+PT 16 samples
Title: Re: Skylight Portals
Post by: Sam75 on 2013-03-12, 11:17:59
Great !
Title: Re: Skylight Portals
Post by: racoonart on 2013-03-12, 11:19:05
I feel a bit stupid right now but... how/where the hell do I activate the light portals O_o ? (latest daily build of course)
Title: Re: Skylight Portals
Post by: ecximer on 2013-03-12, 11:23:15
a new material
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 11:25:10
I feel a bit stupid right now but... how/where the hell do I activate the light portals O_o ? (latest daily build of course)
Use material CoronaPortalMtl for planes in the windows
Title: Re: Skylight Portals
Post by: racoonart on 2013-03-12, 11:31:35
Aaaaaahhhh, i thought it would be checkbox in the CoronaLight (like in vray), thanks guys :)
Title: Re: Skylight Portals
Post by: andreupuig on 2013-03-12, 11:39:52
Aaaaaahhhh, i thought it would be checkbox in the CoronaLight (like in vray), thanks guys :)

Me too, 4 minutes of panic ;)
Title: Re: Skylight Portals
Post by: ecximer on 2013-03-12, 11:41:30
:)
don't panic!
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 12:44:30
I could add the checkbox too.

BTW: it is implemented in a dumb way for now, so it is crucial to keep the number of polygons with portal mtl very low. That means make single plane per one window with several window tiles, it is better if some portion of the portal is obstructed, than if there is different polygon in each window segment.
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2013-03-12, 12:51:04
Yay for portals!

(http://25.media.tumblr.com/682d06f5d6ea77be5b1b47e4de74ef57/tumblr_mhrycrzuGP1rwbch8o1_250.gif)
Title: Re: Skylight Portals
Post by: shadowman on 2013-03-12, 13:37:56
one of the sexiest things in corona was.. that it didn't need to use those damn portals :)
ofcourse its's better to have this feature for better rendertimes
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 13:40:59
you STILL don't have to use it ;)
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 13:45:50
With portals change and lighting, interior becomes lighter. What is considered as a etalon lighting with portals or without?
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 13:47:18
that is a bug, please post the scene (if it happens with PT+PT and max sample intensity = 0)
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 13:51:17
ok, I still spend some tests and if I'm was not wrong, then  I will publish the results.
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 14:52:15
ok, I still spend some tests and if I'm was not wrong, then  I will publish the results.

I'm sorry, I was wrong :)
Title: my small test portals
Post by: DiMmEr on 2013-03-12, 15:32:14
thank you Keymaster

(https://dl.dropbox.com/s/cix582fm2mueleb/1214.gif)
Title: Re: my small test portals
Post by: Polymax on 2013-03-12, 17:16:02
thank you Keymaster

(https://dl.dropbox.com/s/cix582fm2mueleb/1214.gif)
Why is brightened with the portal?
Title: Re: Skylight Portals
Post by: Ludvik Koutny on 2013-03-12, 19:01:54
Yes, brightening is weird. Also, you should be aware that in recent builds, sun intensity is broken ;)
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-12, 20:36:24
In my tests, I could not obtain a change of brightness:
(http://clip2net.com/clip/m210717/1363116968-5b774-1549kb.gif)
Title: Re: Skylight Portals
Post by: lacilaci on 2013-03-12, 20:41:52
I haven't noticed any brightness differences so far either. Portal lowers rays/s a little but helps a lot :)
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 22:40:54
If you are using HDcache, then you can get random fluctuations in the brightness every time you render. Additionally, with the default setting of Max sample intensity above 0, there is some light energy clamped to remove fireflies. If you are using portals, you have less noise overall -> less fireflies get clamped -> image is brighter.
Title: Re: Skylight Portals
Post by: lacilaci on 2013-03-12, 22:55:36
Could a standard coronamaterial carry a portal function? So that it would be possible to make glass panels in windows work as a portals aswell with using just a checkbox somewhere in refraction options(available when using twosided shader.)??
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-12, 23:03:22
yes, I'll add it in time
Title: Re: Skylight Portals
Post by: ecximer on 2013-03-13, 07:17:04
Quote
If you are using portals, you have less noise overall -> less fireflies get clamped -> image is brighter.
Keymaster, Thanks for the clarification!
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-13, 12:43:54
Amazingly, but with portals with some of my scenes noise goes 4 times faster!
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-15, 12:31:57
Why in the render setup, option "Portal fraction" set to 0.75 as default? Why not set to 1?
Title: Re: Skylight Portals
Post by: Ondra on 2013-03-15, 12:53:13
This is a defensive mechanism, to avoid bias/high variance if there are parts of your scene not covered by portals. If you are confident that you have covered your scene well, you can set it to 1.
Title: Re: Skylight Portals
Post by: Polymax on 2013-03-15, 12:59:54
This is a defensive mechanism, to avoid bias/high variance if there are parts of your scene not covered by portals. If you are confident that you have covered your scene well, you can set it to 1.
Thanx! Very useful info!
Title: Re: Skylight Portals
Post by: ElviraKnight on 2013-08-10, 20:00:21
Nope, Corona should be quite efficient without them and from my tests, difference is only minor, almost none. Any chance you could post your renders and some description on scene setup?

A few important notes when rendering interior scenes:

1, Always make sure all objects in your scene have enabled shadow casting in objects properties. Disabling shadow casting is a fake, and fakes in Corona affect performance in a negative way. So if you intend to disable shadow casting for example on glass planes in the windows, you can actually make whole situation even worse.

2, if you have any glass in the windows, or any other light entrances to the space you are rendering, make sure geometry of the glass is only one sided (one face, no thickness) and apply glass material with glass mode set to twosided (thin). This mode not only can render objects of very thin glass without need of adding thickness to the geometry (like led lights (http://www.niceledlights.com) glass) but also does not affect rendertime at all if you use it in windows.

If you use regular thick glass with refraction in windows, any ray that passes through it is considered a caustics and your scene will take extremely long time to render...

3, For interior scenes, switch secondary GI solver to HD Cache and leave it at defaults, it is going to work well.

Don't use opacity maps for any elements covering windows (like curtains) unless you have really good reason to. For fast rendering, use just translucency and refraction level value with mode set to twosided.

I wrote this because most of the people have problems with slow rendering caused either by having glass in windows, or secondary GI solver set to path tracing on an interior scene. And then they come up with nonsenses like silly portal light, which other renderers implement because their GI solutions suck ;)


Thanks for your very nice suggestions.. I know thread is bit old but the post was quiet useful for me.. So thanks again
Title: Re: Skylight Portals
Post by: moadr on 2013-11-12, 12:33:26
Nope, Corona should be quite efficient without them and from my tests, difference is only minor, almost none. Any chance you could post your renders and some description on scene setup?

A few important notes when rendering interior scenes:

1, Always make sure all objects in your scene have enabled shadow casting in objects properties. Disabling shadow casting is a fake, and fakes in Corona affect performance in a negative way. So if you intend to disable shadow casting for example on glass planes in the windows, you can actually make whole situation even worse.

2, if you have any glass in the windows, or any other light entrances to the space you are rendering, make sure geometry of the glass is only one sided (one face, no thickness) and apply glass material with glass mode set to twosided (thin). This mode not only can render objects of very thin glass without need of adding thickness to the geometry (like led lights (http://www.niceledlights.com) glass) but also does not affect rendertime at all if you use it in windows.

If you use regular thick glass with refraction in windows, any ray that passes through it is considered a caustics and your scene will take extremely long time to render...

3, For interior scenes, switch secondary GI solver to HD Cache and leave it at defaults, it is going to work well.

Don't use opacity maps for any elements covering windows (like curtains) unless you have really good reason to. For fast rendering, use just translucency and refraction level value with mode set to twosided.

I wrote this because most of the people have problems with slow rendering caused either by having glass in windows, or secondary GI solver set to path tracing on an interior scene. And then they come up with nonsenses like silly portal light, which other renderers implement because their GI solutions suck ;)


Thanks for your very nice suggestions.. I know thread is bit old but the post was quiet useful for me.. So thanks again

I have the same thing to say. And the thing, that I mention it, is because I think somehow we should collect these useful and important guides to the people how are coming here to try out what Corona is capable of (because as I read other forums, I see more and more users checking it out). It can be a Wiki, or something.

For example I have already read some topics here in the forums and I thought I know the basics of this render engine, so I left one of my newly created scenes (created for Corona from the first bit ;) ) to render, but after an all night session (approx. ~7 hours) what I found was a not bad, but definetaly not clean render. And the problems were just some simple things mentioned in the post quoted above.
So I think If we want to persuade the newcomers about the potential that's in this engine we should make some of these simple things (that makes a huge difference in the final render) clear from the first step.