Top Banner
PhysX3 in Unity 5.0 Anthony Yakovlev Unity Technologies
23
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Unite'14 Seattle: PhysX 3 in Unity 5.0

PhysX3 in Unity 5.0Anthony Yakovlev Unity Technologies

Page 2: Unite'14 Seattle: PhysX 3 in Unity 5.0

AGENDA• Intro • Rigidbody component overview • Cloth overview • WheelCollider overview • The last slide

Page 3: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 4: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 5: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 6: Unite'14 Seattle: PhysX 3 in Unity 5.0

PhysX 3.3 brings us• SDK rewrite • Cleaner, better codebase • New subsystems: Vehicles, Cloth • Improved multithreading • (Some) compatibility issues

Page 7: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 8: Unite'14 Seattle: PhysX 3 in Unity 5.0

Rigidbody component• Adaptive force is disabled by default

8

Page 9: Unite'14 Seattle: PhysX 3 in Unity 5.0

Static,  dynamic  and  kinematic  bodies

Page 10: Unite'14 Seattle: PhysX 3 in Unity 5.0

Bodies• Static & kinematic bodies • primitive colliders • any mesh collider

• Dynamic bodies • primitive colliders • CONVEX mesh colliders

Page 11: Unite'14 Seattle: PhysX 3 in Unity 5.0

Static bodies• Moving static colliders is now basically free • has been one of the most often causes of

performance issues • static bodies are still cheaper than others

Page 12: Unite'14 Seattle: PhysX 3 in Unity 5.0

Triggers• Adding trigger restricts colliders: • primitive colliders • convex mesh colliders • e.g. no TerrainCollider

Page 13: Unite'14 Seattle: PhysX 3 in Unity 5.0

More about Rigidbody

•CCD  skeletons  are  generated  by  the  SDK  automatically  •no  64k  limitation  on  bodies  on  the  broadphase  on  desktop  targets

Page 14: Unite'14 Seattle: PhysX 3 in Unity 5.0

MeshCollider•scaling mesh colliders is basically free

SCALE by Steve Swink

Page 15: Unite'14 Seattle: PhysX 3 in Unity 5.0

Cloth

15

• Comes in place of SkinnedCloth & InteractiveCloth • Multithreaded • Designed with character clothing in mind

Page 16: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 17: Unite'14 Seattle: PhysX 3 in Unity 5.0

Cloth• Decoupled from the main physics update • Needs to register colliders cloth would react on • SphereCollider • CapsuleCollider • “conic capsule”

• Does not apply the forces back

17

Page 18: Unite'14 Seattle: PhysX 3 in Unity 5.0

WheelCollider• Powered by the all-new PhysX Vehicles SDK • Tyre forces now work! • Input real world data • New gizmo

18

Page 19: Unite'14 Seattle: PhysX 3 in Unity 5.0
Page 20: Unite'14 Seattle: PhysX 3 in Unity 5.0

Performance• Core SDK is organised in tasks • helps on multicore devices • especially on modern desktops

• Android NEON instruction set is supported • GPU cloth support is coming in 5.x • PhysX3 has faster algorithms: pruners, sleeping, queries !• http://physxinfo.com/news/11297/the-evolution-of-

physx-sdk-performance-wise/20

Page 21: Unite'14 Seattle: PhysX 3 in Unity 5.0

Performance insights• PhysX3 is 2x faster than PhysX2 on average • We’ve seen up to 10x performance boost for some cases

Stacks Spheres  vs.  mesh

Page 22: Unite'14 Seattle: PhysX 3 in Unity 5.0

Summary• Unity 5.0 physics is 2x faster than Unity 4.x • Multicore CPUs are now welcome • Unity 5.0 features fixes for long standing issues • The new WheelCollider can be used to simulate real-world

vehicles • The new Cloth component is designed with character

clothing in mind • PhysX3 is not 100% compatible with PhysX2, some tuning

might be required to get your old projects running

22

Page 23: Unite'14 Seattle: PhysX 3 in Unity 5.0

THANKS  FOR  COMING!

Anthony  Yakovlev  [email protected]  @AnthonyYakovlev

CATCH  ME  @  HANDS-­‐ON  LAB  AREA