Page 10 of 31

Re: Problem compiling

Posted: Thu Dec 16, 2010 8:54 pm
by Birdman
cobra wrote: Change map.h to just map, and vector.h to just vector.
This is already fixed for 0.1.7, which will be out by January 5th.
Its fixed now!, i did a forum find for vector.h and found nothing, thast why i asked.
Thanks for your time!

Posted: Fri Dec 17, 2010 3:49 am
by cobra
You're welcome. I'm glad I could help. :)

Posted: Sun Jan 09, 2011 8:56 pm
by cobra
Hi all.

Due to a couple family emergencies since Christmas, I didn't get to use any of my vacation for working on software, so my release date for irrBullet has been delayed until next weekend, either Saturday or Sunday.

The next release is big and it has some neat features, so make sure you keep checking in to see if it's released.

Thanks.

- Josiah

Posted: Sun Jan 09, 2011 10:02 pm
by jorgerosa
Thankyou for your efforts cobra, your work is really impressive. Was easy to me to add physics to my projects, even for a newbie like me.

Posted: Fri Jan 14, 2011 11:34 pm
by Dark Dragon DX
jorgerosa wrote:Thankyou for your efforts cobra, your work is really impressive. Was easy to me to add physics to my projects, even for a newbie like me.
Hey, its Vector from the IRC. I have finally managed to get Bullet working with that irrBullet you sent me and it works nicely. However, there appears to be an issue with the IGImpactMeshShape when you use it on a non-static object (an object with a mass that is not 0). The object will fall freely through open space just fine, but when it collides with any object in the scene, there is a noticeable FPS drop. That's not the problem however, when it lands on a flat surface and begins to settle, it causes an incredible amount of lag that drops the FPS to nearly 0. I have tried changing the model to everything I have sitting around (Suit case, cars, tables, everything). All of the models cause the same FPS drop.

Image

(Yes, that's a really small chair from Dark Basic, but no matter the scale, rotation or model, the FPS drops to 1)

Posted: Sat Jan 15, 2011 5:47 pm
by cobra
Hi Vector. I'll need to see the code you use for this scene and you'll have to tell me what collision shape type you are using for the level.


If you have GImpact shapes for both the chair and the level, this is not good and you need to change the level mesh to the BVH shape.

GImpact mesh shapes are used for dynamic rigid bodies, where BVH shapes are used for static mesh objects.

Posted: Sun Jan 16, 2011 11:34 pm
by Dark Dragon DX
I'm using the IBvhTriangleMeshShape now and the GIMPACT shapes are only getting stuck inside of the castle when the castle's mass is set to 0. When I set its mass to anything above, the castle simply falls to its doom in the infinite void. I tried setting the gravity on the castle to vector3df(0,0,0) but it only started falling when something collided with it. And its still causing the epic lag spike ...

Edit:

Solved that, its just now that my shapes still cause a small amount of lag on collision with the castle. Anyway, I don't need anymore help. The extra lag is caused by the model itself. I guess Dark Basic models are not made to be used with physics.

Posted: Mon Jan 17, 2011 3:25 am
by cobra
irrBullet 0.1.7 is now available!


What's new?
0.1.7 (NEW; STABLE):
The most anticipated irrBullet release is now out!

0.1.7 is the largest release since 0.1.4.

irrBullet now has Microsoft Visual C++ 2008 and 2010 support, as well as a few new examples, and many advanced features that will give your Irrlicht project the best physics currently available, and in much less development time than other ways.

irrBullet 0.1.7 also includes an attraction affector (which can be used as a repulsion affector as well) and a new object called ILiquidBody.

ILiquidBody is an AABB-based liquid emulator for games.
It can either be fully AABB, infinite on the X and Z axis, and have finite or infinite depth.

Every object is affected by the liquid (unless the buoyancy is set to zero).

Refer to the liquid body example to learn how to use this feature.

As for the many other features, you'll just have to try them out and see what they can do!


Latest changes:
irrBullet 0.1.7 Release:
Added: IRaycastVehicle constructor and irrBulletWorld::addRaycastVehicle() changed to allow custom vehicle raycaster to be given as a parameter
Added: class IVehicleRaycaster; IRaycastVehicle now uses this improved raycaster that allows for collision masking and collision groups; also added IRaycastVehicle::getVehicleRaycaster() and getVehicleRaycasterCustom()
Added: setUnscaledRadius() and getRadius() to ISphereShape
Added: irrBulletWorld::removeRaycastVehicle()
Added: IRigidBody::setVehicleReference() and getVehicleReference; When a vehicle reference is set, the vehicle will be removed when the rigid body is removed.
Added: Collision example
Improved: now no new btTransform instance is created inside IRigidBody::setWorldTransform()
Changed: move setWorldTransform() and getWorldTransform() from IRigidBody to ICollisionObject
Fixed: ISoftBody::updateSoftBody() now actually positions the scene node it controls, as well as the vertices
Fixed: now soft bodies take the initial transformation of the node which they control on creation
Improved: now ISoftBody and IRigidBody constructors do not create new matrices; removed startPosition from SRigidBodyConstructionInfo
Fixed: in irrBulletWorld's destructor, it removed every other rigid body
Fixed: crash in ICollisionObject destructor when the object is a softbody
Changed: added parameter for motion threshold in ICollisionObject::applyCalculatedCcdValues()
Changed: moved getCollisionShape(), setCollisionShape(), and ICollisionShape property to IRigidBody instead of ICollisionObject
Changed: ICollisionObject::setWorldTransform() now supports softbodies
Added: SSoftBodyConfiguration struct to hold softbody configuration
Added: ISoftBody::getConfiguration() (return reference) and updateConfiguration()
Added: ISoftBody::setScale() and getScale()
Added: irrBulletWorld::getIrrlichtDevice() returns pointer to Irrlicht device
Added: irrBulletWorld::getDebugMaterial() returns SMaterial&
Added: ICollisionObjectAffectorAttract
Improved: ICollisionCallbackInformation::getBody0() and getBody1()
Removed: IAttributes property from SWheelInfo struct
Changed: common.h to irrbulletcommon.h to avoid conflicts with includes of other libraries
Fixed: small bug in irrBulletWorld::debugDrawProperties() where displayed total number of objects was not the correct number (only sleeping or active were accounted for, not other activation states)
Fixed: crash in ICollisionObjectAffectorAttact::affectObject() when the affected object was a softbody
Added: ICollisionObjectAffectorBuoyancy to simulate objects floating in liquid
Added: debug-drawing settings in ICollisionObjectAffector
Added: ISoftBody::addCollisionMode(), removeCollisionMode(), and generateClusters()
Changed: updated SCollisionObjectIdentification to hold an ICollisionObject pointer, not an object ID
Added: ILiquidBody to emulate a body of liquid
Added: LiquidBody example
API CHANGE (internal): renamed IMotionState::setObject() to IMotionState::setRigidBody() and changed property ICollisionObject to type IRigidBody
Added: IRigidBody::setDebugWaterBox() and updateWaterBox()
Changed: cleaned up and optimized all code (where found/possible)
Added: IMotionState::getWorldTransformationMatrix() to return an Irrlicht matrix4 with the interpolated Bullet rigidbody transform
Changed: All irrBullet demos updated
Changed: Bullet 2.77 is now included with irrBullet
Added: SRaycastInfo struct added and included as a public property in SWheelInfo
Added: Affectors example
Added: MSVC 2008 and 2010 support (project files and pre-built binaries)
Changed: updated Doxygen documentation
Added: FAQ manual
Upon downloading irrBullet, be sure to read the Doxygen documentation, readme.txt, and refer to the FAQ list before asking any questions.

Please read the first post for more information and the download link.

Posted: Wed Jan 19, 2011 7:07 am
by cobra
Update:

A very important problem in IRigidBody from the original 0.1.7 release was fixed and the SDK re-uploaded, so anyone who downloaded it (there are 26 downloads at the time of me writing this) must re-download the SDK for the fixed version. It is strongly recommended that you update your irrBullet to avoid problems.


Sorry about this.

Posted: Wed Jan 19, 2011 10:33 am
by SethRobinson
Hey Cobra, nice job with IrrBullet.

I was able to build everything and run the examples using MSVC 2005 ok.

Here are some notes:

The Raycast Tank example crashed when running it.

The problem is on ANY event the following code was being run in CRaycastTankExample::OnEvent:

Code: Select all

KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
This was overwriting illegal memory when KeyInput.Key was set to an out of bounds index causing memory corruption.

To fix, move this down in the code so it's only run if the event is EET_KEY_INPUT_EVENT, so it isn't run on every kind of message, including those that aren't keyboard events.

Second, MSVC reported 20 or so little memory leaks in the raycast tank example that can be fixed by adding:

Code: Select all

if (attributes)
		attributes->drop();
To the end of IRaycastVehicle::~IRaycastVehicle().

Third, the collision example needed me to add #include <time.h> to collisionexample.cpp for MSVC to accept the srand ( time(NULL) ); statement.
(there are 26 downloads at the time of me writing this)
Hey, one of those was me! :) Thanks, I downloaded the zip and updated.

