irrBullet 0.1.8 - Bullet physics wrapper
You didn't link libs in the right order, did you.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
alright solved. thanks.ent1ty wrote:You didn't link libs in the right order, did you.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
ent1ty wrote:cobra: thanks for the responses.
However, i am now facing a greater problem. If i e.g. push a barrel, and it falls on ground(it's laing on the floor), after some time it gets back into standing position. It appears as if the most of the weight is concentrated in the bottom of the barrel. For example golf carts in GTA: Vice City did this. When you crashed with them and the car landed on it's back, it would get on it's wheels after some time, because the roof of the cart was very light compared to chassis. Hope you understand what i mean. I have no idea what could the problem be.
It sounds to me like your mesh's center of gravity is at the bottom of it. In a mesh editor, move it to the center of the barrel. You'll have to re-position the barrels in the scene so they don't stick in the ground, assuming you placed them on it.
Also, I've been working a lot on softbodies, and irrBullet now has a nice softbody demo for the next release including ropes, clothes pinned and let go, softbody spheres, and aerodynamic clothes. It looks extremely nice.
Keep waiting for the next release!
is it possible to set the center of mass with code?
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Virion:
It is, but I forgot the function to do it. It is best if the center of gravity is changed in the mesh directly, though.
Anyway, updates on irrBullet 0.1.7 softbodies:
Get ready to add realism and interaction to your games as never before seen in the Irrlicht community!
Hundreds of softbodies, all simulated efficiently in real time.
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBody3.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero1.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero3.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero5.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBody1.png)
All previews:
http://www.skyreignsoftware.net16.net/I ... tBody1.png
http://www.skyreignsoftware.net16.net/I ... tBody2.png
http://www.skyreignsoftware.net16.net/I ... tBody3.png
http://www.skyreignsoftware.net16.net/I ... yAero1.png
http://www.skyreignsoftware.net16.net/I ... yAero2.png
http://www.skyreignsoftware.net16.net/I ... yAero3.png
http://www.skyreignsoftware.net16.net/I ... yAero4.png
http://www.skyreignsoftware.net16.net/I ... yAero5.png
Thanks for looking. Keep checking in for updates.
It is, but I forgot the function to do it. It is best if the center of gravity is changed in the mesh directly, though.
Anyway, updates on irrBullet 0.1.7 softbodies:
Get ready to add realism and interaction to your games as never before seen in the Irrlicht community!
Hundreds of softbodies, all simulated efficiently in real time.
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBody3.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero1.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero3.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBodyAero5.png)
![Image](http://www.skyreignsoftware.net16.net/Images/irrBullet/SoftBody/SoftBody1.png)
All previews:
http://www.skyreignsoftware.net16.net/I ... tBody1.png
http://www.skyreignsoftware.net16.net/I ... tBody2.png
http://www.skyreignsoftware.net16.net/I ... tBody3.png
http://www.skyreignsoftware.net16.net/I ... yAero1.png
http://www.skyreignsoftware.net16.net/I ... yAero2.png
http://www.skyreignsoftware.net16.net/I ... yAero3.png
http://www.skyreignsoftware.net16.net/I ... yAero4.png
http://www.skyreignsoftware.net16.net/I ... yAero5.png
Thanks for looking. Keep checking in for updates.
I thought it would be automatically taken from the center of the aabb?cobra wrote:It sounds to me like your mesh's center of gravity is at the bottom of it. In a mesh editor, move it to the center of the barrel. You'll have to re-position the barrels in the scene so they don't stick in the ground, assuming you placed them on it.
All right, it's just 2 models that are making trouble, so i will fix them in mesh editor.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
new demo looks cool. would love to watch it in motion though.
excellent.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Thanks, Virion.
I'll get a video of it when I am satisfied completely.
Also, here's some math about it:
For the top screenshot (16 large clothes, only 10 visible):
(10*10)(16) = 100 vertices for each cloth; 1,600 vertices
(3*3)(89) = 9 vertices for each paper; 738 vertices
2,338 softbody vertices beind simulated, taking anywhere from 2-4 milliseconds per frame to run the simulation and render (plus other mainloop code).
I'll get a video of it when I am satisfied completely.
Also, here's some math about it:
For the top screenshot (16 large clothes, only 10 visible):
(10*10)(16) = 100 vertices for each cloth; 1,600 vertices
(3*3)(89) = 9 vertices for each paper; 738 vertices
2,338 softbody vertices beind simulated, taking anywhere from 2-4 milliseconds per frame to run the simulation and render (plus other mainloop code).
Serengoer:
There were never any memory leaks in irrBullet itself (maybe in the first version).
Just that one demo that had old code in it that caused a leak. That's with the demo's old code, not irrBullet's code. I've also removed that old code from the demo.![Smile :)](./images/smilies/icon_smile.gif)
If there were any memory leaks, they'd be so small that only somebody using it for a Model 5150 IBM computer would worry.
There were never any memory leaks in irrBullet itself (maybe in the first version).
Just that one demo that had old code in it that caused a leak. That's with the demo's old code, not irrBullet's code. I've also removed that old code from the demo.
![Smile :)](./images/smilies/icon_smile.gif)
If there were any memory leaks, they'd be so small that only somebody using it for a Model 5150 IBM computer would worry.
Uhm... how can i raycast? The docu doesn't say anything about this...
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
ent1ty:
Right now you'll have to use internal Bullet raycast functions. You can find out how at several resources.
Then, when you get the object that was "hit" by the ray, you can do this:
And with the new ICollisionObject, you can begin interacting with it using irrBullet functions.
All Bullet rigid bodies (btRigidBody) created with irrBullet have an SCollisionObjectIdentification pointer stored as the user data.
As shown above, you can retrieve this data and then get the irrBullet pointer with a call to irrBulletWorld::getCollisionObjectByID() or getCollisionObjectByName() and give it SCollisionObjectIdentification::getName(), which returns an irr::core::stringc (irr::core::stringw in irrBullet < 0.1.7).
So, as you can see, using plain Bullet classes in cooperation with irrBullet is very easy with the irrBullet interface!
In irrBullet 0.1.7, soft bodies will also have this identification information, and there will be a raycast interface, so you can avoid this technique.
I am going to greatly improve and expand irrBullet documentation for 0.1.7.
There's just a lot to do for many things of mine, so it might take a while to get 0.1.7 ready for a release, since it's going to be a big release.
Thanks.
- Josiah
Right now you'll have to use internal Bullet raycast functions. You can find out how at several resources.
Then, when you get the object that was "hit" by the ray, you can do this:
Code: Select all
ICollisionObject* obj = world->getCollisionObjectByID(static_cast<SCollisionObjectIdentification*>(hitBody->getUserPointer())->ID);
All Bullet rigid bodies (btRigidBody) created with irrBullet have an SCollisionObjectIdentification pointer stored as the user data.
As shown above, you can retrieve this data and then get the irrBullet pointer with a call to irrBulletWorld::getCollisionObjectByID() or getCollisionObjectByName() and give it SCollisionObjectIdentification::getName(), which returns an irr::core::stringc (irr::core::stringw in irrBullet < 0.1.7).
So, as you can see, using plain Bullet classes in cooperation with irrBullet is very easy with the irrBullet interface!
In irrBullet 0.1.7, soft bodies will also have this identification information, and there will be a raycast interface, so you can avoid this technique.
I am going to greatly improve and expand irrBullet documentation for 0.1.7.
There's just a lot to do for many things of mine, so it might take a while to get 0.1.7 ready for a release, since it's going to be a big release.
Thanks.
- Josiah