irrBullet 0.1.8 - Bullet physics wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

irrBullet 0.1.65 Release

0.1.65 is a relatively light-weight release compared to 0.1.6 in the way that this time I did not include pre-built examples and such.

It also doesn't have pre-built irrBullet libs for MSVC (Due to the implementation of ISoftBody, which will be fixed in future versions. sorry MSVC users!).

However, it does have pre-built Bullet 2.75 libs for MSVC 2010.

This version includes some fixes and new features (among the largest, soft bodies, which is still infantile in its current state), as well as some extra (a tracer scene node I wrote for my simulator that uses irrBullet; simple yet effective).

This is, more or less, a sort of filler release to hold people off until 0.1.7, which is the next big release. It will have many new features, as well as largely improved documentation. It might take a little longer to reach a presentable form, though.

Moreover, irrBullet now has better Linux support. I managed to fix all (perhaps missed one or two) the compiler errors for most Linux users.

I really thank the community for the support they've given to me and the irrBullet project. It has been of immeasurable importance.

Enjoy, and be sure to leave feedback! Videos and screenshots help the cause.

- Josiah
Josiah Hartzell
Image
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

If this won't compile for you and the error is something about missing include files map.h and vector.h, just go to source/softbody.h and find lines

#include <Map.h>
#include <vector.h>

now just get rid of the .h postfix and it should compile :wink:
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!
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post by d3jake »

Are you sure it's "Map" and not "map"? It seems like a minor difference but on Linux those are considered two different files.
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

d3jake wrote:Are you sure it's "Map" and not "map"? It seems like a minor difference but on Linux those are considered two different files.
i have no idea :)
but its only two options, cant take too long to try them out.
anyways, Map works for me, on win
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!
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

d3jake: That doesn't matter on Windows.

ent1ty: Thanks! I'm so used to GCC that I don't know how MSVC handles these things. Since it's a simple fix, I'll let it go until the next release.
Josiah Hartzell
Image
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

umm... actually i use GCC too. Don't you have some older release?
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!
Mani2010
Posts: 107
Joined: Sat Jan 16, 2010 4:35 pm
Location: London,UK
Contact:

Post by Mani2010 »

@Cobra

About the assert on page 3, i am on win xp service pack 3 and am using visual studio 2008
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

ent1ty: I have the latest MinGW GCC.

Mani2010: Answer these questions, please:

- Does it do it in other, simpler examples?
- Are you using a triangle mesh shape or another shape?
- If yes, what kind of mesh data are you giving to the triangle mesh shape?

Also a snippet of the code that you wrote that gets this assert would help immensely.

Update on next release: I fixed the raycast vehicle's problem where it wouldn't work with collision filters on. What I did was I wrote my own vehicle raycaster that inherits from btVehicleRaycaster and allowed collision masking and groups. It also has functions to set the group and mask of each raycast vehicle's raycaster.

I also added functions to allow custom raycasters to be used.
Josiah Hartzell
Image
Mani2010
Posts: 107
Joined: Sat Jan 16, 2010 4:35 pm
Location: London,UK
Contact:

Post by Mani2010 »

@cobra

1) just creating the bullet world and adding a cude? no it doesn't
2) triangle mesh
3) not sure, see the code below

This is the code i am using, thats all of it its very basic, always get that assert.

Code: Select all

