ParticleSkull Posted August 1, 2018 Share Posted August 1, 2018 hey guys, is there a way to make the Pop Collision Ignore node work with the grain solver? I really need to avoid the collision of one granular solid object, it works fine with normal particles but not with the grain solver. grains_avoid.collision_1.01.hiplc Quote Link to comment Share on other sites More sharing options...
3dome Posted August 1, 2018 Share Posted August 1, 2018 you could make a small change to the popgrains DOP and modify the group for which it computes collisions, see the file (nodes colored red) hope that helps grains_avoid.collision_1.02.hiplc 1 1 Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 1, 2018 Share Posted August 1, 2018 Great topic and solution! Basically the pbd_group you set to zero is the group that is used inside the POPgrains for the collisions? I've noticed that if in Alvaro setup I disable the "Gas collision detect" the box still collide and the sphere is not. I'm not sure if it happens because they are obeying to the popcollisionignore or something else it's going on. 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 1, 2018 Author Share Posted August 1, 2018 @3dome, you're a genious, thank you very much! Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 1, 2018 Author Share Posted August 1, 2018 (edited) hey @Andrea, you're right! Why's that? Looks like a much easier solution but at the same time it looks wrong (lol) Edited August 1, 2018 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
3dome Posted August 2, 2018 Share Posted August 2, 2018 (edited) @Andrea yes exactly. I noticed the same thing when disabling the whole thing but as @ParticleSkull said it feels wrong which is why I came up with that group method. the reason the box still collides even with the gascollisiondetect disabled is because by default the Final Collision Test is enabled (where I guess the gasintegrator DOP apparently DOES take collisionignore attrib into consideration) Edited August 2, 2018 by 3dome 1 1 Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 2, 2018 Share Posted August 2, 2018 Thank you for the explanation @3dome! With "it feels wrong" do you guys mean you get two different results? I just tested it again I got the same exact behaviour. But maybe that's because here we still have Houdini version 16 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 2, 2018 Author Share Posted August 2, 2018 (edited) yeah, i got the same exact behavior as well. @3dome, thx for the explanation, do you know if desabling the gas collision detect can cause any problem in a more complex situation? Edited August 2, 2018 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
3dome Posted August 2, 2018 Share Posted August 2, 2018 (edited) To the eye the results may seem the same, but the data tells you that they are not. there is a difference. From a quick investigation the reason it looks the same is because the explicit constraints take over detecting the collisions but even with them turned on you can see a different behaviour in the attached scene (the disabled one has a springy motion to it) [if you disable the constraints AND the final collision test, you dont get any collisions (apart from Internal Collisions) anymore, because now all possible detections are bypassed(gas coll detect) or turned off (constraints & final coll test)] It gets way more noticable if we turn off the explicit contraints (leave final coll test on): (1)- disabling the gas collision detect: you can see that both objects blow up. the cube because it is meant to when hitting the box but also the sphere because it is getting in contact with the cube and the Internal Collisions affect the sphere's particles (2)- modifying the group membership: you can observe that while the cube blows up when hitting the box, the sphere passes through everything untouched (and it of course affects the cube's particles). This is because all those pbd collisions make use of the __pbd_group and in (1) all the particles are in that group while - as said - (2) excludes the sphere's ones @ParticleSkull: so i guess the problem is when 2 grain objects hit each other and you have disabled the gas coll detect you get an unexpected behaviour grains_avoid.collision_1.03.hiplc Edited August 2, 2018 by 3dome 1 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 2, 2018 Author Share Posted August 2, 2018 Awesome. Thank you very much, Dominik. I'll make a quick guide here for someone trying to do the same stuff (probably me in the future): Grains have a group called __pbd_group (yeah, with 2 weird underlines at the beggining). If this group is set to zero, the grains don't collide with scene objects. In this situation we have to set this group to 0 only for the sphere's grains. Here's Dominik's approach: grains_avoid.collision_1.03_FIXED.hiplc 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 2, 2018 Author Share Posted August 2, 2018 @3dome, one last thing, if you don't mind. Do you think there is a way to make this grains avoid only one object in the scene? (let's say i have more colliders and need it to avoid only one of them) Quote Link to comment Share on other sites More sharing options...
3dome Posted August 3, 2018 Share Posted August 3, 2018 @ParticleSkull tricky question, but I think I found a way. According to the docs the gas collision detect just stores the collision information into attribs instead of manipulating the points. I make use of that by setting those attribs back to 0 for points that are supposed to ignore the collision with a certain collider. I didn't test it with millions of grains, but this hack might be not as efficient as a clean solution (which I didn't figure out yet) since it still computes the collisions for all points. grains_avoid.collision_1.04.hiplc 2 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted August 3, 2018 Author Share Posted August 3, 2018 That's really awesome, Dominik. You rock! Thx! 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.