• Content count

  • Joined

  • Last visited

Community Reputation

1331 Excellent


About lucky6969b

  • Rank

Personal Information

  • Interests
  1. I have got one example from the web, but it is using the "Three" library and was written in Javascript, does anyone know where I can find info on how to put some perlin generated values, say it generates a nice 3D texture and I need to map it onto the lattice and it should generates a smoke inferno or some sort, maybe mapping out a IDirect3DCubeTexture thing into a lattice with U, V and W coordinates, I am looking for an example.. Thanks Jack
  2. Adjusting mocap data with IK

    Oh... I get it....for this kind of animations, you can't make use of a heavy-duty library like opentissue, because they are good for explicit postures, for light-duty tasks, like arm-adjustment, you will just need some simple ik systems.
  3. I simply cannot make the animation look good. if I just add on the translation part, the character becomes an enlarged monkey, if I just add on the rotation part, also it messes up, if I add on the transformation, the character is flattened (the character becomes very thin) I think the correct way is to add the transformations together. If I just apply one of the mocap or ik transformation alone, the animation is okay. Any ideas? Thanks Jack D3DXVECTOR3 oldpos, oldscale; D3DXQUATERNION oldquat; D3DXMatrixDecompose(&oldscale, &oldquat, &oldpos, &frame->TransformationMatrix); //D3DXMATRIX oldTransform, oldSca, oldRot, oldTrans; //D3DXMatrixScaling(&oldSca, oldscale.x, oldscale.y, oldscale.z); //D3DXMatrixTranslation(&oldTrans, oldpos.x, oldpos.y, oldpos.z); //D3DXMatrixRotationQuaternion(&oldRot, &oldquat); //oldTransform = oldSca * oldRot * oldTrans; //newPosition += oldpos; //newOrientation *= oldquat; D3DXMATRIX matScale, matTrans, matRot; D3DXMatrixTranslation(&matTrans, newPosition.x, newPosition.y, newPosition.z); D3DXMatrixRotationQuaternion(&matRot, &newOrientation); D3DXMATRIX matFinal; D3DXMatrixIdentity(&matFinal); matFinal = matRot * matTrans; // OLD TRANSFORM IS BVH // NEW TRANSFORM IS IK frame->TransformationMatrix = matFinal;
  4. I am not sure I can ask questions about a specific library here, but if you haven't already. I'd like to tag some polys in a navigation mesh that correspond to grass or road etc, I can give an extent to do so, or in another way, I can directly feed a geometry in and the polys are tagged this way. But I am looking into alternative ways such as allowing the user to tag the polys using a text file or bitmap file (like the way heightfields are done).. If I define a area map which is a grayscale image, and the values range from 0-255, and for example, if the value of the first char is 0, then I can map this index to certain place in the navigation mesh, and say this is a walkable ground etc, unlike heightfields, where you define an image and the resultant thing is some terrain, but when you start off with a bitmap for area map, you end up with what? you see, I had the geometry already, the area map probably doesn't make sense here, same way as the text file thing.... Any ideas? Jack
  5. My AI subsystem is completed dragged by the physics with objects with Gimpact proxies.. When you need to calculate stuff like bumps, it is very horrible...It is even worse than using compound vehicle methods... Thanks Jack
  6. If the model comes out as a low-res mesh (.X file), because I want to do something like convex decompositions, voroni kind of thing... I want to increase the triangle count / division of the mesh... If I create a new mesh out of the old mesh, you have to manually fill in the vertex positions, normals and uvs etc, is there an handy way (an api) to increase the count, I don't know tessellate is the correct term since it only applies to patch meshes. thanks Jack
  7. I looked one of the the bullet physics samples which talks about the topic in height field. But however, when the height fields get rendered, the "DemoApplication" class calls the opengl shape drawer object which finally retrieves the display list of the collision shape, which is strongly coupled to opengl, I want to do the same thing with DirectX (D3DX at the moment, damn old, but hey).. How can I draw the height fields out? Is there a way to turn the display list into something recognizable by Direct3D 9? Thanks Jack
  8. //synchronize the wheels with the (interpolated) chassis worldtransform l_vehicle->updateWheelTransform(j,true); const btTransform& t = l_vehicle->getWheelInfo(j).m_worldTransform; D3DXMATRIX l_mat = BT2DX_MATRIX(t); D3DXMATRIX l_rot; D3DXMatrixRotationY(&l_rot, 1.57f); l_mat = l_rot * l_mat; // assume front wheels AgentMotionState* motion = dynamic_cast(l_vehicle->getRigidBody()->getMotionState()); if (motion) { boost::shared_ptr pObj = motion->m_object; if (j==0) { D3DXVECTOR3 s, p; D3DXQUATERNION r; D3DXMatrixDecompose(&s, &r, &p, &l_mat); double yaw, pitch, roll; yaw = pitch = roll = 0.0f; QuatToEuler(r, yaw, pitch, roll); TRACE("Veh: " << i << "Pos of wheel 0 is " << p.x << " " << p.y << " " << p.z); yaw = CapRadian(yaw); TRACE("Veh: " << i << "Rot of wheel 0 is " << yaw); FRAME* frontWheels = (FRAME*)D3DXFrameFind(pObj->m_mesh->GetFrameRoot(), "Front_Left_Wheel"); frontWheels->matCombined = l_mat; //frontWheels->TransformationMatrix = l_mat; } Looks like the left front wheel is on the far left of the chassis with a large gap? Why is that? Thanks Jack
  9. Bullet ForkLift can't stand firm on the floor

    I was wondering why the forklift was playing somersaults in the air, now I found out that I was messing up the wheel radius with the wheel width of the forklift... Fixed.. thanks Jack
  10. Bullet ForkLift can't stand firm on the floor

    If I change the friction value to 10000.0f and I don't apply any engine force and braking force at all. And the agent is totally driven by the AI....then the floor still looks very slippery, after the agent is stabilized, the agent is able to be moved by the AI? Thanks Jack
  11. The forklift just slides across the floor. You may ask, hey, the wheels are frictionless, if I apply a friction of 1000.0f, the forklift just bounces to the air? If I apply 1.0, the forklift still slips around... Also, I have to apply a very large engine force in order to move the forklift, such as 100000.0 kg The chassis is 200kg, upper mask is 70kg, lower mask is 60kg, front wheels are 50kg and rear wheels are 50kg I just stuff them up. float maxEngineForce = 1000.f;//this should be engine/velocity dependent float maxBreakingForce = 100.f; float gVehicleSteering = 0.f; float steeringIncrement = 0.04f; float steeringClamp = 0.3f; //float wheelFriction = 10.0f; //1000;//BT_LARGE_FLOAT; float wheelFriction = 0.0f; float suspensionStiffness = 20.f; float suspensionDamping = 2.3f; float suspensionCompression = 4.4f; float rollInfluence = 0.1f;//1.0f; any ideas?
  12. Okay, I overcame it by excluding it from the update pipeline (the vector of collision objects), and just add to the processing pipeline (the dynamics world)
  13. I just keep stacking onto the compound shape, where the chassis is a box and the wheels are cylinders.... When getting rendered, they just fall apart, especially the chassis slips over and fall onto the ground...I haven't added constraints yet and I am just rendering the compound, not the vehicle type... I have a hard time understanding the forklift example though... And if I forget about the individual shapes and add as a compound shape in the end, I don't know how to apply constraints to the vehicle because they have no rigid bodies to create at all. You have to add the final compound shape and create a rigid body from there, if needing to add constraints, you need to have some references to the rigid bodies created from individual parts of the vehicle. thanks Jack
  14. How can I calculate the forces from the resultant world transformation calculated by bullet? Thanks Jack
  15. I meant when the physics thread goes to sleep, the AI can take control of the world transformation.