Bullet physics implementation and other stuff

   299186   385   4
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
goldleaf
This is great cybermax!
BTW, it would be really helpful if there were more primitives to have access to, like the Bullet DOP provides (capsules, cones, etc…). The btCompound and btMultisphere shapes are faster than simply constraining lots of objects together, and having the btStaticPlaneShape for a groundplane option in the properties sop node would also help speed things up when colliding lots of objects to the ground. Another nice use for btMultiSphereShape, is that you can get non-uniform sphere primitives. I'm just adding this to the Bullet DOP now, so once its up, the code will be open for you to refer to.

btCompound shape you can create easily with sop_multijoints or sop_constraints, there is fracture option. In example file is example, but for child shape It use voronoi piece, but you can changescene to sphere(btMultiSphere), which fill object. maybe I create example.


goldleaf
I looked at trying to implement these myself, but as far as I can tell, those are all done in your libBullet.a, right? Only the node interface is done in SOP_Properties, but the actual primitives need to be setup by you, if I understand it correctly.
All works with SOP_Properties is in source code. libBullet.a is only for SOP_Solver.
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
1769 posts
Joined: Dec. 2006
Offline
Awesome work Cybermax!
Anyone can please post a compiled version of the whole package?
I don't have MS visual studio.

Thanks a lot!
daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
buki
Awesome work Cybermax!
Anyone can please post a compiled version of the whole package?
I don't have MS visual studio.
Thanks a lot!
thx,
I think that best way for you is install visual studio 2005, else you need to ask other users for compile for every houdini build. In this moment I have very “old” houdini 11.0.547. So I cannot help.
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
52 posts
Joined: July 2007
Offline
I found another bug and cybermax confirmed it
when I press ESC to interrupt the simulation,the bullet solver stays always interrupt,no re-cooking.

anyone else have the same pb? and could you SESI provide a debug solution why this happen?
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
horizon1231
I found another bug and cybermax confirmed it
when I press ESC to interrupt the simulation,the bullet solver stays always interrupt,no re-cooking.

anyone else have the same pb? and could you SESI provide a debug solution why this happen?
I am just fix it.
problem was that opEnd must always be called!!!!

and in few places I had code like this:
if (boss->opInterrupt())
return false;
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
really great work cybermax!!!Congratulations and thanks.
I noticed that the the cracked objects have big gaps(sorry for my exaggeration) between each other, you scaled them or something secret had happened??I don't know, ,but I think there must have some reasons because in my dop bullet solver,if the cracked objects have no gaps between each other ,they will explode out,I found the reason is the btGImpactMeshShape,if i build bullet body using btConvexTriangleMeshShape,everything is ok,but I haven't found why,do you have same problem?? and anybody else know how this happens??
at same time there are bad news ,my houdini crashed several times when i use your bullet SOP , i know the whole thing is hard work , and i will keep on testing and submit the crashlog sorted to you, hope this can help.
finally thx again and besh wishes for you, great work man!!!
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
oh_qxs
really great work cybermax!!!Congratulations and thanks.
I noticed that the the cracked objects have big gaps(sorry for my exaggeration) between each other, you scaled them or something secret had happened??I don't know, ,but I think there must have some reasons because in my dop bullet solver,if the cracked objects have no gaps between each other ,they will explode out,I found the reason is the btGImpactMeshShape,if i build bullet body using btConvexTriangleMeshShape,everything is ok,but I haven't found why,do you have same problem?? and anybody else know how this happens??
at same time there are bad news ,my houdini crashed several times when i use your bullet SOP , i know the whole thing is hard work , and i will keep on testing and submit the crashlog sorted to you, hope this can help.
finally thx again and besh wishes for you, great work man!!!
thx,
send some hip file( its better than crashlog) with your problem, and I explore it

ps: I dont use btGImpactMeshShape and I dont use btConvexTriangleMeshShape :shock:
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
send some hip file( its better than crashlog) with your problem, and I explore it
I will if I cant solve the problem myself, thanks!

ps: I dont use btGImpactMeshShape and I dont use btConvexTriangleMeshShape
:shock: you don't?? so curious!! I use btGImpactMeshShape to handle with the concave object, sorry for my newbie question , Maybe I should study in the bullet again!!
Edited by - Dec. 29, 2010 07:55:57
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
oh_qxs
:shock: you don't?? so curious!! Maybe I should check and test my code again!!
Its using only btSphereShape, btBoxShape, btConvexHullShape.
For concave I break object to many convex piece and using btCompoundShape with btConvexHullShape.
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
Its using only btSphereShape, btBoxShape, btConvexHullShape.
For concave I break object to many convex piece and using btCompoundShape with btConvexHullShape.
Oh I know ,you talked about that many days ago, but I am really new to bullet at the moment, maybe someday I can talk about bullet in detail with you.
thanks for the reply, I love you work!!
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
Update:
- fixing many critic bugs
- boost speed for sims
- boost speed for loading data

