Useless Snippet #5: Ray/Capsule intersection test

January 28th, 2012 by JD

Goal: Check if a ray intersects a capsule.
Restrictions:

  1. Ray is defined by a point and a unit vector (Origin, Direction)
  2. Capsule is defined by two points and a radius (A, B, r)
  3. If there is an intersection, we must calculate the actual points of impact as well as the normals at those points

Read the rest of this entry »

Useless Snippet #4: Basic trigonometry (sin/cos)

December 15th, 2011 by JD

Goal: Calculate the sin/cos of an arbitrary angle.
Restrictions:

  1. Should be faster than CRT’s sin/cos and faster than FPU’s fsin/fcos
  2. The error should be kept to a minimum compared to the above functions
  3. Double precision is required
  4. Function should be in the form: double func(double), ie. no xmm regs passed to the function, result should be returned on the FPU stack and it should calculate only 1 angle at a time

For the rest of the post we’ll be talking about sin(). Calculating cos(), or even sincos() should be easily derived from the code below. The required changes will be described at the end of the post.
Read the rest of this entry »

Useless Snippet #3: AABB/Frustum test

August 4th, 2011 by JD

Goal: Classify whether a batch of AABBs are completely inside, completely outside or intersecting a frustum (6 planes).
Restrictions:

  1. AABBs are defined as (Center, Extent) pairs.
  2. All vectors are Vector3f’s

Read the rest of this entry »

Useless Snippet #2: AABB from a point list

July 27th, 2011 by JD

Goal: Calculate the Axis Aligned Bounding Box of a point list.
Restrictions:

  1. Vertices as Vector3f’s
  2. (Optional) Vertex list should be 16-byte aligned

Read the rest of this entry »

Useless Snippet #1: Transform Vec3f by Matrix4x4f

July 23rd, 2011 by JD

Goal: Multiply a batch of Vector3f’s with the same 4×4 matrix.
Restrictions:

  1. ‘src’ and ‘dst’ arrays shouldn’t point to the same memory location
  2. All pointers should be 16-byte aligned (see below for details on array sizes)
  3. Treat Vector3f’s as positions (w = 1.0)
  4. Matrix is column major

Read the rest of this entry »

Memory Analyzer v1.1

January 4th, 2011 by JD

It’s being a long time since we updated this little application. It seems that some of you still try to use it (and some of you have problems with it) so we decided to upload the latest version to see if some of those problems persist. If you want to try it out immediately, head to the project’s page and download the new version (yes there is a whole page dedicated to this little tool if you haven’t noticed!). Otherwise, keep reading to find out what’s new in this version.
Read the rest of this entry »

This blog isn’t dead… yet

January 1st, 2011 by JD

It has been over 18 months since our last post, but we are still here. Unfortunately some real life obligations prevented us from posting updates on the engine or anything on that matter. We’ll try to fix that for 2011!

So, we wish you all a happy, healthy and productive new year. And Keep Coding.

Memory Analyzer v1.0 demo

May 22nd, 2009 by AD

Four months ago we’ve written about a new tool we are currently developing, for tracking memory allocations in real-time. Since then, the code has changed a lot. It has been cleaned up and improved, both memory and performance wise, and today we are proud to release a demo version of it. You can grab it right now or you can continue reading, in order to become familiar with its features.
Read the rest of this entry »

Tracking Memory Allocations

January 18th, 2009 by JD

Inspired by a series of articles by Jelle van der Beek ([1-3]), as well as the implementation by Maciej Sinilo ([4]), we’ve decided to write an application for tracking memory usage and statistics of unmanaged applications. Its primary use would be to monitor the engine’s memory requirements and tracking down memory leaks.
Read the rest of this entry »

Interactive editing of Virtual Textures

November 15th, 2008 by JD

Our first attempt on interactive editing of virtual textures.

Watch in high quality (recommended)
Read the rest of this entry »