Nvidia PhysX 學習文檔1: Welcome to PhysX

 

                                      勞動可以使我們擺脫三大災禍:寂寞、惡習、貧困 --------------------- 歌德


Official document: https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/Introduction.html

紅色代表需要吸收的知識。


 

Welcome to PhysX

Welcome to the NVIDIA® PhysX® SDK version 4! Unlike the change from version 2 to 3, the upgrade to version 4 does not bring any significant API changes, and in fact most interfaces have not changed since version 3.4. The behaviors of existing algorithms have also largely stayed the same. Migrating to version 4 should be very easy and straightforward -- see Migrating From PhysX SDK 3.4 to 4.0. Nonetheless we have decided to mark this release with a major version increment because we believe it is hard to overstate the significance of two major innovations we have added: The TGS solver and the reduced coordinate articulations feature. These new simulation options are taking PhysX from being a leading game engine technology to also being a highly accurate engineering simulation tool suitable for robotics R&D and reinforcement learning, while maintaining best in class performance for all application domains. See Temporal Gauss-Seidel and Articulations for more information on these new features.

此次升級到版本4,在API方面並沒有很大的變化,其實,從3.4版本以來,大部分API接口並沒有改變。那些之前就有的算法也並沒有很大改變。  將代碼遷移到版本4是很容易的一件事情,請參考Migrating From PhysX SDK 3.4 to 4.0.

版本4有兩方面很大的創新:

1. TGS solver  (Temporal Gauss-Seidel solver )

高斯-賽德爾迭代法 是數值線性代數中的一個迭代法,可用來求出線性方程組解的近似值。該方法以卡爾·弗里德里希·高斯和路德維希·賽德爾命名。同雅可比法一樣,高斯-賽德爾迭代是基於矩陣分解原理。

2. Reduced coordinate articulations

此文簡單介紹了版本4的新特性:

http://physxinfo.com/news/category/physx-sdk/

http://www.sohu.com/a/279493149_99956743

 

About this User Guide

This Guide will help the reader to understand the features of the PhysX SDK and how to make use of them. The Guide is not exhaustive on the details of the API; the reader should refer to the PhysX API Reference Documentation for this. ( See Documentation/physxapi/_build/html under the main directory where the PhysX SDK distro was unpacked.) Furthermore this guide does not currently go into detail about the algorithms used in PhysX.

The github PhysX 4 Issues page is a good place to ask questions and report bugs.

該文檔的作用是幫助讀者理解PhysX SDK的特性,以及如何使用。 該文檔並不是對API的詳細介紹,關於API可以參考相關的文檔(api文檔位於您解壓目錄下的 Documentation/physxapi/_build/html)。 另外,該文檔沒有對PhysX中的算法細節進行介紹。

 

A brief overview of PhysX

PhysX is a library for representing three dimensional worlds made of discrete entities named actors which can in turn be composed of multiple shapes. PhysX lets the user create and destroy such actors, and tracks their explicit or proximity based interactions. Actors can either be static, be moved around by the user, or be moved by PhysX according to the laws of classical mechanics. PhysX' dynamics simulation capability includes support for collision, joints and actuation using maximal and/or reduced coordinates. Furthermore, the world may be queried by the user using a number of different tools ranging from simple ray-casts to sweep and overlap tests. PhysX provides extensions for special purpose functionality such as vehicle simulation.

PhysX的作用: 模擬三維世界,該世界由一個個actor構成。 用戶可以使用physx來創建和銷燬這種actor, 並追蹤其精確的或者近似的仿真結果。 actor可以是靜止不動的, 或者,可以被用戶直接移動,或者, 可以根據經典力學定律運動。 PhysX的動力學仿真能力涵蓋 collision,  joints and actuation using maximal and/or reduced coordinates。 用戶可以使用PhysX提供的ray-cast, sweep, overlap test功能獲取模擬世界裏的實時狀態。PhysX以extension的形式提供了一些特殊的仿真功能,例如,車輛仿真。

PhysX is designed to be robust, high performance, scalable, portable, as well as easy to integrate and use. These capabilities make PhysX suitable as a foundation technology for game engines and other real time simulation systems.

PhysX具備的特點:obust, high performance, scalable, portable,  easy to integrate and use。這使得PhysX適合作爲遊戲引擎和各種實時仿真系統的底層技術。

It is important to note that PhysX does not run any code on GPUs by default. However PhysX can be configured to take advantage of CUDA capable GPUs, which provides a performance benefit proportional to the arithmetic complexity of a scene. GPU acceleration extensions are provided as an optional binary DLL. See GPU Rigid Bodies for details on how to enable GPU acceleration. Even without GPU acceleration, PhysX is fully multithreaded and SIMD-accelerated to take full advantage of modern multi-core CPUs.

注意: 默認情況下,PhysX代碼不會在GPU上運行。  但是,PhysX可以被配置以充分利用 CUDA capable GPUs. GPU 加速 模塊以二進制dll的方式提供給用戶,使用方法見文檔 GPU Rigid Bodies。

 

World and Objects

The basic concepts of the world within a PhysX simulation are easy to describe:

  • The PhysX world comprises a collection of Scenes, each containing objects called Actors;
  • Each Scene defines its own reference frame encompassing all of space and time;
  • Actors in different Scenes do not interact with each other;
  • Characters and vehicles are complex specialized objects made from Actors;
  • Actors have physical state : position and orientation; velocity or momentum; energy; etc,
  • Actor physical state may evolve over time due to applied forces, constraints such as joints or contacts, and interactions between Actors.

PhysX的基本概念:

> PhysX world包括一系列的Scenes, 每個Scene包括了actors

>每個Scene使用自己的時間和空間參考系。

>屬於不同的Scene的actors不會相互影響。

>characters 和 vehicle是特殊的複雜對象,它們由actors構成。

>actor具備物理狀態量: 位置,姿態,速度或者動量,能量,等。

>actor的狀態量變化,導致變化的原因有: 外力,約束(關節約束,接觸面約束等),其他actor的影響。

 

Rendering and Visualization

3d rendering will of course be a vital technology to visualize the simulated world in almost every application. Production quality graphics and audio are outside the scope of PhysX. At the minimum the user needs to take the updated state of any moved visible actors and update them in the respective rendering representation. Some of our example programs come with rudimentary built-in visualization, and we also provide a stand-alone debugging tool called PhysX Visual Debugger (PVD).  PVD provides a graphical view of the PhysX scene together with various tools to inspect and visualize variables of every PhysX object. Additionally it can also record and visualize memory and timing data. See PhysX Visual Debugger (PVD) for details.

圖形圖像顯示和音頻 並不是PhysX關注的領域。 一些PhysX自帶的例子程序提供了簡單的場景顯示功能(例如,車輛的例子中是通過opengl來顯示場景的)。另外,PhysX提供了一個獨立的可視化工具 PhysX Visual Debugger (PVD)。PVD可以顯示場景,並且,提供了各種工具來檢測和可視化各個object的變量。 另外,PVD也可以記錄和可視化內存和時序數據。

關於PVD: PhysX Visual Debugger (PVD)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章