Instancing Help
2 posters
Instancing Help
Could you go over the basics of instancing and parenting? I have 6 objects (Cube, Cylinder.001, Cylinder.002, Cylinder.003, Cylinder.004, Cylinder.005) and only one instance (Cylinder) is rendering.
jj- Posts : 77
Join date : 2008-09-24
Re: Instancing Help
Ok...
1. From Blender create a Cube
2. Then ALT+D in object mode
3. Now Cube = Parent and Cube.001 = Child (Cube.001 share all generic object properties from Cube, expect like pos, rot, scl and all other object specific properties)
4. In SIO2 after you load the scene:
That's it... maybe review the tutorial06 (video + code) to grasp exactly how to do it...
1. From Blender create a Cube
2. Then ALT+D in object mode
3. Now Cube = Parent and Cube.001 = Child (Cube.001 share all generic object properties from Cube, expect like pos, rot, scl and all other object specific properties)
4. In SIO2 after you load the scene:
- Code:
sio2ResourceBindAllImages( sio2->_SIO2resource );
sio2ResourceBindAllMaterials( sio2->_SIO2resource );
// This is the line that will bind all child to the Cube. In addition when you
// export make sure that Cube is in the same layer as Cube.001, that's
// all there is to it... all the rest Im handling in the background...
sio2ResourceBindAllInstances( sio2->_SIO2resource );
sio2ResourceBindAllPhysicObjects( sio2->_SIO2resource,
sio2->_SIO2physic );
sio2ResourceGenId( sio2->_SIO2resource );
That's it... maybe review the tutorial06 (video + code) to grasp exactly how to do it...
Re: Instancing Help
Thanks, I will check it out. Another problem I'm having (seems simple) is that I'm getting a program interrupt on a static triangle mesh as a ghost (for collision): Here are the methods called in the trace:
Leads to _kill. Something I'm missing?
- Code:
void sio2ResourceBindAllPhysicObjects( SIO2resource *_SIO2resource,
SIO2physic *_SIO2physic )
{
unsigned int i = 0;
while( i != _SIO2resource->n_object )
{
sio2PhysicAddObject( _SIO2physic,
( SIO2object * )_SIO2resource->_SIO2object[ i ] );
++i;
}
}
- Code:
_btCollisionShape = new btBvhTriangleMeshShape( _btTriangleMesh, 1 );
- Code:
if (buildBvh)
{
void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16);
m_bvh = new (mem) btOptimizedBvh();
m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax);
m_ownsBvh = true;
}
- Code:
buildTree(0,numLeafNodes);
- Code:
//btOptimizedBvh::buildTree
assert(numIndices>0);
Leads to _kill. Something I'm missing?
jj- Posts : 77
Join date : 2008-09-24
Re: Instancing Help
I don't know man... too hard to tell maybe send me the model (.blend) that cause problem so I can check it out...
Permissions in this forum:
You cannot reply to topics in this forum