2

I am trying to determine exactly what the projection matrix is used by the game fallout 2. I am interested in making some similar projection.

I found some information (ie, measures of the tiles etc) here: http://archivewiki.fifengine.net/Map_GFX_contest

I am trying determine how to reverse that projection into a matrix. I know I am missing some information that would make it difficult to construct an complete matrix (ie, depth). This may be relatively trivial, however I am not overly familiar with matrices.

You can see in the following image: enter image description here

That the dimensions of the projection are documented. I am just not sure how to use that to reverse the projection.

Jeremy
  • 131

1 Answers1

1

I seem to have been thinking of an overly abstract solution. Maybe that would be a more ideal one (ie, determining the projection angles etc...) However it was actually simple to derive a projection matrix.

If x' is your projected x coordinate (on a 2d surface, obviously) and y' is your projected y coordinate, you can transform the point (x, y, z) [in 3D space] onto your 2D surface using the following 3x3 matrix:

48, 32, 0

-12, 24, -36

0, 0, 1

Essentially it boiled down to just constructing a system equations and solving for the missing variables. You can further break down these 'magical constants' and determine the angle of projection etc, but doing so isn't required for my use case.

x' = ax + by + cy 32 = a0 + by + c0 -> a = 32

etc until you find all the variables.

Jeremy
  • 131