Abanoubsaif Posted June 7, 2018 Share Posted June 7, 2018 How to detect or visualize collision intersection in bullet sim ? I've a comblix model (ship) that has a tiny intersections that may be solved by collision pading in the rbdpackedobject, and many concave pieces that causes intersections when converted to cancave(that can be visualized in sops) , but i think it will be a helpful tip if i can visualize collision intersection directly in the dopnet Regards Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted June 7, 2018 Share Posted June 7, 2018 2 hours ago, Abanoubsaif said: How to detect or visualize collision intersection in bullet sim ? I've a comblix model (ship) that has a tiny intersections that may be solved by collision pading in the rbdpackedobject, and many concave pieces that causes intersections when converted to cancave(that can be visualized in sops) , but i think it will be a helpful tip if i can visualize collision intersection directly in the dopnet Regards The impacts are recorded (if option is on - it is by default) as data for your object. You can see them and use those impacts within a SOP Solver node plugged onto your rigid body solver. By the way, you can use an impact analysis node to filter those impact data (there can be a lot... ) : http://www.sidefx.com/docs/houdini/nodes/dop/impactanalysis.html Concerning concave objects: there are many ways to solve that to get more accurate results in collisions : you can break it (voronoi fracture for example) and check the "Create Convex Hull Per Set Of Connected Primitive " in the Bullet data tab of your packed object. Don't use the Concave object option : it is truly unstable, and you get inter-penetrating objects all the time with that option. It really sucks... Hope that helps Quote Link to comment Share on other sites More sharing options...
Abanoubsaif Posted June 7, 2018 Author Share Posted June 7, 2018 1 hour ago, StepbyStepVFX said: The impacts are recorded (if option is on - it is by default) as data for your object. You can see them and use those impacts within a SOP Solver node plugged onto your rigid body solver. By the way, you can use an impact analysis node to filter those impact data (there can be a lot... ) : http://www.sidefx.com/docs/houdini/nodes/dop/impactanalysis.html Concerning concave objects: there are many ways to solve that to get more accurate results in collisions : you can break it (voronoi fracture for example) and check the "Create Convex Hull Per Set Of Connected Primitive " in the Bullet data tab of your packed object. Don't use the Concave object option : it is truly unstable, and you get inter-penetrating objects all the time with that option. It really sucks... Hope that helps Thanks JO for your reply , may i wasn't clear but the impacts is not what i want to analyse . If a scene with 2 spheres that intersecting with eachother, when they go to bullet sim , they will not explode as bullet will ignore the collision between them until they get separated But if you have a complex model that is badly modeled with tiny intersections , this tiny intersections will make bullet ignore the collision between the intersected pieces If you have a building with some doors have a little intersection with the floor , this little intersection will causes the doors to fall throw the floor So I want to visualise those pieces that have collision intersections with others Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted June 7, 2018 Share Posted June 7, 2018 5 hours ago, Abanoubsaif said: Thanks JO for your reply , may i wasn't clear but the impacts is not what i want to analyse . If a scene with 2 spheres that intersecting with eachother, when they go to bullet sim , they will not explode as bullet will ignore the collision between them until they get separated But if you have a complex model that is badly modeled with tiny intersections , this tiny intersections will make bullet ignore the collision between the intersected pieces If you have a building with some doors have a little intersection with the floor , this little intersection will causes the doors to fall throw the floor So I want to visualise those pieces that have collision intersections with others I understand better. What you can do is run a Connectivity SOP to create an attribute that will be piece-specific, then loop over each piece, create a nested loop and run a boolean to have the intersection between the piece of outter loop and piece of inner loop. Not sure if I am clear, but the idea is to « test » each piece of your model with each other piece and just keep the intersection. Therefore it will be easier to visualize... Noit fantastic but it can work :-) By the way, the Boolean SOP is eligible to multithreading when you place your loops into a Compiled Block, to accelerate the process if you have many pieces. http://www.sidefx.com/docs/houdini/model/compile Hope this helps you Quote Link to comment Share on other sites More sharing options...
Abanoubsaif Posted June 8, 2018 Author Share Posted June 8, 2018 20 hours ago, StepbyStepVFX said: I understand better. What you can do is run a Connectivity SOP to create an attribute that will be piece-specific, then loop over each piece, create a nested loop and run a boolean to have the intersection between the piece of outter loop and piece of inner loop. Not sure if I am clear, but the idea is to « test » each piece of your model with each other piece and just keep the intersection. Therefore it will be easier to visualize... Noit fantastic but it can work :-) By the way, the Boolean SOP is eligible to multithreading when you place your loops into a Compiled Block, to accelerate the process if you have many pieces. http://www.sidefx.com/docs/houdini/model/compile Hope this helps you boolean is a good idea , I definitely will try it I tried a different method by using intersectionanalysis sop and vex to color the intersected faces , but it is very slow and eats the ram drastically (like 300 scattered spheres with some of them have intersections ,not all of them, filled up 80 gig of ram and causes Houdini to crash), this is the code , you may figure out why that happens int npts = npoints(1); int i = 1; for(i=1;i<npts;i++){ vector color = set(1,0,0); int list[]=point(1,'sourceprim',@ptnum); foreach(int a;list){ setprimattrib(0,'Cd',a,color,'set'); } } first input is the geo and the sec is intersectionanalysis so i tried python instead and it works ,and the the code is node = hou.pwd() geo = node.geometry() color=(1.0, 0.0, 0.0) geo.addAttrib(hou.attribType.Prim,'Cd',(1.0, 1.0, 1.0)) refgeo = node.inputs()[1].geometry() pts = refgeo.points() l = [] for pt in pts: sourceprim=pt.intListAttribValue('sourceprim') for o in range(len(sourceprim)): l.append(sourceprim[o]) lset=set(l) prims= geo.prims() for prim in prims: if prim.number() in lset: prim.setAttribValue('Cd', (1.0, 0.0, 0.0)) 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.