PGI Cache from file

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
sanjinms
Posts: 23
Joined: Tue Jun 26, 2018 6:58 pm

PGI Cache from file

Post by sanjinms »

Can we use same PGI cache from saved file for animation or for different camera position?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PGI Cache from file

Post by Dade »

sanjinms wrote: Mon Apr 29, 2019 6:54 pm Can we use same PGI cache from saved file for animation or for different camera position?
Yes, camera-only animations are the one where you can use persistent PGI cache.
Support LuxCoreRender project with salts and bounties
sanjinms
Posts: 23
Joined: Tue Jun 26, 2018 6:58 pm

Re: PGI Cache from file

Post by sanjinms »

But what if I, for example, move camera into another room where the photons are less quality then the photons in room where cache is saved? Shoud I save cache separately for each room using keyframe checked on to save new cache when camera is in another room? (talking about Archviz animation)

Another question, is it possible to use saved cache for Viewport rendering?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PGI Cache from file

Post by Dade »

sanjinms wrote: Mon Apr 29, 2019 8:44 pm But what if I, for example, move camera into another room where the photons are less quality then the photons in room where cache is saved? Shoud I save cache separately for each room using keyframe checked on to save new cache when camera is in another room? (talking about Archviz animation)
There is a trick, with camera motion blur, you can use to build a cache that cover all the animation. It was discussed in PGI thread: render a single image with a camera motion blur from the the position of the first frame to the one of the last one. So you can create a persistent cache that includes all the information required by the animation, even if you move across many rooms. You can than use the already existing cache file for the real animation.

In the future, this trick could be directly implemented by BlendLuxCore and be effort-less for the user. At the moment you need to do it by hand.
sanjinms wrote: Mon Apr 29, 2019 8:44 pm Another question, is it possible to use saved cache for Viewport rendering?
Not at the moment but view port rendering is intended for interactive scene editing so I doubt it would be useful.
Support LuxCoreRender project with salts and bounties
sanjinms
Posts: 23
Joined: Tue Jun 26, 2018 6:58 pm

Re: PGI Cache from file

Post by sanjinms »

I agree with the answer to the second question.
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: PGI Cache from file

Post by epilectrolytics »

I'd like to know what camera properties can / cannot / shouldn't be altered after a cache is saved:
- motion blur (obviously yes, when the above mentioned trick is considered)
- depth of field?
- angle of view?
- render resolution?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PGI Cache from file

Post by Dade »

epilectrolytics wrote: Tue Apr 30, 2019 12:54 pm I'd like to know what camera properties can / cannot / shouldn't be altered after a cache is saved:
- motion blur (obviously yes, when the above mentioned trick is considered)
- depth of field?
- angle of view?
- render resolution?
All parameters can be edited however, in theory, it is better if you should generated the persistent cache with the "wider" values, for instance if you animating the field of view between 30 and 75, you should create the cache with 75.

But it is a quite loose constrain, I mean you can have a problem if you generate the cache in one room and than move the camera in another far room; inside the same room you should be able to render with any parameter without problems. The motion blur trick should be the only step required in 99% of the cases.

Render resolution is a factor only if you use automatic cache radius (it is calculated using the current render resolution). But, again, it should be a factor only in some extreme case (i.e. 128x128 rendering Vs 1024x1024 rendering).
Support LuxCoreRender project with salts and bounties
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: PGI Cache from file

Post by epilectrolytics »

Thanks for the info!

Currently I'm trying to animate in my bunker scene and could not get the motion blur trick to yield an homogenous cache, instead I moved the camera in the middle and doubled the field of view so that start and end point were covered.

Probably when animating in a single room it should be sufficient to move the camera in a corner, choose a wide angle view covering the whole scene and get a cache from that. But I was unsure about the automatic settings, so I will now use a defined radius in those cases.

It looks like cache animation is quite flexible which is great 8-)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PGI Cache from file

Post by Dade »

epilectrolytics wrote: Tue Apr 30, 2019 3:18 pm Currently I'm trying to animate in my bunker scene and could not get the motion blur trick to yield an homogenous cache, instead I moved the camera in the middle and doubled the field of view so that start and end point were covered.
You can probably just use a panoramic camera in the middle of the room to generate a quite perfect cache for a single environment :idea:
Support LuxCoreRender project with salts and bounties
Post Reply