bullet irrlicht demo

A forum to store posts deemed exceptionally wise and useful
pixeljunky
Posts: 19
Joined: Sun Feb 25, 2007 1:31 pm

Post by pixeljunky »

Looks great !

It is the best to use Bullet for physics because it
is licensed with the same zlib license.

Other licenses make always trouble.

pixeljunky
Jacky_J
Posts: 55
Joined: Fri Apr 27, 2007 5:01 am

Post by Jacky_J »

erwincoumans wrote:This great tutorial should indeed go into the tutorial links for Irrlicht, anyone knows who to contact for this?

Just curious: how hard would it be to add real-time shadows?

Thanks,
Erwin
Probably not hard. I've never done shadows in irrlicht but i'm sure it would be trivial. However, i believe that's outside the scope of this tutorial.
wuallen
Posts: 67
Joined: Thu Jan 25, 2007 3:07 am
Location: Shanghai

Post by wuallen »

I hate the shadow issue in irrlicht. I think there should be mature and practical solution for the shadow. We should not just sit and wait.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

*Looks around confused* What is this issue you speak of?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
squisher
Competition winner
Posts: 91
Joined: Sat May 17, 2008 2:23 am
Contact:

Post by squisher »

Thank you for this. An open-source, concise working demo/tutorial is a rare gem.
Karl
Posts: 1
Joined: Mon Jul 28, 2008 4:55 pm

Post by Karl »

Hi all!
Thanks for this code/tutorial!
I tried to compile this under linux (bullet-2.70-beta3 + irrlicht-1.4.1 compiled and installed on ubuntu 8.10):

Code: Select all

g++ -I/usr/local/include/ -I/usr/local/include/bullet/ main.cpp -o test -L/usr/local/lib -lbulletmath -lbulletcollision -lbulletdynamics -lIrrlicht -lGL -lXxf86vm -lXext -lX11
but I only get this ugly error:

Code: Select all

