DonRomano Posted November 4, 2019 Share Posted November 4, 2019 (edited) Hello guys, I try to implement the thin sheet feature (from this paper : http://www.cs.kent.edu/~zwang/schedule/zy11.pdf) but I'm stuck on this : How can I implement this, or translate this into vex ? I'm not sure if it's working with the grids and I should try to code it in a volume wrangle but I really don't know how I have to implement it. I tried this in a point wrangle (in a sop solver) : int pts[]; float kernel_result[]; pts = pcfind(0, "P", @P, ch("search_radius"), chi("search_count")); for(int i = 1; i < len(pts); i++){ vector pos1 = point(0, "P", pts[0]); vector pos2 = point(0, "P", pts[i]); float radius_mult = ch("radius_multiplier"); float radius = @pscale * radius_mult; float sum = (1 - pow(length(pos2 - pos1), 2) / pow(radius, 2)); if(0 <= length(sum) <= radius){ float result = sum; } else{ float result = 0; } append(kernel_result, result); } I'm sure it's not good and it's why I'm asking help ! If anyone here can help it would be much appreciated !! Cheers, Edited November 4, 2019 by DonRomano Quote Link to comment Share on other sites More sharing options...
DonRomano Posted November 4, 2019 Author Share Posted November 4, 2019 Just tried to edit the previous code for a better implementation, but I'm still sure I miss a lot of things.... int pts[]; float kernel_result[]; pts = pcfind(0, "P", @P, ch("search_radius"), chi("search_count")); float kernel(int a, int b, float c){ vector pos1 = point(0, "P", a); vector pos2 = point(0, "P", b); float sum = 1 - pow(length(pos2 - pos1), 2) / pow(c, 2); if(0 <= length(sum) <= c){ float result = sum; } else{ float result = 0.0; } return result; } for(int i = 1; i < len(pts); i++){ float radius_mult = ch("radius_multiplier"); float radius = @pscale * radius_mult; float sum = kernel(pts[0], pts[1], radius); if(0 <= length(sum) <= radius){ float result = sum; } else{ float result = 0; } append(kernel_result, result); } Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 4, 2019 Share Posted November 4, 2019 maybe gonna be some helpful stuff https://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc16/01/thesis.pdf 1 Quote Link to comment Share on other sites More sharing options...
DonRomano Posted November 4, 2019 Author Share Posted November 4, 2019 (edited) Thank you but I've already saw and dig those posts except for the thesis, I didn't knew about this and it's awesome, thank's a lot !! The big advantage of the method I try to implement is that it finds areas where the fluid is highly stretched and it adds particles there, so you don't loose the great amount of detail (with droplets etc..). I've already found a solution and I came up with this : but the thing that bothers me is that I have a really tiny amount of droplets and some really long tendrils that are not that beautiful... and the fluid is expanding infinitely and I didn't found yet a solution to this. Cheeeers, thin_sheet_test.hipnc Edited November 4, 2019 by DonRomano 2 1 Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 4, 2019 Share Posted November 4, 2019 I love it. Thank you for sharing with us soon someone goona Help. Quote Link to comment Share on other sites More sharing options...
Noobini Posted November 5, 2019 Share Posted November 5, 2019 great attitude, thanks for sharing rather than ask lots of questions then go into hiding...Grrrrrr!!! 2 Quote Link to comment Share on other sites More sharing options...
DonRomano Posted November 5, 2019 Author Share Posted November 5, 2019 Thanks Noobini !! So here's just a new test after some new vex trials : I'm pretty happy with the result but it only works at the resolution 0.05, and with the minimum insertion threshold set at 0.25... And I didn't manage to fix the infinite expansion of the fluid (as you can see below, he seems to be taking a shower with water coming from nowhere...) Still have a lot of work... Cheeeers, thin_sheet_test.hipnc 2 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted November 5, 2019 Share Posted November 5, 2019 Thanks for the file. Do you have any Solver configuration tips, that will limit expansion? It seems to expand forever... Quote Link to comment Share on other sites More sharing options...
DonRomano Posted November 5, 2019 Author Share Posted November 5, 2019 12 minutes ago, Atom said: Thanks for the file. Do you have any Solver configuration tips, that will limit expansion? It seems to expand forever... Not yet.. I'm working on it ! Quote Link to comment Share on other sites More sharing options...
Atom Posted November 5, 2019 Share Posted November 5, 2019 I guess basic velocity damping, in a GeometryWrangle can stop the expansion process, but it produces a strange dissolve effect, as an artifact. I couldn't seem to get the GasDamp node to have any effect. 1 Quote Link to comment Share on other sites More sharing options...
DonRomano Posted November 5, 2019 Author Share Posted November 5, 2019 2 hours ago, Atom said: I guess basic velocity damping, in a GeometryWrangle can stop the expansion process, but it produces a strange dissolve effect, as an artifact. I couldn't seem to get the GasDamp node to have any effect. Interesting ! The expansion process is happening because the solver adds particles where there's a space (the min insert threshold) so wherever there's a space the solver fills it. Then, I managed to get droplets by adding a refining node that detects tendrils (using pc find and a threshold on neighbours count, as the tendrils points don't have much neighbours) and all the particles around there get snapped to form a droplet. But this technique works only with 0.05 res and it doesn't fix the infinite expansion issue. For sure the dissolve artifact is coming from the surface tension. I'm still working hard on it to find a solution but for now I'm stuck and I don't really know where to go... Cheers Quote Link to comment Share on other sites More sharing options...
vinyvince Posted September 25, 2022 Share Posted September 25, 2022 On 05/11/2019 at 5:58 PM, Atom said: I guess basic velocity damping, in a GeometryWrangle can stop the expansion process, but it produces a strange dissolve effect, as an artifact. I couldn't seem to get the GasDamp node to have any effect. Never noticed this post, Im not a small fluid expert but i will have go for another take. Maybe your problem should not be from fluid infinitely expanding but you might create all the way too much particles where not needed. The overall volume should ideally stay constant (at least for perception), the overall water volume not be created from nowwhere. Can't you not check if the particles speed or surface tension of particles is not too high so the drop should detach or from tendrils and no particles should be added? ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas 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.