void CIntroScene::Init()
{
    ////////////////////////////
    // Create irrBullet World //
    ////////////////////////////
    world = createIrrBulletWorld(g_pApp->GetIrrDevice(), true, false);
    world->setDebugMode(EPDM_DrawAabb | EPDM_DrawContactPoints);
    world->setGravity(vector3df(0,-10,0));

     // Create a static triangle mesh object
	IMeshSceneNode *Node = g_pApp->GetSceneManager()->addMeshSceneNode(g_pApp->GetSceneManager()->getMesh("terrainMain.b3d")->getMesh(0));
    Node->setPosition(vector3df(0,0,0));
    Node->setMaterialFlag(video::EMF_LIGHTING, false);
    Node->getMesh()->setHardwareMappingHint(EHM_STATIC);

    // For the terrain, instead of adding a cube or sphere shape, we are going to
    // add a BvhTriangleMeshShape. This is the standard trimesh shape
    // for static objects. The first parameter is of course the node to control,
    // the second parameter is the collision mesh, incase you want a low-poly collision mesh,
    // and the third parameter is the mass.
	ICollisionShape *shape = new IBvhTriangleMeshShape(Node, g_pApp->GetSceneManager()->getMesh("terrainMain.b3d"), 0.0);

    shape->setMargin(0.07);

    // The rigid body will be placed at the origin of the node that the collision shape is controlling,
    // so we do not need to set the position of the rigid body after creating it.
    IRigidBody *terrain = world->addRigidBody(shape);
    terrain->setGravity(vector3df(0,0,0));


    // This will scale both the collision object and the scene node it controls.
    shape->setLocalScaling(vector3df(4,4,4), ESP_BOTH);




    // When setting a rigid body to a static object, please be sure that you have
    // that object's mass set to 0.0. Otherwise, undesired results will occur.
    terrain->setCollisionFlags(ECF_STATIC_OBJECT);


	TimeStamp = g_pApp->GetIrrDevice()->getTimer()->getTime();
}

void CIntroScene::Update()
{
	DeltaTime = g_pApp->GetIrrDevice()->getTimer()->getTime() - TimeStamp;
    TimeStamp = g_pApp->GetIrrDevice()->getTimer()->getTime();

    // Step the simulation with our delta time
    world->stepSimulation(DeltaTime*0.001f, 120);

    // Draw the 3d debugging data.
    world->debugDrawWorld(true);

    // This call will draw the technical properties of the physics simulation
    // to the GUI environment.
    world->debugDrawProperties(true);
}
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Mani2010: I haven't thoroughly tested irrBullet or Bullet with Visual Studio 2008 or 2010. I can't really help as I would like to since I usually use MinGW GCC.

Maybe you could make up a test case and upload it, and somebody who uses irrBullet more with VS can help you out.

Sorry.

Since this seems to be Bullet-related and not irrBullet, you can try some of these threads and search more for yourself in the Bullet forums:

http://www.bulletphysics.org/Bullet/php ... &view=next
http://www.bulletphysics.org/Bullet/php ... f=9&t=2401
Josiah Hartzell
Image
Mani2010
Posts: 107
Joined: Sat Jan 16, 2010 4:35 pm
Location: London,UK
Contact:

Post by Mani2010 »

will have a look through those threads and post on Bullet forums.
If anyone else reading this has had the same issue in VS2008 and solved it, please post the solution here
grumpymonkey
Posts: 222
Joined: Mon Jan 19, 2009 10:03 pm
Location: Miami, Florida
Contact:

Post by grumpymonkey »

I get 1 unresolved external when trying to compile an application with it on msvc express 2010(2008 also btw)
1>------ Build started: Project: MyProject, Configuration: Release Win32 ------
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall irrBulletWorld::irrBulletWorld(class irr::IrrlichtDevice * const,bool,bool)" (??0irrBulletWorld@@QAE@QAVIrrlichtDevice@irr@@_N1@Z)
1>C:\Users\Alex\documents\visual studio 2010\Projects\MyProject\Release\MyProject.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I added the include directories:
"*irb\include"
"*irb\include\bheaders"
"*irb\include\bheaders\Bullet"

And library directories
"*irb\libs\"
"*irb\libs\Release"

And I linked to these libs:
"libirrBullet.a
libbulletdynamics.a
libbulletsoftbody.a
libGIMPACTUtils.a
libbulletmath.a
libbulletcollision.a"

but I keep getting that error
Image
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

grumpmonkey: I don't think MSVC will work with .a libraries. You have to build irrBullet and Bullet yourself using MSVC, then link against those that you built.

0.1.7 will include pre-built MSVC libraries, so you will just be able to use those in the future. :)
Josiah Hartzell
Image
grumpymonkey
Posts: 222
Joined: Mon Jan 19, 2009 10:03 pm
Location: Miami, Florida
Contact:

Post by grumpymonkey »

Ok I tried building it from the source, but it says its missing irrbullet_compile_config.h, where is it, or how do you make that file?
Image
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Hi. You are using 0.1.65, right?
If you are, those files will be in irrBullet's source folder.

I removed the include folder for this release; it wasn't needed.
Josiah Hartzell
Image
Post Reply