/tmp/ccToprN7.o: In function `CreateSphere(btVector3 const&, float, float)':
main.cpp:(.text+0x742): undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&, float, float, float, float)'
/tmp/ccToprN7.o: In function `CreateBox(btVector3 const&, irr::core::vector3d<float> const&, float)':
main.cpp:(.text+0xabd): undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&, float, float, float, float)'
/tmp/ccToprN7.o: In function `main':
main.cpp:(.text+0xd53): undefined reference to `btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btStackAlloc*, btPoolAllocator*, btPoolAllocator*)'
/usr/local/lib/libbulletdynamics.a(btSequentialImpulseConstraintSolver.o): In function `btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject**, int, btPersistentManifold**, int, btTypedConstraint**, int, btContactSolverInfo const&, btIDebugDraw*, btStackAlloc*, btDispatcher*)':
btSequentialImpulseConstraintSolver.cpp:(.text+0x2096): undefined reference to `CProfileManager::Start_Profile(char const*)'
btSequentialImpulseConstraintSolver.cpp:(.text+0x2140): undefined reference to `CProfileManager::Stop_Profile()'
[a lot of..]
Could you help me.. is-it only a linking error?
a linking lib sequence error?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, only linking error. Could be a linking order bug, you have to check where the symbols are defined. If you use .so files there's no problem with linking order, only for .a libraries. However, at least CProfileManager looks like your own class!
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

Post by go »

good! I can compile this sourcecode Irrlicht 1.4.2 and bullet 2.7.2 vc2008 condition.

but you may not compile zip folder project. so you have to compile the sourcecode only.

I think this is good tutorial but people may want to some more complicated object's tutorial. so I may make it...
ChrisC
Posts: 37
Joined: Sun Dec 03, 2006 6:47 am

Post by ChrisC »

I had to change

#include <irrlicht/irrlicht.h>
to
#include <irrlicht.h>

I made a simple makefile for linux hope someone finds it useful

Code: Select all


FLAGS=`pkg-config bullet --cflags --libs` \
	-L../irrlicht-1.4.2/lib/Linux -lIrrlicht \
	-I../irrlicht-1.4.2/include -lGL -lXxf86vm

main: main.cpp
	g++ -o main main.cpp $(FLAGS)

Its nice to see a simple straight forward example that just works!
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Post by IrrNoob »

Jacky_J wrote:
trixs wrote:I just had to let you know that this is EXTREMELY helpful.

An actual working simple example! That seems to be odd around here.
Thanks. I completely agree with you. Bullet doesn't have the best documentation/examples. There's another bullet/irrlicht demo floating around that's outdated and not really set up in a tutorial fashion.

One thing that i should have done in this tutorial is load terrain/mesh from a file. But with the links i provided above it should get you in the right direction.
Jacky_J, I've been trying to integrate physics into my irrlicht project for some time. Your irrtest.cpp example is the only thing I have been able to compile, even though i get 46 warnings.

Would you be willing to do an updated irrtest.cpp for Irrlicht 1.5 with the mesh and terrain loading features? Also, A vehical example would help alot too.
Thanks. :)

If you where to set up a compressed file with many examples for Irrlicht or even setup a website with tutorials I would be willing to donate some money to the cause :D
Sard
Posts: 8
Joined: Tue Dec 09, 2008 1:19 pm

Post by Sard »

I'm trying to compile the code, but I'm getting a huge bunch of linker errors even though the libraries are there and header files aswell, I managed to get rid of the header file errors, but the libraries are still causing problems. I'm tried pretty much everything excluding forgetting the whole thing.

Anyone know a neat way through?
Jacky_J
Posts: 55
Joined: Fri Apr 27, 2007 5:01 am

Post by Jacky_J »

For people getting compiling errors, i recommend cleaning out your VisualStudio include/linker paths:

Tools -> Options -> Projects and Solutions -> VC++ Directories

Then click the "Show directories for:" dropdown and find Include Files. Get rid of anything relating to irrlicht. Do the same for Library Files.

irrtest.zip is a self-contained zip file, meaning you literally double click the project and compile without any hassle. If you get errors you probably have other libraries intervening.

Also, you shouldn't have to mess with the includes. #include <irrlicht/irrlicht.h> is correct because the include path is set in the project. This assumes of course you are using Visual Studio.

Most of the code should be compatible with later versions of bullet and irrlicht. Maybe i'll create a new example with more advanced topics if i'm not too lazy.
Sard
Posts: 8
Joined: Tue Dec 09, 2008 1:19 pm

Post by Sard »

Got to admit that I'm an idiot -.-

It does compile and it does what it's supposed to do the error was between the screen and the back of the chair. I'm still somewhat getting used to visual studio and when it did work, I just managed to skip the part of me noticin it working.
jeti
Posts: 1
Joined: Thu Sep 02, 2010 11:39 pm

Post by jeti »

Hi,

For everyone who wants to get the example running with the current irrlicht and bullet
versions, here is what I remember ....

Change the device creation to:

Code: Select all

irrDevice = createDevice( video::EDT_OPENGL, dimension2du(800, 600), 32,false, false, false, &Receiver);
and replace btPoint3 with btVector3

I needed to add lXcursor for linking and some other stuff.
My Makefile looks like that:

Code: Select all

FLAGS=\
	-L/home/jeti/3333/irrlicht/trunk/lib/Linux -lIrrlicht \
	-I/home/jeti/3333/irrlicht/trunk/include -lGL -lXxf86vm -lXcursor\
	-L/home/jeti/bullet/build/src \
	-I/home/jeti/bullet/src \
	-L/home/jeti/bullet/build/src/BulletSoftBody -L/home/jeti/bullet/build/src/BulletDynamics -L/home/jeti/bullet/build/src/BulletCollision -L/home/jeti/bullet/build/src/LinearMath -Wl,-Bstatic -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath  -lGLU -Wl,-Bdynamic  -lpthread -lGL -ljpeg -lpng 

main : main.cpp
	g++ -o main main.cpp $(FLAGS) 
some stuff might be unnecessary...

Move the binary into the 'working' folder or adjust the media paths.


maybe that helped someone!

jan
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Thanks Ill have a look at it.
Jacky_J is IrrLamb your game? looks cool 8)
Working on game: Marrbles (Currently stopped).
Post Reply