Blog

By DigitalRune Team on Tuesday, May 01, 2012

This is a guest post by Kairat Aitpayev.

Augmented Reality (AR) technology allows adding virtual object to the real world using special markers. By merging it with Microsoft Kinect I have created new approach which allows users to use their own body as a collision object in the 3D world and interact with augmented objects.

Video

Here the presentation of the demo application which by itself is a part of bigger project related with online sport education:

(Full video of entire project: See https://vimeo.com/41136278)

The project was created in the MultiMedia Lab of Kazakh-British Technical University (Kazakhstan) in collaboration with University of Technology of Belfort-Montbeliard (France).

DigitalRune libraries are used to improve the interaction between the real and the virtual world.

By DigitalRune Team on Thursday, August 11, 2011

Manually creating good ragdolls in code can be tough. This blog post takes you on a hands-on ragdoll creation journey and provides several tips.

By DigitalRune Team on Monday, April 11, 2011

We have recently added 3D vehicle physics to our DigitalRune Physics library. In this post we will explain how the car physics works, so that you can either create your own car physics, or you can understand and tune the car physics that comes with our libraries.

Our Goal

Let’s have a look at what we want to achieve. Following Vehicle Sample is an XNA example project that is included in the DigitalRune Physics Bundle:

Requirements

By DigitalRune Team on Wednesday, March 23, 2011

The .NET Framework 4 contains the Task Parallel Library (TPL). It introduces the concept of tasks. Tasks represent asynchronous operations that can be executed concurrently. Developers no longer have to manage threads or thread pool work items directly. The library provides a higher-level API for writing multi-threaded application or games. The only negative thing we can say about the TPL is that it is not supported on the .NET Compact Framework and is therefore not available on the Xbox 360 (or the WP7).

When we added multithreading support for our libraries, we looked for an easy-to-use, cross-platform threading library. After evaluating a lot of solutions we found the ParallelTasks library on CodePlex. The library is a lightweight replacement for the TPL. It offers all relevant features such as …

By DigitalRune Team on Tuesday, January 04, 2011

In almost all 3D games collisions between complex shaped objects must be detected. For collision detection the triangle meshes can be used directly but this is a lot slower than using boxes, spheres or convex shapes. Therefore, for each model a collision model should be created that consists only of simple primitives. This collection of shapes approximates the shape of the detailed 3D graphics model. This blog posts discusses how we can use the XNA content pipeline to load shapes from a collision model created in a 3D modeling tool. The example source code can be downloaded.

Model-In-BlenderCollision-Model-In-Blender

By DigitalRune Team on Wednesday, November 10, 2010

Fine, we have found a way to implement Continuous Collision Detection (CCD), but how do we integrate this into our game physics library?

This article explains how to use CCD in game physics; especially a technique called motion clamping that is used in DigitalRune Physics and possible pitfalls you could come across when you use game physics with CCD.

By DigitalRune Team on Wednesday, October 13, 2010

ContinuousCollisionDetectionSample

The last posts (Continuous Collision Detection – The Problem and Continuous Collision Detection – Solutions) covered Continuous Collision Detection (CCD). Here are a few more notes related to CCD.

Notes

  • CCD is more expensive than discrete collision detection.
  • Use CCD only for objects that move with a velocity that is high (relative to the object’s extent).
By DigitalRune Team on Friday, October 08, 2010

In the last post we talked about the shortcomings of discrete collision detection and why we need continuous collision detection (CCD). Now it is time to discuss ways to implement CCD to avoid tunneling of objects (missed collisions) and find the time of impact.

By DigitalRune Team on Thursday, October 07, 2010

Collision detection in 3d games detects whether objects are intersecting. The normal discrete collision detection does so by checking the objects at their current position. Then the game moves the objects and the collision detection checks the objects at their new positions.

This method works for slow moving objects, but for fast moving objects critical collisions can be missed. To detect all collisions we need “Continuous Collision Detection” (CCD), which we will discuss in this and the next blog posts.

By DigitalRune Team on Friday, September 17, 2010

When writing a 3D collision detection system you will most likely run into the following problem: Given a convex polygon (in 2D) or a convex polyhedron (in 3D), which of its vertices is the extreme point in a given direction. The problem is known as Support Mapping or Extremal Query. (The resulting vertex is called Support Point or Extreme Point.) Algorithms like GJK, EPA (Expanding Polytope Algorithm) or MPR (Minkowski Portal Refinement) rely heavily on extremal queries.

For simple polyhedra (small number of vertices) you can simply do an exhaustive search to find the extreme point in a given direction. However, for complex polyhedra you want to find a way to accelerate the query…

By DigitalRune Team on Monday, September 13, 2010

BunnyIn the last post we computed convex hulls for the XNA dude. Convex hulls are useful approximations for collision detection because many algorithms like GJK, EPA (Expanding Polytope Algorithm) or MPR (Minkowski Portal Refinement) can handle arbitrary convex objects. We also used simplified convex hulls. In this post we describe how we have implemented convex hull generation, convex hull simplification and skin width.

Convex Hull Computation

Actually, there are many convex hull algorithms. Here is a java applet showing different algorithms: http://www.cse.unsw.edu.au/~lambert/java/3d/hull.html

We started with incremental construction as described in this book:

By DigitalRune Team on Friday, September 10, 2010

DigitalRune Geometry supports automatic generation of bounding shapes and convex hulls. Using simple bounding shapes or convex hulls is more efficient than using arbitrary triangle meshes in game physics. In this post we will investigate different kinds of bounding shapes.

What's up dude?

Let's look at a practical example. Here is the Dude from the XNA Skinned Model Example:

XNA-Dude

The model has 13132 vertices and the skeleton has 60 bones.

Bounding Spheres

Here is the same model where a bounding sphere is computed for the vertices of each bone.

By DigitalRune Team on Thursday, August 26, 2010

Yet another blog post about character controllers for 3D games, and this time we will talk about the actual implementation.

Kinematic Character Controller Using Discrete Collision Detection

Here is how the character controller in our Character Controller Example works:

Capsule Shape

The character is represented as a an upright capsule that does not rotate:

Character_Capsule

By DigitalRune Team on Friday, August 20, 2010

There are at least two ways to implement a character controller for a 3D game: Kinematic and Dynamic Character Controllers. In this post we discuss the difference and which solution is better.

A short reminder:
In this context a character controller is the piece of code that computes the movement of the player character in the game. It takes care that the user does not run through walls, can step up/down, jump etc. The character is often modeled as an upright capsule.

Related posts:  3D XNA Character Controller Example and Character Controller Requirements

Kinematic Character Controller

By DigitalRune Team on Tuesday, August 17, 2010

In one of the last posts we introduced our Character Controller Example. In the next posts, we will discuss character controllers for 3D games in more detail, including: general requirements, kinematic vs. dynamic character controllers, implementation, character controllers in virtual reality.

This post starts the series with a discussion of requirements of 3D game character controller.

Functional Requirements

Teleport

The first requirement is teleport because the character controller must be set to its initial position. A teleport sets the character to a new position. It doesn't matter where it was previously and if there are obstacles between the old and new position.

Recover from penetrations

By DigitalRune Team on Wednesday, July 21, 2010

Box-Collision This blog post contains our collection of references for Collision Detection: website links, a list of collision detection libraries, list of books. This post will be updated from time to time.

If you know other useful links, please let us know and we will include them in this blog post.

Collision Detection Websites

This is a collection of various links about collision detection and related topics. 

 

By DigitalRune Team on Wednesday, July 21, 2010

CharacterControllerSampleFor the new DigitalRune Geometry library we have created a simple 3D character controller example (including source code).

A character controller, as understood in this context, is a game engine module that computes the movement of an avatar in a game. The input for the character controller is the desired movement (e.g. “move forward with 5 m/s speed”, or “jump”) and the output is the new corrected avatar position in the 3D game world. The character controller has to apply gravity, avoid penetration of walls and other solid objects, handle stepping up/down slopes and stairs, and more.

 

Article Collection

A collection of the most useful blog articles can be found here:

Article Collection
(on Documentation page
)