emission ruins photon cache

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

emission ruins photon cache

Post by lacilaci »

To be more specific:
I have a large Background plane that I want to appear as background (in render) not affecting anything but camera.

Right now I can disable shadows and use emission on the plane, I can also disable "use photonGI cache".
However this will still generate pgi entries and since it is a large object far away I will end up with very few entries inside my environment. That also causes poor pgi quality and performance.

no background only simple lighting
cache_no_bg.jpg
with background that is supposed to be backplae
cache_with_bg.jpg
this option doesn't affect the issue in any way
nope.jpg


Another use case I often end up with is lights that should appear as lights but I don't want to use them as lightsources.
For example I was working on a colored rough stained glass lamp that needed to be presented in interior, but as you can see, trying to use that object as actual light source would totally kill rendering performance. In cycles/other renderers you can disable diffuse lighting visibility and use simple fake light as an actual emittor.

So this is not only affecting pgi quality in many cases but in general there are a LOT of cases where you don't really want to use emission as an actual emission cause of performance issues.

EDIT:
I just noticed, it happens even without emission, so just having a large plane far away will ruin the pgi quality and performance. Anyways, a complete exclusion except camera rays might still solve this...?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: emission ruins photon cache

Post by Dade »

lacilaci wrote: Thu Apr 29, 2021 10:30 am For example I was working on a colored rough stained glass lamp that needed to be presented in interior, but as you can see, trying to use that object as actual light source would totally kill rendering performance.
If you disable material direct light sampling, it should not affect performance at all :idea:

I will be back to the first topic later.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: emission ruins photon cache

Post by Dade »

lacilaci wrote: Thu Apr 29, 2021 10:30 am To be more specific:
I have a large Background plane that I want to appear as background (in render) not affecting anything but camera.
I don't understand why you don't use transparent background and compose the image using alpha :?:
lacilaci wrote: Thu Apr 29, 2021 10:30 am EDIT:
I just noticed, it happens even without emission, so just having a large plane far away will ruin the pgi quality and performance. Anyways, a complete exclusion except camera rays might still solve this...?
The far plane can have a large impact on the heuristic to determinate the radius used for PGI. You can set the radius by hand to try to work around the problem.
It is something I have written in the past: the source of the problem is having a constant radius for PGI, this cause some problem when you have very near and very far objects.

However, using transparent film would solve this problem too.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: emission ruins photon cache

Post by Sharlybg »

I don't understand why you don't use transparent background and compose the image using alpha :?:
It is a common way of doing thing without extra steps directly inside the 3D package. It easy efficient and fast.

BTW i've tested it and don't have issue while disable PGI on the backplate and set back opacity to zero.so i can use an hdri or sky for lighting
bck.jpg
With Bckplate
with.jpg
Without Bckplate
without.jpg
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: emission ruins photon cache

Post by lacilaci »

Dade wrote: Thu Apr 29, 2021 11:11 am
lacilaci wrote: Thu Apr 29, 2021 10:30 am To be more specific:
I have a large Background plane that I want to appear as background (in render) not affecting anything but camera.
I don't understand why you don't use transparent background and compose the image using alpha :?:
Ok I see I have mentioned affecting camera only, but I want matching reflections too. This would need to happen in-render. For camera only I could composite in post, sure.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: emission ruins photon cache

Post by lacilaci »

Dade wrote: Thu Apr 29, 2021 11:11 am
The far plane can have a large impact on the heuristic to determinate the radius used for PGI. You can set the radius by hand to try to work around the problem.
Yes I am actually using fixed radius, doesn't help. Maybe if I used some insane number of Photon Count...
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: emission ruins photon cache

Post by lacilaci »

Sharlybg wrote: Thu Apr 29, 2021 11:29 am
I don't understand why you don't use transparent background and compose the image using alpha :?:
It is a common way of doing thing without extra steps directly inside the 3D package. It easy efficient and fast.

BTW i've tested it and don't have issue while disable PGI on the backplate and set back opacity to zero.so i can use an hdri or sky for lighting

bck.jpg

With Bckplate

with.jpg

Without Bckplate

without.jpg
It looks like you used very small backplate. Mine is much bigger than the whole scene (this is sometimes necessary for proper paralax camera movement and reflections, and of course if your scene is big)
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: emission ruins photon cache

Post by Sharlybg »

It looks like you used very small backplate. Mine is much bigger than the whole scene (this is sometimes necessary for proper paralax camera movement and reflections, and of course if your scene is big)
Yes you are right i made bckplate 10X bigger and it kill all.
Another idea is just to compute cache without BCKPLTE and then reuse this precomputed cache for the large bckplte version. Wouldn't that work ?

EDIT

IT work ;)
Last edited by Sharlybg on Thu Apr 29, 2021 12:15 pm, edited 1 time in total.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: emission ruins photon cache

Post by lacilaci »

Dade wrote: Thu Apr 29, 2021 11:11 am the source of the problem is having a constant radius for PGI, this cause some problem when you have very near and very far objects.
how is this handled with environent/hdri light?
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: emission ruins photon cache

Post by lacilaci »

Sharlybg wrote: Thu Apr 29, 2021 12:13 pm
It looks like you used very small backplate. Mine is much bigger than the whole scene (this is sometimes necessary for proper paralax camera movement and reflections, and of course if your scene is big)
Yes you are right i made bckplate 10X bigger and it kill all.
Another idea is just to compute cache without BCKPLTE and then reuse this precomputed cache for the large bckplte version. Wouldn't that work ?

EDIT

IT work ;)
Annoying workaround, but this works! :D
I still hope to have this feature at some point.
Post Reply