I am just testing new scene with very large building, so I find many bugs and because scene includes many thousands constraints I needed more speed on first frame, so I completely rewrite data management in solver library and result is reallly good!

I release this version soon /two - four days/
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
I am just testing new scene with very large building, so I find many bugs and because scene includes many thousands constraints I needed more speed on first frame, so I completely rewrite data management in solver library and result is reallly good!
Could you say some more details please if it isnt something top secret? :wink:
I use constraints to get auto glue in my bullet DOP solver, and I bulild constraints between contact points at first frame with btPersistantManifold used,the result looks fine at the moment,but I havent test more than thousands of objects like you,so I am confused about the “data management” you just mentioned,Mmm,for me is just a btAlignedObjectArray<btTypedConstraint *>,maybe you have some more safe and efficient ways?right?
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
oh_qxs
Could you say some more details please if it isnt something top secret? :wink:
I use constraints to get auto glue in my bullet DOP solver, and I bulild constraints between contact points at first frame with btPersistantManifold used,the result looks fine at the moment,but I havent test more than thousands of objects like you,so I am confused about the “data management” you just mentioned,Mmm,for me is just a btAlignedObjectArray<btTypedConstraint *>,maybe you have some more safe and efficient ways?right?

Work with classics bullet constraints its simple, as you have writen, but I talk about btCompoundShape, which has more speed and its completely stable. Problem is when some objects(parts) have hit, It need to check all structure(constraints web) and create new objects(break object) and this is not simple If you have many “constraints” with different max_force.


edit: test scene has 1835objects, 3839constraints(btCompoundShape) and old solver loading scene 35s, new solver loading only 15seconds …. sim time is around 19ms/frame :shock: without breaking and building is completely stable!!!

edit2: using only convex objects and all building is one btCompoundShape. Try this with classic bullet constraints and slow sim time and unstability kill you :roll:
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
I have done next big optimalization.

test building has 46494poly, 62422points. break to 7536 objects, 18199 constraints(btCompoundShape).

loading time 27second (only 6s for constraints)
sim time 180ms/frame.

I have little problem with memory, because creating building, compute object properties and mainly constraints take alot memory. But then I lock final nodes, save file and close houdini. Open houdini and open file, where I have lock nodes, so houdini dont compute anything(dont fill memory), so when I click on bullet_solver its took only 27s and wants 1.1GB so its fine

Attachments:
Bez názvu.jpg (531.4 KB)

https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
Wow, excellent test , cybermax ,I love it .

Work with classics bullet constraints its simple, as you have writen, but I talk about btCompoundShape, which has more speed and its completely stable.
I tested my bullet DOP solver with 8000 boxes, houdini crashed!

At first I was trying auto glue with btCompoundShape ,but havent made a step forward :cry: ,maybe I should try again, thanks for your message ,let's get it started!
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
oh_qxs
At first I was trying auto glue with btCompoundShape
Auto glue?? what is it? Is it your code or its this: http://code.google.com/p/bullet/issues/detail?id=90 [code.google.com]

I have problem with GPU fluids, If scene is large with millions paarticles, its crash. But I think its memory problem, so I am just implementing cloud computing, which solved this problem, or I hope so :? If it works, It will be great because you will be to able simulating very big waves on home hardware
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
Auto glue?? what is it? Is it your code or its this: http://code.google.com/p/bullet/issues/detail?id=90 [code.google.com]
right,something like the example,just because I want to use bullet solver in DOP and hope can completely replace the rbdsolver,but I met some problem,
Did you implement your btCompoundShape function in your bullet SOP according to the google example?or you write the whole thing yourself?:?

so I am just implementing cloud computing, which solved this problem, or I hope so :? If it works, It will be great because you will be to able simulating very big waves on home hardware
cloud computing? you shocked me really! magic man!
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
oh_qxs
Did you implement your btCompoundShape function in your bullet SOP according to the google example?or you write the whole thing yourself?:?
Yes, I builded my system. I use only one function from btFractureBody and Its calculatePrincipalAxisTransform(…), which is really useful :!: .

cloud computing? you shocked me really! magic man!
I think that its only one way how to “cheat” less memory in GPU .
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2010
Offline
I think that its only one way how to “cheat” less memory in GPU .

hoho, “cheat”, May you succeed!
Have you ever tested about the multi_thread staff of bullet, does that feature work better or not in bullet comparing to GPU parallelism, Mmm…..curious :roll:
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
New version 0.993
- win64, linux64
- faster loading and sims

PS: we are testing GPU fluid on different hardware, so this version dont include fluids!!!

Attachments:
Bullet_v0_993.zip (1.5 MB)

https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
  • Quick Links