Jump to content

Voxel Cone Step Tracing - Follow the Camera


Josh

1,992 views

 Share

Until now, all my experiments with voxel cone step tracing placed the center of the GI data at the world origin (0,0,0). In reality, we want the GI volume to follow the camera around so we can see the effect everywhere, with more detail up close. I feel my productivity has not been very good lately, but I am not being too hard on myself because this is very difficult stuff. The double-blind nature of it (rendering the voxel data and then using that data to render an effect) makes development very difficult. The intermediate voxel data consists of several LODs and is difficult to visualize. My work schedule lately has been to do nothing for several days, or just putter around with some peripheral tasks, and then suddenly solve major problems in a short two-hour work session.

Here you can see a single GI stage following the camera around properly. More will be added to increase the area the effect covers, and the edges of the final stage will fade out the effect for a smooth transition:

This all makes me wonder what "work" is when you are handling extremely difficult technical problems. I have no problem working 8+ hours a day on intermediate programming tasks, but when it comes to these really advanced problems I can't really be "on" all day. This morning, I went for a walk, for seven miles. Was I subconsciously working during that time, so that I can later sit down and quickly solve a problem I was completely stuck on previously?

I definitely underestimated the difficulty of making this feature work as a robust engine feature that can be used reliably. There is a lot of nuance and small issues that come up when you start testing in a variety of scenes, and this information could easily fill an hour-long talk about the details of voxel cone step tracing. However, there is just one more step, to make the moving volumes work with multiple GI stages. Once that is working I can proceed with more testing, look for artifacts to eliminate, and optimize speed.

This is the last big feature I have to finish. It seems fitting that I should get one final big challenge before completing Ultra Engine, and I am enjoying it.

  • Like 5
 Share

10 Comments


Recommended Comments

Yeah, I am kind of annoyed right now but I also realize this is the end of this long R&D era I've been in. After this last step, all the hard problems are solved. There won't be any new groundbreaking technologies to experiment with for a number of years, and all the focus will be on making good software. This is also nice, but it's just a big change in what I have been doing for four years.

  • Like 2
Link to comment

It will be a relief, too. The audacity of what I have attempted to do is pretty extreme, but it all did work out nicely.

  • Like 1
Link to comment

I've now got it working with multiple cascaded stages, but there are some big discrepancies between the lighting in different stages:

Even if some cross-fading is added to smooth that transition, that is still going to stick out quite badly.

  • Like 2
  • Upvote 1
Link to comment

Hmm when i look at the first video i think all that corridor should have been lighted up from the beginning.

Or at least more chunks loaded from the beginning in the corridor , not 1 by 1.

Maybe the stages should have different sizes depending on layout of level.

PS I have no idea how you render the lights and how expensive it is

 

Link to comment
1 hour ago, aiaf said:

Hmm when i look at the first video i think all that corridor should have been lighted up from the beginning.

Or at least more chunks loaded from the beginning in the corridor , not 1 by 1.

Maybe the stages should have different sizes depending on layout of level.

PS I have no idea how you render the lights and how expensive it is

There is a 3D texture used to store voxel data in, that moves around with the camera. That is what the video shows.

Link to comment
9 minutes ago, aiaf said:

the size of texture can be larger on certain axis depending on the geometry on screen ?

There's a limited range, forming a square around the camera. Then you have another stage that is a bigger square around the camera, and then maybe a third. Right now I am testing a single volume.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...