Advertisement

Isometric using full D3D math...

Started by August 20, 2000 06:26 AM
10 comments, last by Christiaan 24 years, 4 months ago
quote:
I don''t recommend using TLVERTEX to render your tiles, because then you lose all
transformation and lighting functionality that makes Direct3D even worth using.


As I already pointed out clearly, you can use D3DTLVERTEX vertices to draw
isometrically shaped polygons if you want to use 2D with 3D. You can then render
your textures onto these polygons. You *don''t* need lighting and transformation
for this.


Anyway, here is an orthogonal matrix for D3D:

      Ortho:                     Perspective: 2/w   0    0    0            2/W   0    0    0  0   2/h   0    0             0   2/H   0    0    0    0    q    0             0    0    Q    1   0    0   -zq   1             0    0   -ZQ   0 D3DMATRIX ortho = ZeroMatrix(); float q = 1.0f / (far_plane - near_plane); ortho._11 = 2.0f / w; ortho._22 = 2.0f / h; ortho._33 = q; ortho._43 = -(near_plane*q); ortho._44 = 1.0f; 


Notice that two of the main differences between an ortho and a
perspective matrix is that member _34 is zero and member _44 is
one for an ortho matrix. The z''s and q''s are a little different
too I think.


I''m currently working on an engine that does jut that - and I''m using TLVertices. It''s not difficult at all to get the basic thing running. Right now I''m working on getting many different textures on the tiles - and FAST.
I''ve also made an editor (well, it''s not finished yet) for the 3D meshes - I transform everything myself so that 3D models can be rotated 360° in every direction in realtime. Of course, whatever is parallel in the mesh is also parallel on screen.

I think this is what Christiaan is trying to do, right?

My recommendation is to use TLVertices. I don''t think anything else is worth the hassle.

Just my .02 € worth...


- JQ
pmjordan@gmx.at

lead programmer,
PWC Software
~phil

This topic is closed to new replies.

Advertisement