neom315 Posted April 22, 2021 Share Posted April 22, 2021 Hello, I have created a scene with a vial, scatter a low res mesh of that vial and fill every vial with grains. But now i have a problem understanding how can i only partially fill that mesh with grains instead of filling it completely. The second issue is how can i replace the low res simulation with the high res/shaded mesh? I attach here a screenshot of my graph thanks Quote Link to comment Share on other sites More sharing options...
underscoreus Posted April 23, 2021 Share Posted April 23, 2021 Hey there! In the future, the easiest way to share your setup is to just upload the .hip file along with your post if you can. Then people can just download it and have a look. As for your explanation, I'm a little unsure if I've understood it correctly, you want to have grains fill half of several vials, is that correct? And then maybe the vials are then animated around or something? If the high res vials and low res vials are animated the same (if they are animated), can you not just blast the low res vials after the vellum sim and then merge in the high res vials maybe? Quote Link to comment Share on other sites More sharing options...
neom315 Posted April 23, 2021 Author Share Posted April 23, 2021 (edited) Hey, i have attached the scene with the low res mesh as well to check it, i am not totally sure if i have understood how to merge the high poly as you describe. Thanks scene.rar Edited April 23, 2021 by neom315 Quote Link to comment Share on other sites More sharing options...
underscoreus Posted April 24, 2021 Share Posted April 24, 2021 Alright, I had a look at your scene and made a setup that should work. To only fill half of the vial, you can simply use a "clip" node to cut off part of the geometry before you create the grain points. That way it will only fill half the vial. I've marked the clip node with yellow color and a spikey shape so it should be easier to find. While you can use vellum with stiff struts to make stuff appear rigid, Vellum is mainly used for softbody or grain type simulations. For your vials, I've gone with making a quick RBD simulation. It should compute much faster and in general, it should be easier to work with overall. When exporting the RBD sim I am using something called a "transform pieces" workflow. In basic terms what it does is allow us to easily change out the geometry later on so we can sim with low res geometry and then swap in a higher-res geometry later on. It works very similarly to the "copy to points" node except that we have a few extra attributes mixed in like "name" and the "orient" attribute. Then after the RBD sim simply bring in the result from that into the vellum solvers third port which is for collision geometry. Another thing that can be nice is to give the collision geometry some extra thickness to help the solver calculate collisions. This is also fine since we won't actually be rendering the geometry we use as a collision object so it can look however we need it to make the sim work. Lastly, I just bring the finished grain sim and the transform pieces with high res geometry in and merge it all together at the end. On a more general note, I'd recommend trying to work around real-world scale and using the grid for what its worth. The unit scale in Houdini is 1 unit = 1 meter, so the vials in your original scene being around 7,5 meters tall will probably not produce a propper looking result in any sim since they assume that the scale is set correctly beforehand and a 7,5m tall vial behaves very differently than a 7,5cm tall vial. The other thing I'd like to mention at the end is that I ended up changing a fair bit of the layout to a style I'm more comfortable with. Breaking up the whole node network into several smaller ones for a better overview, hope you can still find your way around! The setup should fully work, all it needs is the high-res geometry centered to world 0 and in correct scale (see the transforms for the low res vial). Hope it can be helpful vial_mnb.hiplc 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.