The Theory behind Physics Simulations

Posted by Kaya Kupferschmidt • Wednesday, March 23. 2005 • Category: Programming
I have always been curious about how all these advanced rigid physics simulations work in most modern games. Of course there are some ready-made libraries like ODE or Newton Game Dynamics that you can use in your own projects, but I still wanted to know about how these libraries actually work.

By incidence I found the Ph.D. dissertation from Kenny Erleben with the promising title Stable, Robust, and Versatile Multibody Dynamics Animation, as it was mentioned on the ODE mailing list. I really can recommend this work to everybody who wants to know about the internals of rigid body physics simulation, although the mathematical notation seems to be somewhat needlessly complex at some places, it contains lots of valuable information.

And for the fast readers, there is a course called Multibody Dynamics Animation held by Kenny Erleben and some others researchers at the Datalogisk Institut containing many downloadable PDF-slides.

Serendipity Upgrade

Posted by Kaya Kupferschmidt • Friday, March 18. 2005 • Category: General
Just a short note: Today I upgraded the blog-Software to Serendipity 0.8, hoping that the new version will fix some bugs without introducing new ones. If the layout of the page seems to be incorrect, your browser may be caching an old CSS file, so simply force a fresh reload, and everything should be fine again.

Kaya

Hardware Accelerated Raytracing

Posted by Kaya Kupferschmidt • Monday, March 14. 2005 • Category: Programming
Raytracing is a very expensive technique for generating photorealistic images that has a long history - in fact it is one of the oldest approaches to high quality rendering invented by Andrew Glassner many years ago, the first images where halftoned bitmaps printed on a black and white printer. But much time has passed.

Nowadays NVidia show us how to do Raytracing on the GPU - but it still far too slow for being used for complex scenarios in realtime environments. A remedy may be seen in the projects by the Computer Graphics Department of the University of Saarland in Germany. They are working hard on SaarCOR, a hardware architecture for real time ray tracing. They already have a working prototype and ported some games to the new architecture. They are even working on an API like OpenGL, they call it OpenRT (which actually does not seem as open as the name might suggest). The CeBIT visitors can visit their spin-off called inTrace, which tries to sell this exciting technology.

As a conclusion one can say: Today we are still excited about the programmable GPUs, but there are already heavy undertakings going on into far more complex domains which will give us a totally new level of realism.

20 Questions - The neural-net on the Internet

Posted by Kaya Kupferschmidt • Saturday, March 12. 2005 • Category: Weird
I just found 20 Questions - The neural-net on the Internet, a very interesting project indeed. The computer will guess an item in your mind by asking less than 20 simple questions. Sounds unrealistic? Try it!

From the website: " 20Q.net is an experiment in artificial intelligence. The program is very simple but its behavior is complex. Everything that it knows and all questions that it asks were entered by people playing this game. 20Q.net is a learning system; the more it is played, the smarter it gets."

Measuring Performance in Windows with C++

Posted by Kaya Kupferschmidt • Friday, March 11. 2005 • Category: C++
Currently I try to make up some performance measurement instruments for C++ programs running under Windows. But the whole project turns out to be more complicated than I first thought - which explains why I haven't found a good solution yet. But let me explain the obstacles one will stumble over alomst immediately, especially if you want to profile routines that do not need much CPU time.

First what are the requirements of a good time-based profiler?

  • High temporal resolution. When one wants to profile a single function, a high temporal resolution of the timing mechanism is indispensable for valid results. Especially with computers getting faster and faster, the timer should be capable of capturing events within the range of 100ns.

  • Minimal overhead. If you want to measure very small time intervalls, the capturing mechanism has to be very fast in order to keep its own influence minimal.

  • Impassable of context switches. Today every operating system performs preemptive multitasking, that means the current running thread could be interrupted at any point. If this just happens within a function of which you are collecting run-time information, the timing mechansism must take into account the fact that not all CPU cycles between the start and the end of the profiling are were used to execute this function.

  • Independance of CPU in SMP systems. In SMP systems (or even in Hyperthreading systems) the current thread may be executed by different CPUs after each context switch. If the timing mechanism is relying on some CPU-specific data (like the number of cycles executed), special care must be taken to either incorporate such CPU switches or to simply attach a thread to exactly one CPU.

  • Independance of Power Saving modes. Another problem arises if power-saving modes are enables, which might slow down the core frequency of the CPU and thus falsify the profiling results.


As you can imagine a mechanism that is independant of all such side-effects mentioned above is not very simple to implement and probably requires special support from the operating system.

Continue reading "Measuring Performance in Windows with C++"

Hardware Physics Acceleration to come soon?

Posted by Kaya Kupferschmidt • Wednesday, March 9. 2005 • Category: Programming
After hardware based 3D graphics acceleration is a standard feature for at least five years, a new acceleration domain tries to emerge: Hardware based physics acceleration. Believe it or not, but it seems that a company called AGEIA is developing such a specialise chip for usage with the Novodex Physics SDK.

Although many games could benefit from some better physics, I really doubt that this chip will be a big success for two reasons: 1. Who will be buying a PCI add-on card with a physics accelerator? Only a hand full of hardcore gamers. 2. Which console contains this chip? As far as I know none of the next generation (PS3, XBox 2) will contain this chip.

Looking at the upcoming multi-core CPUs developed by AMD and Intel and the Cell Processor, this Chip does not seem really to make a lot of sense nowadays. Modern CPUs already contain quite good and fast support for vector operations, and I don't expect a physics simulation to benefit of hardware acceleration in a comparable way to graphics acceleration.
But maybe I am wrong, and a specialised chip for phyiscs will turn out to be the future.

Update: Gamer's Depot has the exclusive interview with the developers of this new technology and some photos of the new board and chip.

Kaya Memisoglu