Jump to content
JaydenDP

Gridless advection

Recommended Posts

Hi everyone!

Any idea's kicking around to perform good stepped gridless advection at render-time for volume rendering?

Just an open topic for no reason at the moment in particular. Was just thinking about it as at the moment we do use render-time advection on our volumes which does one noise displacement (no history for multiple steps). At least I think it does that, I didn't write it ;P

Any thoughts and musings would be much appreciated anyway.

Thanks

Jay

Share this post


Link to post
Share on other sites

I took one look at gridless advection and shrunk away in fear. Deadline was far too tight to even contemplate it!

Watching this closely... :)

Share this post


Link to post
Share on other sites

In your shader, you could use a For VOP. Inside it have your noise. Each iteration, increase/decrease the timestep of the noise offset (depends if you want forward or backward tracing). Make sure you add to the current location of P so that it creates the feedback.

Share this post


Link to post
Share on other sites

I have been playing with some of the ideas mentioned in this thread:

Especially Serge's awesome setup here:

page__st__36#entry84164

Is this considered gridless advection?

Share this post


Link to post
Share on other sites

This topic interested me since I first saw the Jerry Tessendorf's paper "Resolution Independent Volumes". Recently, I was able to get some results with houdini native resources. I has tested a few different methods, the simplest is just displace volume with velocity field to sharpen the resulted density. Later, I going to tell about this in more detail, now I only post some pictures (the method(s) is still under development).

The simple displace method (before, after):

post-5855-0-04542300-1354231072_thumb.pnpost-5855-0-42679900-1354231085_thumb.pn

More advanced method:

post-5855-0-76866200-1354231207_thumb.pnpost-5855-0-21965400-1354231219_thumb.pnpost-5855-0-56720000-1354231240_thumb.pnpost-5855-0-98789000-1354231247_thumb.pn

  • Like 2

Share this post


Link to post
Share on other sites

Interesting, care to elaborate on the process? Are you just evolving the field a number of steps equal to the frame number?

I would guess that the dissipation is coming from the fact the density output isn't coupled with the evolving vel field, so you lose the divergence-free projection. You see the same effect when advecting particles through a field over a long period of time.

Share this post


Link to post
Share on other sites

Interesting, care to elaborate on the process? Are you just evolving the field a number of steps equal to the frame number?

Yes, exactly.

I would guess that the dissipation is coming from the fact the density output isn't coupled with the evolving vel field, so you lose the divergence-free projection. You see the same effect when advecting particles through a field over a long period of time.

Thank you for the tip, I'll think about it.

Another pictures, from another algorithm, not so good for now, but (I hope) can be improved...

post-5855-0-42474000-1354610926_thumb.pnpost-5855-0-24531100-1354616463_thumb.pn

Edited by nord3d

Share this post


Link to post
Share on other sites

My experimentation continues, so I have a few new pictures:

#1 without / with

post-5855-0-82230400-1354935737_thumb.pnpost-5855-0-64898400-1354935751_thumb.pn

#2 without / with

post-5855-0-68160100-1354935824_thumb.pnpost-5855-0-47134800-1354935836_thumb.pn

#3 some frames from the sequence in analytical color

post-5855-0-55433100-1354935984_thumb.pnpost-5855-0-35428200-1354935997_thumb.pnpost-5855-0-71973600-1354936006_thumb.pn

The speed is greatly improved and the algorithm is greatly simplified, but still has some problems. I'll working on it.

  • Like 1

Share this post


Link to post
Share on other sites

Is there any chance you could perhaps share some of the approaches or hip file for the algorithm you are using in the above images?

Share this post


Link to post
Share on other sites

So Im still wondering what the definition of gridless advection is for someone who cant quite decipher the white papers yet... anyone got a good description in laymen's terms?

Share this post


Link to post
Share on other sites

wow, it's been over a year. Can anyone shed some more light on this topic? the tessendorf papers are pretty tough to digest. Has anyone made any attempts to make sense of it and willing to share?

Share this post


Link to post
Share on other sites

Advect density field by velocity field in a for loop in cvex context (volume procedural).

 

Here is some psuedo code for the rough idea:

 

for i in $F

@density += volumesamplev("/path/to/velocity/field_" i ".bgeo", "vel", @P)*@TimeInc;

 

 

So you use the "i" variable to read in specific frames of your vel field

Doing this in cvex at rendertime, density can be moved around resolution independant or "gridless advection"

Edited by jkunz07
  • Like 2

Share this post


Link to post
Share on other sites

So this you are kind of calculating the advection for every frame leading up to the frame you are rendering... that sounds pretty heavy computationally... 

Share this post


Link to post
Share on other sites

Ok, I haven't done this, but I don't think you can "push" density around without storage. You would need to "walk backwards" in time, through each frames (negated) velocity field, and see if you end up somewhere that has density.. RIght?

Share this post


Link to post
Share on other sites

Ok, I haven't done this, but I don't think you can "push" density around without storage. You would need to "walk backwards" in time, through each frames (negated) velocity field, and see if you end up somewhere that has density.. RIght?

 

yeah basically you do a 'trace' advection setup, walking backwards in time to find where the fluid would be in the next step.

 

This example's pretty basic, I would want to add some modifiers based on density and velocity magnitude to make the step size more adaptive.

 

 

rendertime_advection.hip

  • Like 4

Share this post


Link to post
Share on other sites

Thanks, ikarus! It works really well. Render time seem reasonable too, for this image it was 0:08 / 0:22 at 8 steps, of course low-res, so probably not the best example to test. Technique is very cool, thanks again, so much abilities there.

post-9542-0-74057300-1397258273_thumb.jp

Share this post


Link to post
Share on other sites

Thank you ikarus for generously sharing a hip file! that's incredible. I owe you a beer man. This is extremely valuable for learning volume shading and more.

Edited by rhussain

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×