Planetside Software Forums

General => Terragen Discussion => Topic started by: Hannes on April 07, 2016, 10:53:39 AM

Title: GI caching for fast camera moves
Post by: Hannes on April 07, 2016, 10:53:39 AM
I have a scene where the camera is inside the hangar of a spaceship floating above the earth (my 2nd VR challenge entry animated). The (spherical) camera and the hangar move very fast in sync.

I created a GI cache file every 5th frame and used "interpolate for animation" as blend mode (5 files to blend). I get every 5th frame rendered correctly, but all the frames in between seem to have no GI.
So how is the GI calculated? Inside the camera or in real world space? I guess it's the latter, because of the missing GI?! Or did I miss something?
Title: Re: GI caching for fast camera moves
Post by: Dune on April 07, 2016, 12:03:11 PM
There's just no GI in space, it's all black  ;D
Title: Re: GI caching for fast camera moves
Post by: Hannes on April 07, 2016, 12:07:31 PM
Quote from: Dune on April 07, 2016, 12:03:11 PM
There's just no GI in space, it's all black  ;D

That's the reason!!!!  ;D
Maybe I should call GI Joe?! (...a bad one, I know...)
Title: Re: GI caching for fast camera moves
Post by: bobbystahr on April 07, 2016, 12:26:21 PM
Quote from: Dune on April 07, 2016, 12:03:11 PM
There's just no GI in space, it's all black  ;D

hee hee hee
Title: Re: GI caching for fast camera moves
Post by: Matt on April 07, 2016, 04:47:49 PM
GI cache stores its points in world space, so moving objects move in relation to the points in the GI cache, causing incorrect GI.

Matt
Title: Re: GI caching for fast camera moves
Post by: Hannes on April 07, 2016, 05:58:09 PM
Quote from: Matt on April 07, 2016, 04:47:49 PM
GI cache stores its points in world space, so moving objects move in relation to the points in the GI cache, causing incorrect GI.

Matt

Ah thanks for the explanation, Matt! In the meantime I created a GI cache file for every single frame and used 10 files to blend. Seems to be working.
Title: Re: GI caching for fast camera moves
Post by: Matt on April 07, 2016, 10:36:27 PM
If your first test showed that every frame was black except for the exact frame on which a cache file was rendered, then it means your scene is moving so fast that blending is not going to help at all because there is no overlap between each dataset. Using the blend option will only make your renders take longer. Worse still, you might get incorrect GI if any of the data does happen to overlap between frames.

Matt
Title: Re: GI caching for fast camera moves
Post by: Kadri on April 07, 2016, 11:03:23 PM
Quote from: Matt on April 07, 2016, 10:36:27 PM
If your first test showed that every frame was black except for the exact frame on which a cache file was rendered, then it means your scene is moving so fast that blending is not going to help at all because there is no overlap between each dataset. Using the blend option will only make your renders take longer. Worse still, you might get incorrect GI if any of the data does happen to overlap between frames.

Matt

Matt can you elaborate a little more. What is the best way to do in such a position?
Title: Re: GI caching for fast camera moves
Post by: Hannes on April 08, 2016, 03:10:51 AM
Quote from: Matt on April 07, 2016, 10:36:27 PM
If your first test showed that every frame was black except for the exact frame on which a cache file was rendered, then it means your scene is moving so fast that blending is not going to help at all because there is no overlap between each dataset. Using the blend option will only make your renders take longer. Worse still, you might get incorrect GI if any of the data does happen to overlap between frames.

Matt

Hmm, doesn't sound good... :(
Actually the hangar and the camera are travelling 500000 units during 300 frames. Quite a lot. I'll see how the result is. Anyway thanks again for this detailed explanation.
Title: Re: GI caching for fast camera moves
Post by: Matt on April 08, 2016, 03:27:16 AM
Quote from: Kadri on April 07, 2016, 11:03:23 PM
Quote from: Matt on April 07, 2016, 10:36:27 PM
If your first test showed that every frame was black except for the exact frame on which a cache file was rendered, then it means your scene is moving so fast that blending is not going to help at all because there is no overlap between each dataset. Using the blend option will only make your renders take longer. Worse still, you might get incorrect GI if any of the data does happen to overlap between frames.

