Jump to content

How would you create this kind of snow accumulation?


Recommended Posts

How can I create this effect, where snow seems to be accumulating behind these rocks?
I tried different approaches, like negative removal rates in the heightfield_erosion Sop. Nothing seems to work.

I can remember that I once saw a tutorial on exactly this, but I can`t find it anywhere.

I think this kind of snow pile up is whats missing from a lot of snowy mountains, created in 3d.

Any help would be greatly appreciated!

snow.jpg

Link to comment
Share on other sites

18 hours ago, HM_2020 said:

great stuff, had to have a quick play with that!

Cool, I've just replaced the iterative approach by a tracer that does practically the same thing.

int steps = chi('steps');
float w = chf('width');

float dist = 0.0;
if(f@mask < 0.5){
    vector pos = v@P;
    for(int i = 0; i < steps; i++){
        vector grad = volumegradient(0, 'height', pos);
        pos -= normalize(grad) * w;
        float mask = volumesample(0, 'mask', pos);
        if(mask > 0.5){
            dist = 1.0 - i / (steps - 1.0);
            break;
        }
    }
}

f@mask = max(f@mask, dist);

 

snow_accum.hipnc

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

I had a little time to think about this problem and I came across this post from fxthinking:

https://pepefx.blogspot.com/2019/03/sand-without-grains-part-2-vex.html

I thought that maybe I could use this as a basis for a snow solver. Letting snow fall on a mountain and simulate its behavior. It's all done on geometry without the use of any particles.

I played around with it and to my surprise it worked well, producing very realistic results. The snow collects beautifully behind the rocky surface and also piles up in a realistic manner.

I adapted it to work with geometry instead of heightfields because like this it also works with overhangs.

SnowSolver_A.png

SnowSolver_B.png

snow-solver.hiplc

  • Like 5
Link to comment
Share on other sites

On 6/18/2023 at 9:41 AM, ploytv said:

 

I had a little time to think about this problem and I came across this post from fxthinking:

https://pepefx.blogspot.com/2019/03/sand-without-grains-part-2-vex.html

I thought that maybe I could use this as a basis for a snow solver. Letting snow fall on a mountain and simulate its behavior. It's all done on geometry without the use of any particles.

I played around with it and to my surprise it worked well, producing very realistic results. The snow collects beautifully behind the rocky surface and also piles up in a realistic manner.

I adapted it to work with geometry instead of heightfields because like this it also works with overhangs.

SnowSolver_A.png

SnowSolver_B.png

snow-solver.hiplc 364.18 kB · 8 downloads

Really cool application Ploytv ! I'm glad the article gave you some good inspiration :)

  • Thanks 1
Link to comment
Share on other sites

I worked a little more on this. There was a little error in the vex code, so the snow did not topple correctly. And I made it work in Open CL. Its really impressive how much faster it is now. But its also much harder to work with Open CL than VEX. In order to get the speed you can`t use any other SOP nodes. And it has to be nested in a For-Loop and a Compiled Block.  So I had to figure out a way to calculate the Point Normals in Open CL.

snow-solver-opencl.hiplc

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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...