The PhysX Visual Debugger is a great tool to visualize and debug your PhysX program. It helps you to view the bodies, velocities and constraints (joints) in your PhysX scene and how they change during the program execution.
You can use PhysX Visual Debugger in a few steps:
- Open PhysX Visual Debugger. It needs to be running in the background to listen to information sent by your PhysX program.
In the Preferences sub-window of the debugger make sure that all the elements which you are interested to view are set to
Everything. For example, center of mass, velocities or constraints. If you do not do this, you may find yourself staring at an empty
DirectX Render window.
In your PhysX code, connect to the debugger. You do this by connecting to its IP and port and informing it what elements should be visualized. A bit of self-explanatory code that does this can be found here.
Compile your PhysX program and execute it. You must ensure that your program is able to connect to the debugger.
Let your program run its physics. Close it once it is done.
All the physics from the last execution of your program would be captured by the debugger. Replay it back by using the play buttons at the top of the debugger. Hopefully, this visualization helps you examine the physics of your program better.
Tried with: PhysX 3.2.4, PhysX Visual Debugger 2.0100.01.13105 and Windows 8 x64
Gravity is disabled by default in PhysX. To enable it, add a gravity vector to the scene descriptor:
// Assuming scene descriptor is created here
sceneDesc->gravity = physx::PxVec3(0.0f, -9.81f, 0.0f);
You can also set the gravity vector in the scene itself:
// Assuming scene is created here
scene->setGravity(physx::PxVec3(0.0f, -9.81f, 0.0f));
To avoid buggy behavior, it is better to enable gravity at the beginning.
Tried with: PhysX 3.2.4, Visual Studio 2010 and Windows 8 x64
The VsVim extension for Visual Studio supports a lot of the Vim commands that are commonly used. A Vim user should feel comfortable navigating and editing in Visual Studio using this extension. If you want to save your Vim settings or load your Vim settings in VsVim, you can do that from a vimrc file.
VsVim looks for a file named
_vimrc to load Vim settings. You can put your favorite Vim settings into this file and use them with VsVim. You can check which directories that VsVim looks for this file in by using the command
:set vimrcpaths?. This is typically the
USERPROFILE directories. Place your vimrc file in one of these directories, restart Visual Studio and VsVim will load those settings. You can verify which vimrc file is currently loaded in VsVim by using the command
Tried with: VsVim 184.108.40.206, Visual Studio 2010 and Windows 8 x64
The VsVim extension brings Vim key bindings and interface to Visual Studio. This is similar to the Vrapper plugin for Eclipse.
Installing VsVim is straightforward. Go to Tools > Extension Manager. Choose Online Gallery and search in the top right box for VsVim. Choose VsVim from the search results and click Install. Once install is done, restart Visual Studio.
VsVim adds its own bar at the bottom of the editor window. This is used to display the Vim commands you type and their results. There are many common Vim commands that have pre-defined bindings in Visual Studio. You can pick and choose which of these you want to retain with Visual Studio or grab for Vim. This can be done by clicking the
Options button in the bottom VsVim bar.
If you want to look at the VsVim source code or help add a feature, go to its Github page.
Tried with: VsVim 220.127.116.11, Visual Studio 2010 and Windows 8 x64
In many recent NVIDIA GPUs shipping in graphics cards, the FP64 cores are executed at reduced speed. For example, the GTX Titan is capable of achieving a
double performance that is 1/3 of
float performance. However, by default the card does FP64 at a reduced speed of 1/24 of FP32. This is done because the primary audience of these consumer cards are gamers. And games use mostly FP32 computations. Enabling full speed FP64 reduces the FP32 performance by a bit since the maximum clock speed needs to be reduced and also increases power consumption since all the power hungry FP64 cores are running.
To enable full speed FP64 on Linux, make sure you have the latest NVIDIA drivers installed. Open the
NVIDIA X Server Settings application. Go to the section with the name of your graphics card > PowerMizer and enable the
CUDA - Double precision option. That is it, your CUDA application should now run with full speed FP64 on the GPU.
Tried with: NVIDIA GTX Titan, NVIDIA driver 319.37, CUDA 5.5 and Ubuntu 12.04 LTS
A list of current and past hardware that I have worked and played with. I used to use Gdgt for maintaining this information, but that turned out to be painful.
NVIDIA GeForce GTX Titan (2013-)
The most powerful graphics card of all time. Roar!
NVIDIA GeForce GTX 590 (2013-)
Running CUDA and PhysX on this.
Creative Airwave (2013-)
Sounds tame and weak. But, perfect for home use for playing non-serious music or radio.
Creative WP-300 (2013-)
Sounds good and is very convenient to have around at home.
Nikon D5100 (2013-)
Does not autofocus correctly sometimes. Quite irritating.
Lenovo Thinkpad X201 (2013-)
Light and compact. Running Ubuntu on it.
Nook Color (2012-)
Running CyanogenMod 10.1 on it and using it to read Pocket and comics. Perfect for the job!
Dunu Trident (2012-)
Accurate, but also a bit tame to listen to.
Nokia C1-01 (2011-)
The cheapest Nokia cellphone I could buy. Menus are too slow to use and the audio is weak. Do not buy!
Sennheiser PX100-II (2011-)
I think this sounds the most enjoyable among all my headphones. A lot of the low frequency sounds also become audible with this.
Nikon D40 (2007-2013)
My first DSLR. Small, light, compact and shoots like a dream. Only reason I gave it away was the few focus points (only 3) and the not-so-high ISO.
NVIDIA GeForce GTX 580 (2011-2013)
Most of my successful PhD research was done on this beast.
NVIDIA GeForce 8800 GTX (2007-2009)
This used the G80 GPU and was the first GPU to support CUDA.
The shoulder joint of the human body can be simulated in PhysX by using its spherical joint. The spherical joint is used to represent a ball-and-socket joint.
In the case of the shoulder joint, we assume that the ball-and-socket is placed at the shoulder location and it is connected by the upper arm to elbow. So, we use two PhysX bodies: one located at the shoulder itself and another at the elbow. Alternatively you could put the first body at the neck and connect it by the shoulder bone to the ball-and-socket position.
The code below creates the shoulder joint:
To create the joint we need to provide the position of the two bodies involved, the relative location of the joint to those bodies. In addition, we also need to provide the local orientation of the joint to those bodies.
The joint begins life with an upright orientation, that is, its axes are same as the global axes. We need to point the X-axis of the orientation to look at the second body. The above code does that by computing the Euler angles of rotation around the Y-axis and Z-axis of the joint that point the X-axis to look at the second body. The X-axis of the joint will also be the axis around which the cone of rotation is created to bound the rotational freedom of the joint.
Once we have the Euler angles, we convert that to a quaternion. We also compute the position of the joint relative to the first and second bodies. Each pair of position and orientation rotation forms a transform. Two pairs of these are used to define the joint.
Tried with: PhysX 3.2.4, Visual Studio 2010 and Windows 7 x64