Bullet physics animator
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
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
-
- Posts: 68
- Joined: Sat May 10, 2008 11:30 am
- Contact:
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, ... ). I've reported the issues on Bullet forums and task tracker so it should be integrated soon.
It works quite well but unfortunatley requires to patch Bullet for performance and flexibility reasons (mesh data sharing, physics aware of animations, character controller, ... ). I've reported the issues on Bullet forums and task tracker so it should be integrated soon.
I got the answer of the dark problem.gbox wrote:
i meet same dark problem but another project work well i dont now why? too
http://irrlicht.sourceforge.net/phpBB2/ ... p?p=165929[/u]
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.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, ... ). I've reported the issues on Bullet forums and task tracker so it should be integrated soon.
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
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,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
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.
100% working
compiled with irrlicht SVN:
http://code.google.com/p/fenixpack/downloads/list
thanks for the wrapper..!!!
compiled with irrlicht SVN:
http://code.google.com/p/fenixpack/downloads/list
thanks for the wrapper..!!!
Last edited by link3rn3l on Mon Jan 25, 2010 6:51 pm, edited 1 time in total.
Bennu (Best 2d and 3D dev-tool)
http://bennupack.blogspot.com
Pixtudio (Best 2D development tool)
http://pixtudiopack.blogspot.com
Bennu3D(3D Libs for bennu)
http://3dm8ee.blogspot.com/
Colombian Developers - Blog:
http://coldev.blogspot.com/
http://bennupack.blogspot.com
Pixtudio (Best 2D development tool)
http://pixtudiopack.blogspot.com
Bennu3D(3D Libs for bennu)
http://3dm8ee.blogspot.com/
Colombian Developers - Blog:
http://coldev.blogspot.com/
Small enhancement for terrain nodes - for the big ones
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:
Works for me...
The old code works perfectly for 256x256 terrains (aka 65536 vertices limit), but for anything bigger, you are lost.
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;
}
The old code works perfectly for 256x256 terrains (aka 65536 vertices limit), but for anything bigger, you are lost.