Any reason the svn part isn't updated with the latest stuff? (last source commit 3 days ago?) Would make it easier for me to pick out small changes like that, as I've modified some stuff already to make it easier for me to build.

Posted: Wed Jan 19, 2011 6:49 pm
by cobra
Hi SethRobinson.

Thanks for the reports and feedback!

The raycast tank example crash has been fixed, as well as the memory leak in IRaycastVehicle.

I'm glad you found the crash, because I was porting some code from my game's tank scripts (AngelScript) into the irrBullet tank example, so I didn't really test it much, but I ran it a few times after reading your post and it did indeed crash randomly.

The Collision example now uses irrlicht's device time rather than time().

I'm updating the SVN right now, so anyone can get these changes and the early versions of irrBullet 0.1.75 (the next release).

Posted: Thu Jan 20, 2011 12:31 am
by Insomniacp
I see lots of windows support things with msvc but I was wondering if this would compile under gcc/g++ I saw there was linux support but I don't see any make files or anything which is what I am used to dealing with. If anyone has an example on compiling an example on linux that would be helpful. If it isn't available yet then I may be interested in making those parts for you (unless there is something preventing that but I believe bullet is multi platform).

Posted: Thu Jan 20, 2011 1:14 am
by cobra
Insomniacp:

You can compile irrBullet under GCC. It includes a Code::Blocks project and workspace in the source folder.

I usually don't use make files, so I don't include any with irrBullet. I haven't gotten any complaints about it so far.

About 23% or more of irrBullet downloads (total ~1,600) are from Linux users. (Sourceforge download stats)

That's about 368 people; So, you should be able to get help from some Linux users in this thread. :)

Posted: Thu Jan 20, 2011 3:26 am
by Insomniacp
yeah, I ended up just taking the data from the code blocks file and making a make file that did the same thing. Thanks for the quick response.

I have get some linker errors on msvc 8, how can i fix them?

Posted: Thu Jan 20, 2011 7:22 pm
by nuc_lear
Image