Page 6 of 6 FirstFirst ... 456
Results 51 to 55 of 55

Thread: 3d Engine Collision

  1. #51

    Re: 3d Engine Collision

    ok thanks for reply..

    ok so..

    Code:
     if PerfCount.PhysicsElapsedTime >= (1 / 60) then begin
      NewtonUpdate(NewtonWorld, 1 / 60);
      PerfCount.PhysicsElapsedTime := PerfCount.PhysicsElapsedTime - (1 / 60);
     end;
    i have added this for newton update (which seems to be working)

    Code:
    procedure TNewtonBox.Render;
    var
     v: Integer;
     matWorld: TD3DMatrix;
    begin
     NewtonBodyGetMatrix(NewtonBody, @matWorld.m[0,0]);
    
     Engine.ResMan.DX_Device.SetTransform(D3DTS_WORLD, matWorld);
    
     v := 0;
     while (v < Model.NumMaterials) do begin
      // Set the material and texture for this subset
      Engine.ResMan.DX_Device.SetMaterial(Model.pMeshMaterials[v]);
      Engine.ResMan.DX_Device.SetTexture(0, Model.pMeshTextures[v]);
    
      // Draw the mesh subset
      Model.pMesh.DrawSubset(v);
    
      Inc(v);
     end;
    end;
    i am using this for rendering the box, how would i go about transforming via vertices rather then matrix? thanks again you have been very helpful.

  2. #52

    Re: 3d Engine Collision

    still cant find any methods, i think i will just make sure models are aligned before loading...

    whilst im posting, just wondering if anyone uses the newton 2 engine or still newton 1.53 ?

    reason i ask is... i was using 1.53, i could create 3500 newton box's and render them with collision and physics, throw them around etc, and get around 70fps on large land, then i tried with newton2 engine and i cant get a max of 700 box's and it runs very slow and laggy, is this because it is beta, will it get better? baring in mind the code i used is almost identical.

    oh another problem i just found, small box's like tiny box's always fall through the ground or walls...

  3. #53

    Re: 3d Engine Collision

    Quote Originally Posted by Memphis
    still cant find any methods, i think i will just make sure models are aligned before loading...

    whilst im posting, just wondering if anyone uses the newton 2 engine or still newton 1.53 ?
    1.53 is no longer supported
    Quote Originally Posted by Memphis
    reason i ask is... i was using 1.53, i could create 3500 newton box's and render them with collision and physics, throw them around etc, and get around 70fps on large land, then i tried with newton2 engine and i cant get a max of 700 box's and it runs very slow and laggy, is this because it is beta, will it get better? baring in mind the code i used is almost identical.
    Your graphics is probably using up most of cpu power, try without rendering and see what performance you get.. remember that physics share cpu with the rest of your game logic, and the cpu power is also important here.
    Quote Originally Posted by Memphis
    oh another problem i just found, small box's like tiny box's always fall through the ground or walls...
    This "tunneling" is a common issue with all physics engines caused by floating point imprecision and large size difference ratios.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  4. #54

    Re: 3d Engine Collision

    Quote Originally Posted by Delfi
    1.53 is no longer supported
    ok fair enough reason to move to newton 2. lol

    Quote Originally Posted by Delfi
    Your graphics is probably using up most of cpu power, try without rendering and see what performance you get.. remember that physics share cpu with the rest of your game logic, and the cpu power is also important here.
    since 1.53 i could render 3500 box's incomparison to newton 2 only 700. i didnt think it could be a render problem, so i removed rendering, and tried again, and it was still the same problem. i got about an extra 100 box's


    Quote Originally Posted by Delfi
    This "tunneling" is a common issue with all physics engines caused by floating point imprecision and large size difference ratios.
    what would be your sugestion for me?

    and thanks for your reply.

  5. #55

    Re: 3d Engine Collision

    Quote Originally Posted by Memphis
    Quote Originally Posted by Delfi
    1.53 is no longer supported
    ok fair enough reason to move to newton 2. lol

    Quote Originally Posted by Delfi
    Your graphics is probably using up most of cpu power, try without rendering and see what performance you get.. remember that physics share cpu with the rest of your game logic, and the cpu power is also important here.
    since 1.53 i could render 3500 box's incomparison to newton 2 only 700. i didnt think it could be a render problem, so i removed rendering, and tried again, and it was still the same problem. i got about an extra 100 box's


    Quote Originally Posted by Delfi
    This "tunneling" is a common issue with all physics engines caused by floating point imprecision and large size difference ratios.
    what would be your sugestion for me?

    and thanks for your reply.
    #1 i have no idea why you get worse performance, every project i migrated to newton 2 shown much greater performance.. ask on newton forum for experts help.

    #2: try continous collision
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

Page 6 of 6 FirstFirst ... 456

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •