Page 2 of 2

Posted: Fri Jul 18, 2008 8:35 pm
by dlangdev
hey gbox,

can you post your updated irrbullet project file up. i can't build the version posted by the author. version too old, i guess.

thanks.

Posted: Sun Jul 27, 2008 3:38 am
by wuallen
I compile these code, but I get very bad effect. the pin becames dark, and FPS is very low, about 5 or 6, did anyone else get the same bad effect? I don't know where is the problem?

Posted: Mon Jul 28, 2008 3:52 pm
by gbox
hey wuallen

complie with release option then speed up

i meet same dark problem but another project work well i dont now why? too

dlangdev here is soruce

http://jga.or.kr/sboard/download.asp?bo ... ta&idx=114

Posted: Mon Jul 28, 2008 6:51 pm
by full.metal.coder
I've never managed to get this thing working so I ended writing a Bullet wrapper using a completely different approach. You may be interested in having a look at the code : http://first-king.svn.sf.net/svnroot/fi ... k/physics/

It works quite well but unfortunatley requires to patch Bullet for performance and flexibility reasons (mesh data sharing, physics aware of animations, character controller, ... :D ). I've reported the issues on Bullet forums and task tracker so it should be integrated soon.

Posted: Tue Jul 29, 2008 3:15 am
by wuallen
gbox wrote:
i meet same dark problem but another project work well i dont now why? too
I got the answer of the dark problem.

http://irrlicht.sourceforge.net/phpBB2/ ... p?p=165929[/u]

Posted: Tue Jul 29, 2008 3:24 am
by wuallen
full.metal.coder wrote:I've never managed to get this thing working so I ended writing a Bullet wrapper using a completely different approach. You may be interested in having a look at the code : http://first-king.svn.sf.net/svnroot/fi ... k/physics/

It works quite well but unfortunatley requires to patch Bullet for performance and flexibility reasons (mesh data sharing, physics aware of animations, character controller, ... :D ). I've reported the issues on Bullet forums and task tracker so it should be integrated soon.
thank your replying. At least I got the clue of my slow problem. It is really a problem of mine, I have been so worried about this. can you explain how to patch this problem, for me, more waiting more pains.

Posted: Fri Aug 29, 2008 10:01 pm
by EvilAlex
Thanks to the author of the code!
I haven't use this exact code, but rather, used it as a tutorial to write my own. Bullet has very poor documentation (or it's just me too lazy to search), so this code helped a lot.
Thanks again! =)

Posted: Tue Oct 21, 2008 12:42 pm
by go
OK

I edit first Irrlicht and bullet animator sourcecode for Irrlicht 1.4.2 and bullet 2.7.2 ver in visualc++ 2008

i up the sourcecode.

before compile this code, you shoud make your Extras\GIMPACT\include folder in your visual studio include option.

and I'll make serialized ver source either

thanks


http://xn--u8jua7b1498a.jp/dl

Posted: Thu Nov 20, 2008 9:31 am
by go

Posted: Thu Dec 04, 2008 1:19 am
by Jiang
go wrote:OK

I edit first Irrlicht and bullet animator sourcecode for Irrlicht 1.4.2 and bullet 2.7.2 ver in visualc++ 2008

i up the sourcecode.

before compile this code, you shoud make your Extras\GIMPACT\include folder in your visual studio include option.

and I'll make serialized ver source either

thanks


http://xn--u8jua7b1498a.jp/dl
Hey go,

I downloaded the above zip file, but failed to open it. My 7-zip reported me invalid zip file format. Tried several times but had no luck.

Would you please check the zip file again.

Thank you for your time.

Posted: Mon Dec 29, 2008 1:05 pm
by wEEp
from where do i get the Bullet library? ;O

Posted: Tue Jun 16, 2009 2:41 pm
by link3rn3l
100% working

compiled with irrlicht SVN:

http://code.google.com/p/fenixpack/downloads/list


thanks for the wrapper..!!!

Small enhancement for terrain nodes - for the big ones

Posted: Tue Nov 17, 2009 5:07 pm
by enif
Hi!

Thes animator code works great with Irrlicht 1.6 and Bullet 2.75. Thanks! Great work!

Because I am using 513x513 terrain nodes in my game, I had to change this method in CBulletPhysicsUtils.cpp:

Code: Select all

btTriangleMesh * ConvertTerrainToBulletTriangleMesh(
    irr::scene::ITerrainSceneNode* terrain,
    const irr::core::vector3df& Scaling)
      {
         //mesh converting

            btVector3 vertices[3];
            irr::u32 j,k,index,numVertices,numIndices;
            irr::u16* mb_indices16;
			irr::u32* mb_indices32;
			video::E_INDEX_TYPE indicesType;
            btTriangleMesh *triangleMesh;

            irr::scene::ITerrainSceneNode *pTerrain = terrain;


			scene::CDynamicMeshBuffer* buffer = 0;

			numVertices = terrain->getMesh()->getMeshBuffer(0)->getVertexCount();
			if (numVertices <= 65536)
			{
				//small enough for 16bit buffers
				buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);
			}
			else
			{
				//we need 32bit buffers
				buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_32BIT);
			}

            pTerrain->getMeshBufferForLOD(*buffer, 0);

            numVertices = buffer->getVertexCount();
            numIndices = buffer->getIndexCount();
			indicesType = buffer->getIndexType();

			if (indicesType == video::EIT_16BIT)
			{
				mb_indices16 = buffer->getIndices();

				irr::video::S3DVertex2TCoords* mb_vertices = (irr::video::S3DVertex2TCoords*)buffer->getVertices();
				btTriangleMesh *pTriMesh = new btTriangleMesh();
				irr::core::vector3df scaling = Scaling;

				for(j = 0; j < numIndices; j += 3)
				{ 
					//index into irrlicht data
					for (k = 0; k < 3; k++)
					{
						index = mb_indices16[j+k];

						// we apply scaling factor directly to verticies
						vertices[k] = btVector3(mb_vertices[index].Pos.X*scaling.X,
						mb_vertices[index].Pos.Y*scaling.Y,
						mb_vertices[index].Pos.Z*scaling.Z);
					}

					pTriMesh->addTriangle(vertices[0], vertices[1], vertices[2]);
				}

				triangleMesh = pTriMesh;
			}
			else if (indicesType == video::EIT_32BIT)
			{
				mb_indices32 = (u32*)buffer->getIndices();

				irr::video::S3DVertex2TCoords* mb_vertices = (irr::video::S3DVertex2TCoords*)buffer->getVertices();
				btTriangleMesh *pTriMesh = new btTriangleMesh();
				irr::core::vector3df scaling = Scaling;

				for(j = 0; j < numIndices; j += 3)
				{ 
					//index into irrlicht data
					for (k = 0; k < 3; k++)
					{
						index = mb_indices32[j+k];

						// we apply scaling factor directly to verticies
						vertices[k] = btVector3(mb_vertices[index].Pos.X*scaling.X,
						mb_vertices[index].Pos.Y*scaling.Y,
						mb_vertices[index].Pos.Z*scaling.Z);
					}

					pTriMesh->addTriangle(vertices[0], vertices[1], vertices[2]);
				}

				triangleMesh = pTriMesh;
			}
			else
			{
				// bad indices type!
				buffer->drop();

				return NULL;
			}

			buffer->drop();

			return  triangleMesh;
      }
Works for me... :-)

The old code works perfectly for 256x256 terrains (aka 65536 vertices limit), but for anything bigger, you are lost.