Back to search

Is it possible to use pre-simulated velocity fields to create swirling gas clouds that we can fly through, or is this scenario limited by something like the signed distance fields?

TL;DRPre-simulated velocity fields for swirling gas clouds aren't feasible because offset texture reads in ray marching slowed a test by roughly five times and pre-calculated shadows wouldn't update, so static clouds with swirling particles outside are more likely.

Michal PiatekSenior VFX Artist

That's actually something I asked you not that long ago. What was the answer?

Ben ParrySenior Graphics Programmer

No. The exact technical reasons for that being difficult: we did a test that had something similar, for different reasons. We were trying to break up pixel edge detail. When we're ray marching, we have this big texture and we're reading through it, taking tons and tons of samples. If you introduce something where you have to read one thing to offset where you're going to read another thing, it introduces a small delay on the GPU. And if you do hundreds and hundreds of samples, and each one of them has a separate offset that has to be calculated from another texture, I think it did something ridiculous like multiplying the time it took to draw by about five. So in theory, you could have a vector field that we moved along each frame, kind of like the vector field stuff we do on particles. It's just probably not going to be feasible. Also, things like the shadows that we pre-calculate for those wouldn't update. So it's more likely that we'd use something static and then put particles on the outside. Maybe those particles have the swirls.

Mike SnowdonVFX Director

So the end visual might actually look like what you're expecting it to look like.

Jared HuckabyHost, Community

By using different techniques.

Reverse the Verse›LIVE - Adding Life to Space·
Published on this date.16 Nov 2018