Skybar Posted August 28, 2014 Share Posted August 28, 2014 I was scratching my head all day yesterday, I'm trying to mesh a flipsim in a container so that the refractions is correct. Like this picture: I was mainly fiddling around trying to solve it with VDBs. The red/green part is easy enough, but cutting the glass/blue part seems like a whole other case. I'm trying to avoid using the Cookie SOP since that 9 out of 10 times breaks and creates holes. My flipsim or container isn't as simple as in the picture, just to mention that. I'm sure there is a way good way to do this, I just can't figure it out. Does anyone have any insight on this? Quote Link to comment Share on other sites More sharing options...
CeeGee Posted August 28, 2014 Share Posted August 28, 2014 On convertVDB you can use maks option, use your container as mask, or any other object if you want Quote Link to comment Share on other sites More sharing options...
danw Posted August 28, 2014 Share Posted August 28, 2014 Does that give clean edges that actually align to each-other? I recall trying it, and finding it was a bit messy... and then going to the OpenVDB site, and reading in the latest patch-notes that a far better method had been implemented. I was under the impression that version of OpenVDB hadn't been implemented into official Houdini builds yet. Quote Link to comment Share on other sites More sharing options...
Skybar Posted August 28, 2014 Author Share Posted August 28, 2014 Yeah I tried that, I couldn't get it to work good enough though. I basically want the "cleanliness" of booleans, but without using the Cookie SOP. Or if there is a method to not make it break so often? Quote Link to comment Share on other sites More sharing options...
fathom Posted August 28, 2014 Share Posted August 28, 2014 you could probably get there with some reflection/refraction mask stuff. objects: A = containter, B = sim mesh At = copy of A At is phantom A's reflection mask excludes At A's refracton excludes A and B At's reflection mask excludes A and B At's refraction mask excludes At if you make B overly large, it will push into the container, but won't be hit by refraction rays since no traced ray inside of the container would include B in its mask. you could do some kind of attribute manipulation on your surface to change the ior where the mesh surface meets the container surface. you might also be able to pass messages on rays or do some kind of shader coding to figure out where you are. also might be able to do it all with a more complex masking scenario (including a Bt with custom masks)... Quote Link to comment Share on other sites More sharing options...
CeeGee Posted August 28, 2014 Share Posted August 28, 2014 (edited) Hi, What you think about this, i just tried with simple glass example, to mesh side to be same as glass object and not overlap, image01 show glass and fluid how they intersect. image02 i tried to subd glass few times to get smooth object and use same workflow look clean and smooth, but not sure if this will work with your object. i meen this is not what you asked, to cut edges but this clean sides can help if you have some milk, juice stuff where you need entire mesh for better refraction. Igor fluidGlass.hip Edited August 28, 2014 by CeeGee 1 Quote Link to comment Share on other sites More sharing options...
danw Posted August 28, 2014 Share Posted August 28, 2014 I've tried time and again to try and get a robust solution to this using ray masking and such. The problem is, you're trying to define three different interfaces, between two surfaces and each surface and the air, each with different refractive densities, and without a clear way to define where on the glass one interface ends and the other begins. I've even tried by masking objects according to ray-bounce-level, but that screws up the moment you need to take total-internal-reflection into account. VDB should be the definitive way to do it (especially when you can just reuse the same VDB you use to mesh the fluid), but not with the currently implemented build unfortunately. I haven't tried it, but in the OpenVDB 2.3.0 notes, there's the line: Houdini: Added a Clip SOP, which does volumetric clipping - which sounds like exactly what is required. A precise geometry clipping algorithm that cuts along an isosurface boundary. I presume OpenVDB can be manually compiled to include into current Houdini builds... has anyone tried it? Quote Link to comment Share on other sites More sharing options...
tmp500 Posted August 30, 2014 Share Posted August 30, 2014 thats my take on this problem. its a pretty involved setup tough... you need to write out a very dense point cloud of the glass object, feed that into the shader and write out a point cloud for the contact points. there is a help card in the otl with the exact steps. i am by far no houdini expert and im sure someone more experienced could fines this... PC_Glass000.otl Quote Link to comment Share on other sites More sharing options...
Skybar Posted September 1, 2014 Author Share Posted September 1, 2014 Cheers for the replies! A combination of Igors and Miles tips seems to work okay. OpenVDB 2.3.0 seems interesting as well, with the new VDB Clip SOP. It looks like you can download it and compile it yourself, however I have no idea how to do that. Is there any resources somewhere on how to compile stuff for Houdini? I've never done it but I'd like to get into it. Quote Link to comment Share on other sites More sharing options...
danw Posted September 1, 2014 Share Posted September 1, 2014 Yeah, I'd really like to know if there are any useful resources for this too. I mean to properly look into it eventually, but I'm no programmer, so a "compiling stuff for Houdini for dummies" guide would be a great thing to find :-) Quote Link to comment Share on other sites More sharing options...
anim Posted September 3, 2014 Share Posted September 3, 2014 ...I haven't tried it, but in the OpenVDB 2.3.0 notes, there's the line: Houdini: Added a Clip SOP, which does volumetric clipping - which sounds like exactly what is required. A precise geometry clipping algorithm that cuts along an isosurface boundary.... Volume Break SOP does this with houdini SDF volumes it's fast, precise and stable, It doesn't resample the cut boundary edge though, which I'm not sure if volumetric Clip SOP does or not, but it's kind of necessary when cutting low res geo Quote Link to comment Share on other sites More sharing options...
danw Posted September 5, 2014 Share Posted September 5, 2014 Interesting, I didn't realise that existed. But yeah, the fact that it only intersects the isosurface at edges, rather than across the whole polygon face, I think would limit its use in this case. I'm hoping the VDB Clip SOP does this :-) Quote Link to comment Share on other sites More sharing options...
whodini Posted November 18, 2014 Share Posted November 18, 2014 Igor's method works really well in my situation. I just added a VDB reshape SDF set to dilate on the B side of the combine VDB sop. And slowly increase the dilate value by small increments until all the gaps in the fluid are completely gone and it sits perfectly flat on the container. The reasons there is such a large gap between my fluid sim and the container is because I had to use a little but of offset on the collision geo in DOPS. Not sure how to get around that issue post sim. Quote Link to comment Share on other sites More sharing options...
dulo Posted March 16, 2015 Share Posted March 16, 2015 (edited) Hi I have altered the HIP file this thread provided to move the collision glass around. My question is: Can I avoid rebuilding the VDB of the glass in each frame ? Can I just transform the VDB from frame 1 to match the movement ? The shape of the glass doesnt change so I would guess that it should be possible. fluidGlass.hip Edited March 16, 2015 by dulo Quote Link to comment Share on other sites More sharing options...
dulo Posted March 16, 2015 Share Posted March 16, 2015 Just solved the problem by using and object merging the vdb from the glass object instead of doing the vdb conversion inside of the fluid geo. 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.