Hm, maybe irrBP is using the 'using namespace' keyword, I should go talk to Zurzaza.hybrid wrote: If you don't use 'using namespace irr' somewhere, you cannot use core::vector3df but have to use irr::core::vector3df
But maybe some lib has a malformed header? At least Irtrlicht shouldn't have any using in the headers, besides those required for legacy compliance (might already be removed, though).
irrBullet 0.1.8 - Bullet physics wrapper
Working on game: Marrbles (Currently stopped).
I'm trying to set up irrBullet in Visual C++ Express but I can't seem to get it to work. I've had trouble with setting up things like this before in visual C++, but for irrLicht I managed to get things working in a different way:
I copied the Irrlicht.dll file to my system 32 folder.
I copied Irrlicht.exp and Irrlicht.lib to the visual studio folder: C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
I copied all the header files to C:\Program Files\Microsoft Visual Studio 10.0\VC\include\irrLicht
All I had to do then was to put
#include <irrlicht/irrlicht.h>
instead of
#include <irrlicht.h>
and I needed to put a pragma comment in my main.cpp file
#pragma comment(lib, "Irrlicht.lib")
That is how I got irrlicht working. But this method doesn't seem to work for irrBullet.
What I did:
no irrBullet.dll file so that wasn't necessary.
I copied the irrBullet.lib file from irrBullet-0.1.71\lib\win32_visualstudio\2010\Release to the visual studio lib folder (no .exp file)
I copied everything in the irrBullet-0.1.71\source folder to C:\Program Files\Microsoft Visual Studio 10.0\VC\include\irrBullet
I also copied the 'framework' folder of the examples to there
I made a new project and made a main.cpp helloworldexample.cpp and helloworldexample.h. Then I copied the code from the example files to my project. I then corrected some of the links (#include <irrBullet/irrBullet.h> instead of #include <irrBullet.h>)
And I added #pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "irrBullet.lib") to the main function. I must have done something completely wrong because the errors just kept piling up:
Then I tried to do it like it said in the ReadMe.doc file. But I don't understand steps 2.1 and 2.3
2.1 says I should include the following to the search directories of my project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
Where can I find these search directories? I followed the steps in the following blog post:
http://blogs.msdn.com/b/vsproject/archi ... ories.aspx
I see a lot of directories, but not a search directory. I assume I should put it in one of the other directories listed here, but which one? I'm afraid of just trying things out because I might mess up Visual studio.
step 2.3 says:
add these files to your linker (available in the libs/ folder):
libirrBullet.a, libbulletdynamics.a, libbulletsoftbody.a
libGIMPACTUtils.a (if you use GImpact),
liblinearmath.a, libbulletcollision.a
all I found in the irrBullet-0.1.71\lib\win32_visualstudio\2010\Release folder was irrBullet.lib
However in the irrBullet-0.1.71\lib\win32_gcc folder I found all the *.a files. So which should I include? and how do I do that?
Sorry, this is more a Visual studio question than an irrBullet question, but any help is very much appreciated!
I copied the Irrlicht.dll file to my system 32 folder.
I copied Irrlicht.exp and Irrlicht.lib to the visual studio folder: C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
I copied all the header files to C:\Program Files\Microsoft Visual Studio 10.0\VC\include\irrLicht
All I had to do then was to put
#include <irrlicht/irrlicht.h>
instead of
#include <irrlicht.h>
and I needed to put a pragma comment in my main.cpp file
#pragma comment(lib, "Irrlicht.lib")
That is how I got irrlicht working. But this method doesn't seem to work for irrBullet.
What I did:
no irrBullet.dll file so that wasn't necessary.
I copied the irrBullet.lib file from irrBullet-0.1.71\lib\win32_visualstudio\2010\Release to the visual studio lib folder (no .exp file)
I copied everything in the irrBullet-0.1.71\source folder to C:\Program Files\Microsoft Visual Studio 10.0\VC\include\irrBullet
I also copied the 'framework' folder of the examples to there
I made a new project and made a main.cpp helloworldexample.cpp and helloworldexample.h. Then I copied the code from the example files to my project. I then corrected some of the links (#include <irrBullet/irrBullet.h> instead of #include <irrBullet.h>)
And I added #pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "irrBullet.lib") to the main function. I must have done something completely wrong because the errors just kept piling up:
Then I tried to do it like it said in the ReadMe.doc file. But I don't understand steps 2.1 and 2.3
2.1 says I should include the following to the search directories of my project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
Where can I find these search directories? I followed the steps in the following blog post:
http://blogs.msdn.com/b/vsproject/archi ... ories.aspx
I see a lot of directories, but not a search directory. I assume I should put it in one of the other directories listed here, but which one? I'm afraid of just trying things out because I might mess up Visual studio.
step 2.3 says:
add these files to your linker (available in the libs/ folder):
libirrBullet.a, libbulletdynamics.a, libbulletsoftbody.a
libGIMPACTUtils.a (if you use GImpact),
liblinearmath.a, libbulletcollision.a
all I found in the irrBullet-0.1.71\lib\win32_visualstudio\2010\Release folder was irrBullet.lib
However in the irrBullet-0.1.71\lib\win32_gcc folder I found all the *.a files. So which should I include? and how do I do that?
Sorry, this is more a Visual studio question than an irrBullet question, but any help is very much appreciated!
Don't do it, ever. When you'll rebuild irrlicht.dll and forget to replace it you may get into big troubles finding where your problem is.I copied the Irrlicht.dll file to my system 32 folder.
Seriously, why on earth are you copying everything?I copied Irrlicht.exp and Irrlicht.lib to the visual studio folder: C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
I copied all the header files to C:\Program Files\Microsoft Visual Studio 10.0\VC\include\irrLicht
Theres an option to link libraries, which is way more convenient than copying it over and over again when you rebuild it.
Erm, I'm sure you're missing original bullet library which you must have in order to get irrbullet working, and you should include .lib files since you're using msvc.all I found in the irrBullet-0.1.71\lib\win32_visualstudio\2010\Release folder was irrBullet.lib
However in the irrBullet-0.1.71\lib\win32_gcc folder I found all the *.a files. So which should I include? and how do I do that?
I don't remember msvc stuff, so I can't help you with includes, and search paths, but these all should be somewhere in options I guess.
Working on game: Marrbles (Currently stopped).
And when you need just copy irrlicht.dll where your executable is, tough when you run it from msvc it could fail, because some IDE's set up different working directories, so you should check it out and copy your dll too when you want it to run from msvc. But I don't know if msvc does that.RobinvK wrote:Oh, didn't know that! This is how someone at cplusplus.com told me to do it.
I'll first try to set up irrlicht by linking to the files then.
Working on game: Marrbles (Currently stopped).
EDIT: problems resolved! Thanks to Cobra & the irrlicht chat
I'll recap how it was solved in case someone else might encounter the same problems in the future:
This is how I got the Hello World example to work:
My first mistake was not installing Bullet itself (really stupid ) So do that first. I recommend you follow these steps:
First get the Hello World example of Bullet to work.
Then get this to work:http://irrlicht.sourceforge.net/phpBB2/ ... 918#223918
Now you can try to get the Hello World example of irrBullet to work.
Then I made some mistakes by executing the steps in the readme file of irrBullet.
The readme file says:
Now you have the 3 folders mentioned above. They are found in the irrBullet folder.
That was pretty straightforward, but you need to do the exact same thing again, but now for the Release configuration. on the main screen of the project you see a green 'play' arrow you can click on to start debugging. Next to it is the word 'Debug', change that to Release and redo the above.
Step 2.2 was already done in the hello world example code
Last step:
These files can be found in the irrBullet-0.1.71\lib\win32_visualstudio\2008 folder
Include them by going to the property pages again, then under C/C++ go to Linker/Input you must include the lib files next to the Additional Dependencies by adding them like this: BulletSoftBody.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;
You probably have to do this for both debug and release mode, but I did this entire step differently. I put the following in the main.cpp function of my project:
And thats it, it works. I still have 41 warnings, but no errors and it runs perfectly fine
I got the Hello World example of Bullet working without a problem now. Only thing I added to it was this:
(This is the same as adding the files to the linker, right?)
I don't seem to be able to get the irrBullet Hello world example to work though. I created a new project, made a main.cpp helloworldexample.cpp and helloworldexample.h file and copied the code from the examples to it. I also copied the exampleframework folder to my project folder and I added the following to the main.cpp file:
Now I get 8 warnings and 19 errors:
full size image:
http://postimage.org/image/33p3hxrb8/full/
I have no idea what these errors mean, but it's probably because I did something wrong in step 2.1:
[/size]
I'll recap how it was solved in case someone else might encounter the same problems in the future:
This is how I got the Hello World example to work:
My first mistake was not installing Bullet itself (really stupid ) So do that first. I recommend you follow these steps:
First get the Hello World example of Bullet to work.
Then get this to work:http://irrlicht.sourceforge.net/phpBB2/ ... 918#223918
Now you can try to get the Hello World example of irrBullet to work.
Then I made some mistakes by executing the steps in the readme file of irrBullet.
The readme file says:
In visual studio 2010 this is done by going to the property pages. Then expanding the C/C++ option in the menu and clicking the General option in the menu. The first parameter is Additional Include Directories. Click on the empty field and on the arrow that appears. Then click <edit>2.1. Add these search directories to your project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
Now you have the 3 folders mentioned above. They are found in the irrBullet folder.
That was pretty straightforward, but you need to do the exact same thing again, but now for the Release configuration. on the main screen of the project you see a green 'play' arrow you can click on to start debugging. Next to it is the word 'Debug', change that to Release and redo the above.
Step 2.2 was already done in the hello world example code
Last step:
Code: Select all
2.3. add these files to your linker (available in the libs/ folder):
libirrBullet.a, libbulletdynamics.a, libbulletsoftbody.a
libGIMPACTUtils.a (if you use GImpact),
liblinearmath.a, libbulletcollision.a
Make sure the linker files are in that order for irrBullet
or your project will not compile.
Include them by going to the property pages again, then under C/C++ go to Linker/Input you must include the lib files next to the Additional Dependencies by adding them like this: BulletSoftBody.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;
You probably have to do this for both debug and release mode, but I did this entire step differently. I put the following in the main.cpp function of my project:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
#pragma comment(lib, "Irrlicht.lib")
I got the Hello World example of Bullet working without a problem now. Only thing I added to it was this:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
I don't seem to be able to get the irrBullet Hello world example to work though. I created a new project, made a main.cpp helloworldexample.cpp and helloworldexample.h file and copied the code from the examples to it. I also copied the exampleframework folder to my project folder and I added the following to the main.cpp file:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
#pragma comment(lib, "Irrlicht.lib")
full size image:
http://postimage.org/image/33p3hxrb8/full/
I have no idea what these errors mean, but it's probably because I did something wrong in step 2.1:
How should I do this step in visual studio 2010?2.1. Add these search directories to your project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
[/size]
Somehow the precompiled win32 gcc version did'nt work for me in Eclipse.
There where still some absolute paths in them ?
So I compiled Bullet 2.78 and irrBullet 0.1.71 for gcc (MinGW)
If anyone needs them here it is: http://www.megaupload.com/?d=DM1DSV7P
Edit:
And also Linux precompiled Bullet and irrBullet (GCC): http://www.megaupload.com/?d=X6DM3ITU
Might be usefull to anyone.
There where still some absolute paths in them ?
So I compiled Bullet 2.78 and irrBullet 0.1.71 for gcc (MinGW)
If anyone needs them here it is: http://www.megaupload.com/?d=DM1DSV7P
Edit:
And also Linux precompiled Bullet and irrBullet (GCC): http://www.megaupload.com/?d=X6DM3ITU
Might be usefull to anyone.
Strange things happen when I modify hello world example, add collision from collision example and change the level from ground into a room static trimesh. First there's tunelling(cubes go thru some places, but won't like 3 pixels to the right or left). Second, if I check the shoot cube collision with the level it collides even inside of it, while my player controller doesn't(it's ok). This is strange, since I am shooting cubes and seeing them delete instantly(and yes, I've tried flying up the level and shoot the cube down, it deletes even hitting so-looking empty space in the room, seems like it checks bounding box not tris, but for player it's tris, and for no collision check it's also tris for the cubes and spheres... ).. Is there any step I have missed?
We have included Irrbullet in our project to do the physics for our vehicles / objects.
I added wheels to the vehicle and can drive it around but its really jumpy / bumpy even when standing still.
Can somebody tell me how to tweak the wheel settings of irrbullet to have my vehicles drive more realistic??
I added wheels to the vehicle and can drive it around but its really jumpy / bumpy even when standing still.
Can somebody tell me how to tweak the wheel settings of irrbullet to have my vehicles drive more realistic??
-
- Posts: 17
- Joined: Fri Jan 29, 2010 8:54 am
- Contact:
irrbullet video on win32 system and Irrlicht 1.7.2
Hi there!
Cobra, you made an eccellent work with irrbullet !!!
In these days I've compiled some examples using your irrbullet but found some problems to fit it in a win32 system and MinGW.
I had to recompile bullet 2.78 and then link irrbullet....but finally I've managed to see some....results.
Here they are:
http://www.youtube.com/watch?v=ScniyBdEUlE
The source loads an irr scene file, applies collisions and phisics and manage to shoot balls and boxes (what a fantasy....).
If you like I can provide:
1) some instructions about use irrbullet on win32 + MinGW
2) the source if you want to include it in your "bin" distribution (if you like to).
Long live and prosper
silver.slade
Cobra, you made an eccellent work with irrbullet !!!
In these days I've compiled some examples using your irrbullet but found some problems to fit it in a win32 system and MinGW.
I had to recompile bullet 2.78 and then link irrbullet....but finally I've managed to see some....results.
Here they are:
http://www.youtube.com/watch?v=ScniyBdEUlE
The source loads an irr scene file, applies collisions and phisics and manage to shoot balls and boxes (what a fantasy....).
If you like I can provide:
1) some instructions about use irrbullet on win32 + MinGW
2) the source if you want to include it in your "bin" distribution (if you like to).
Long live and prosper
silver.slade
Murloc992:
Box shapes tunnel quite easily because there is less geometry to measure penetration. You can experiment with the CCD values to minimize tunneling (IRigidBody::setCCDValues()).
As for the collision callback, you have to check the length of the collisions. See the irrBullet FAQ for more information. If you don't check the length, then it is the penetration of the object's AABB.
mrdoubleb:
It seems that you need to change the scale of your world. It's probably too small or too large for accurate simulation. Also, make sure your vehicle isn't on a massive surface. Try subdividing the level geometry a few times to see if it helps.
silver.slide:
Thank you. That is an excellent example of irrBullet's liquid emulator! I already did an example to read from a .irr file (just because people often ask how to do it), and there's already a water example. Moreover, I'd have to include the Realistic Water Scene Node's code, and I try to keep out unnecessary dependencies. However, you could always provide the source in the Code Snippets section of this forum or post a link in this thread.
Thanks for the offer.
- Josiah
Box shapes tunnel quite easily because there is less geometry to measure penetration. You can experiment with the CCD values to minimize tunneling (IRigidBody::setCCDValues()).
As for the collision callback, you have to check the length of the collisions. See the irrBullet FAQ for more information. If you don't check the length, then it is the penetration of the object's AABB.
mrdoubleb:
It seems that you need to change the scale of your world. It's probably too small or too large for accurate simulation. Also, make sure your vehicle isn't on a massive surface. Try subdividing the level geometry a few times to see if it helps.
silver.slide:
Thank you. That is an excellent example of irrBullet's liquid emulator! I already did an example to read from a .irr file (just because people often ask how to do it), and there's already a water example. Moreover, I'd have to include the Realistic Water Scene Node's code, and I try to keep out unnecessary dependencies. However, you could always provide the source in the Code Snippets section of this forum or post a link in this thread.
Thanks for the offer.
- Josiah
-
- Posts: 13
- Joined: Fri Mar 18, 2011 7:55 pm
- Location: 219
If irrBulet doesn't have some automatic way to do it, you should just get all nodes in scene after irr file is loaded and apply physics on them based on what type of node it is.DawsonXB360 wrote:Cobra or silver.slade. Could either of you perhaps send me some source code showing how to load a .irr file and apply collision, I'm having a little trouble with it myself.
Working on game: Marrbles (Currently stopped).