Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About greg2fs

  • Rank
  1. Hello, I am creating a game with a big world that is loaded while the user is playing, also I need to add/remove parts of the world without blocking the game execution. For that I am using a thread but for physx it seems to occasion crashes and I don't know how to do. I was thinking about a alternate solution like just adding polygons to the existing trimesh but don't know more how to do. Thanks
  2. Hello, I am trying to control a human made of d6 joints with drivers but I can't find the problem. I am working on the knee actualy, this is what I use for the joint creation: NxD6JointDesc d6Desc; d6Desc.actor[0] = a0; d6Desc.actor[1] = a1; d6Desc.setGlobalAnchor(globalAnchor); d6Desc.setGlobalAxis(globalAxis); d6Desc.xMotion = NX_D6JOINT_MOTION_LOCKED; d6Desc.yMotion = NX_D6JOINT_MOTION_LOCKED; d6Desc.zMotion = NX_D6JOINT_MOTION_LOCKED; d6Desc.swing1Motion = NX_D6JOINT_MOTION_LOCKED; d6Desc.swing2Motion = NX_D6JOINT_MOTION_LOCKED; d6Desc.twistMotion = NX_D6JOINT_MOTION_LIMITED; d6Desc.linearLimit.value = 0; d6Desc.swing1Limit.value = 0; d6Desc.swing2Limit.value = 0; d6Desc.twistLimit.low.value = 0; d6Desc.twistLimit.high.value = 2.5f; d6Desc.linearLimit.restitution=0; d6Desc.swing1Limit.restitution=0; d6Desc.swing2Limit.restitution=0; d6Desc.twistLimit.low.restitution=0; d6Desc.twistLimit.high.restitution=0; d6Desc.linearLimit.damping=2.0f; d6Desc.swing1Limit.damping=2.0f; d6Desc.swing2Limit.damping=2.0f; d6Desc.twistLimit.low.damping=2.0f; d6Desc.twistLimit.high.damping=2.0f; d6Desc.linearLimit.spring=10000; d6Desc.swing1Limit.spring=10000; d6Desc.swing2Limit.spring=10000; d6Desc.twistLimit.low.spring=10000; d6Desc.twistLimit.high.spring=10000; /*d6Desc.twistDrive.driveType.raiseFlagMask(NX_D6JOINT_DRIVE_VELOCITY); d6Desc.twistDrive.spring=10000; d6Desc.twistDrive.damping=2; d6Desc.driveAngularVelocity=NxVec3(-1,0,0);*/ d6Desc.twistDrive.driveType.raiseFlagMask(NX_D6JOINT_DRIVE_POSITION); d6Desc.twistDrive.spring=10000; d6Desc.twistDrive.damping=2; d6Desc.driveOrientation.fromAngleAxis(-1,NxVec3(1,0,0)); d6Desc.projectionMode = NX_JPM_POINT_MINDIST; d6Desc.projectionDistance=0.04f; d6Desc.projectionAngle=0.04f; return (NxD6Joint*)gScene->createJoint(d6Desc); As you can see on this video(without driver) the joint is correctly configured (orientation & limits). But if you look at the video with the driver HERE you see that the leg stays straight even if I try all values and orientations. With a velocity driver it works but not a position driver. Can someone see my mistake or have a idea of what can be the problem ? Thanks
  3. Hello, I am asking how the 3d position of a D6 joint can be defined with just an anchor and an axis, it gives an infinite number of positions around the axis, no ? If a d6joint had only one swing angle I could understand that only an axes and and origin would be enough, but as there's two swing angles all I can suppose is that their orientation are arbitrary. Thanks for your help.
  4. This is what I do each frame: gScene->simulate(float(ifps)/500); gScene->flushStream(); while (!gScene->fetchResults(NX_RIGID_BODY_FINISHED, false)); //retreiving matrices //rendering objects I use NxUserContactReport to get contact position. In fact I am not sur it's just a delay problem because I have a sphere rolling on the floor, if I show the contact position it is not on the floor like if it was a delay issue but at the rear of the sphere like if it was the last frame contact sphere relative position, but I think my sentence is not very clear, see this video: The dark area is a simple sprite witch have to be at the contact position but as you see the faster the wheel rotate the highter the sprite goes.
  5. Hi, I am using physx for some months and enjoy all its great features but I currently trying to get the contact normal or position and if I get the right position at low speed, when it goes faster I clearly see the position returned is like one frame older at a 't' time. Is it a bug or is there something I misunderstood ? Thanks
  6. I corrected all the warning and it works, why it worked before and I had no warning ?
  7. Hello, I have a strange bug with vertex/pixel shaders. (I use 2.0) I already had some issues with my shaders (for parallax) when I saw my tangent and binormal was null, then I decided to use D3DXComputeTangentFrameEx with witch some options was not compatible with the old dxsdk I used, then I decided to update to the latest SDK. After some compiling problem (subject of another topic) and with correct normals, binormals and tangents, my shaders doesn't seems to work. First I have many warning, one is: warning x3206: 'mul': implicit truncation of vector type I removed everything in my shader to try to understand: Quote: //the vertex shader struct Vertex{ float4 pos: POSITION; float3 n: NORMAL; float2 uv: TEXCOORD0; float2 uvl: TEXCOORD1; float3 t: TANGENT; float3 b: BINORMAL; }; struct Connect{ float4 pos: POSITION; float2 uv: TEXCOORD0 ; float3 lightVec: TEXCOORD1; float3 eyeVec: TEXCOORD2; }; Connect main(Vertex vertex, uniform row_major float4x4 wvpMatrix: register(C0), uniform row_major float4x4 worldMatrix: register(C4), uniform float3 lightPos: register(C8), uniform float3 eyePos: register(C9)){ Connect result; result.pos = mul(vertex.pos, wvpMatrix); result.uv = vertex.uv; float4 worldPos = mul(vertex.pos, worldMatrix); float3 n = mul(vertex.n, worldMatrix); result.lightVec = float3(1,0,0); result.eyeVec = float3(1,1,0); return result; } //the pixel shader struct Fragment{ float4 color: COLOR; }; Fragment main(Connect data, uniform sampler2D diffuseMap: register(S0), uniform sampler2D normalMap: register(S1), uniform float specularPower: register(C0), uniform float parallaxDepth: register(C1), uniform float2 texelSize: register(C2)){ Fragment result; result.color = float4(data.eyeVec.x,data.eyeVec.y,data.eyeVec.z, 1.0); return result; } Then the very strange thing is than when I remove the line "float3 n = mul(vertex.n, worldMatrix);" the render color is yelow but is I let this line it become black ! If someone has any idea of the problem, thanks to explain to me. Thanks again.
  8. It's ok I succeded in updating the old class. THanks
  9. I don't WANT TO use D3DXLoadMeshHierarchy, I just never realy tried to understand CD3DSkinmesh class, because it has always seemed very complicated for me for what it does... I'll see, thanks.
  10. I think I miss some c++ base, I need a separate class for a better readability, but in the sdk sample some functions (for example of CAllocateHierarchy) use global functions witch will become class function, and it's not very clear in my head, as I always avoided complicated things with classes, derived classes...
  11. Hello, I just had the very bad idea of updating my dxsdk to the latest one and it seems than my code is no longer compatible, in fact the CD3DSkinmesh class is no longer given in any samples and the old one doesn't work any more, I tried to create a class with the skinned mesh sample of the new sdk but did not success, in my next program I wich to use my own skinning method but rigth now I really need help to use the microsoft one. Thanks
  12. Thanks... I think I'd better have to create my own skinned mesh. Just one more question, is it possible to use the default vertex shader ( setvertexshader(0) ) with a custom pixel shader, and if yes, what are the variables whitch can be used ?
  13. Hello, I am starting to understand vertex and pixel shaders and I successfully created my own soft shadow shader, but now I ask myself how I can use it on a skinned mesh, I think the job is in the vertex shader, but don't know witch function to use and don't find any example on internet. Thanks (I use Shaders 2.0)
  14. Sorry to put a message in french I forgot I was on an english website, then I translated my message. From what you say, the only way is to use a vertexbuffer and build the adjency on my own ?
  15. Hello, I need to remove vertices which are in double in a LPD3DXMESH. They are in double because they have different UV or normals, but only position are need by my program and I need not to have double vertices. My question is how can I remove these vertices, I tried to put all the normal to 0,1,0 and all the UV to 0,0 and do OptimizeInplace but it changed nothing. THanks [Edited by - greg2fs on August 18, 2008 12:49:00 PM]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!