ploytv Posted March 10, 2023 Share Posted March 10, 2023 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! Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 10, 2023 Share Posted March 10, 2023 (edited) Hi Ploy, you could streak the object mask on towards the gradient. heightfield_snow.hipnc Edited March 11, 2023 by konstantin magnus 1 1 Quote Link to comment Share on other sites More sharing options...
ploytv Posted March 11, 2023 Author Share Posted March 11, 2023 WOW! Thank you, thats exactly what i was looking for! I really appreciate your help! 1 Quote Link to comment Share on other sites More sharing options...
HM_2020 Posted March 17, 2023 Share Posted March 17, 2023 On 3/10/2023 at 10:58 PM, konstantin magnus said: Hi Ploy, you could streak the object mask on towards the gradient. heightfield_snow.hipnc 286.72 kB · 27 downloads great stuff, had to have a quick play with that! heightfield_snow.hipnc 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 17, 2023 Share Posted March 17, 2023 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 2 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted March 23, 2023 Share Posted March 23, 2023 you can also use particles and let them rise along the mountaines surface. mountain_snow.hip 3 1 Quote Link to comment Share on other sites More sharing options...
ploytv Posted June 18, 2023 Author Share Posted June 18, 2023 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_1.mp4 snow-solver.hiplc 5 Quote Link to comment Share on other sites More sharing options...
ryew Posted June 18, 2023 Share Posted June 18, 2023 Agreed, that's a nice result! Thanks for updating the thread with your progress on this Quote Link to comment Share on other sites More sharing options...
mrWolf Posted June 21, 2023 Share Posted June 21, 2023 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_1.mp4 snow-solver.hiplc 364.18 kB · 8 downloads Really cool application Ploytv ! I'm glad the article gave you some good inspiration 1 Quote Link to comment Share on other sites More sharing options...
ploytv Posted June 25, 2023 Author Share Posted June 25, 2023 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 3 Quote Link to comment Share on other sites More sharing options...
Librarian Posted June 25, 2023 Share Posted June 25, 2023 @ploytv Thank you for sharing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.