Matt

Matt can you elaborate a little more. What is the best way to do in such a position?

If your scene changes so much that the GI cache needs to be different for each frame, then the only thing you can do is calculate the GI for each frame, and choose high enough settings that it doesn't flicker. In this case, the GI cache files are useless because you can't reuse the information.

Matt
Title: Re: GI caching for fast camera moves
Post by: Kadri on April 08, 2016, 03:39:05 AM

Thanks Matt.
Title: Re: GI caching for fast camera moves
Post by: Hannes on April 08, 2016, 04:57:43 AM
Quote from: Matt on April 08, 2016, 03:27:16 AM
If your scene changes so much that the GI cache needs to be different for each frame, then the only thing you can do is calculate the GI for each frame, and choose high enough settings that it doesn't flicker. In this case, the GI cache files are useless because you can't reuse the information.

Matt

OK, it didn't really work. As you said, Matt.  :(
I realized that in terms of (sun-) lighting the hangar more or less stays the same. So I'll try to delete the camera's and the hangar's animation and render it separately. If I'll comp it onto the (moving) earth's backplate it should look the same, but without the flicker. Hopefully.
Title: Re: GI caching for fast camera moves
Post by: bobbystahr on April 08, 2016, 04:51:28 PM
Quote from: Hannes on April 08, 2016, 04:57:43 AM
Quote from: Matt on April 08, 2016, 03:27:16 AM
If your scene changes so much that the GI cache needs to be different for each frame, then the only thing you can do is calculate the GI for each frame, and choose high enough settings that it doesn't flicker. In this case, the GI cache files are useless because you can't reuse the information.

Matt

OK, it didn't really work. As you said, Matt.  :(
I realized that in terms of (sun-) lighting the hangar more or less stays the same. So I'll try to delete the camera's and the hangar's animation and render it separately. If I'll comp it onto the (moving) earth's backplate it should look the same, but without the flicker. Hopefully.

Sigh, it's always the flicker....
Title: Re: GI caching for fast camera moves
Post by: paq on April 09, 2016, 11:47:09 AM
Hi Matt,

With the new progressive rendering in T4, is it possible that the GI is computed using an MC brute force method ? (so no more GI sampling prepass at all)  8)
Title: Re: GI caching for fast camera moves
Post by: bobbystahr on April 09, 2016, 01:06:02 PM
Quote from: paq on April 09, 2016, 11:47:09 AM
Hi Matt,

With the new progressive rendering in T4, is it possible that the GI is computed using an MC brute force method ? (so no more GI sampling prepass at all)  8)


heh heh, that'd be telling....
Title: Re: GI caching for fast camera moves
Post by: AP on April 09, 2016, 06:47:53 PM
It certainly looks that way. Who knows?
Title: Re: GI caching for fast camera moves
Post by: Matt on April 09, 2016, 08:16:58 PM
Quote from: paq on April 09, 2016, 11:47:09 AM
With the new progressive rendering in T4, is it possible that the GI is computed using an MC brute force method ? (so no more GI sampling prepass at all)  8)

I can neither confirm nor deny that there may or may not be a brute force GI solution coming to Terragen in the next few years.

;)

Matt
Title: Re: GI caching for fast camera moves
Post by: AP on April 09, 2016, 08:31:36 PM
 :)
Title: Re: GI caching for fast camera moves
Post by: Kadri on April 10, 2016, 02:39:55 AM

::)  :)
Title: Re: GI caching for fast camera moves
Post by: Hannes on April 10, 2016, 05:41:49 AM
 :) :) :)

Btw, not animating the hangar (and the camera) works of course. No GI flicker anymore (one GI cache file every 5th frame, 5 files to blend).
As I wrote the sun is so far away that there was no noticeable shadow movement when the hangar was animated. So in the final comp it should look correct.