Iso-Engine with D3DVERTEX

Started by
1 comment, last by Darkening 23 years, 10 months ago
I''m currently developing an isometric engine using the method showed by Bracket in is tutorial. I was wondering if it would be a good idea to use D3DVERTEX instead of the D3DTLVERTEX for implenting a dynamic lightning system? So I could use the lightning system of DirectX. Dynamic lightning would be pretty easy to implent that way (At least I think). Maybe someone has a way to do dynamic lightning on D3DTLVERTEX ? Thanks, Darkening
---------------------------Unfortunately, no one can be told what a bug is.You have to see it for yourself...
Advertisement
It''s possible to do the dynamic lighting yourself, but the problems you have to solve are pretty much the same either way.
You have to calculate the normal at each vertex and store it, then color that vertex based on the angle between the normal and the light vector.
''tis easier to let D3D handle it once you''ve figure out how you want to calculate the normal, i.e. is it the average of the normal of all faces around the vertex or the normal from one of those faces? Both have the adds and disadds. To get really nice lit terrain you have to start duplicating vertices a lot, i.e the top point of a hill needs a different normal for each face of the hill, so you have to duplicate said vertex number of faces times.

I''d recommend setting up the normals and using untransformed and lit vertexes and having D3D handle the lighting. The only real trick after that is setting up the orthographic projection matrix and camera to keep the isometric look.

none of it''s too hard to figure out with the SDK and the tutorial.
-mat williams

mat williamsLead Programmer, DesignerZero Sum Softwarewww.zero-sum.com
Thanks Thathmew, I''ll start using your recommendations right now...

Darkening
---------------------------Unfortunately, no one can be told what a bug is.You have to see it for yourself...

This topic is closed to new replies.

Advertisement