[OT] Any1 worked on D3 loader?

Hi,
Since I got my hand on a D3 alpha, I worked on reading such stuff in my 3d engine. I think I’m reaching the limits of my gf2mx. Poor card, she hasn’t been created to fight against so many polys & states =)

Well to speed up all this, I had to flag for each light the faces that was closed enought from the light to be able to receive light. This speeds a lot rendering, and is contradictory with the “don’t touch every faces, don’t do anything particular per face”. But after all, this is done for free when you compute your vertex to light vector on the cpu (gf2mx do not have vertex/pixel shaders).

So:

  • portals: flag every visible faces to FlagRender
  • For each light,
    • for each vertex flagged as “seen” by portal culling,
      • compute vertex to light vectors, and when the vector norm is short enough,
        • Flag it to FlagIsInLight
    • Compute shadow volume using vertex with flag == FlagIsInLight
    • Display all faces with flag == FlagRender and with at least one vertex having flag == FlagIsInLight
    • Increment FlagIsInLight

Last but not least (for next frame):

  • FlagRender = FlagIsInLight+1

Result in 15-25 fps without shadows on fred/e5bathroom (5-12 with shadows). Not that bad I hope.

Does any1 have some other tips/ideas?

[This message has been edited by tfpsly (edited 04-08-2003).]

D3 = DoomIII?

You’ve got a spec for the map format?!

It’s a text file, it isn’t that hard to figure out…

Indeed that’s very easy to read (including maps, surface materials, monsters and a good part of the objects in the levels). I currently do not include the lwo object, I’m still to include my previous engine’s lwo reader in Yac3de.

You can get a video of the result on http://tfpsly.planet-d.net/videos/Doom3.avi

There’s no shadow in the video as I seem to have corrupted the shadowing code (I think I’m discarding too many faces of the map before building the shadow volume: it works fine when I just use all faces from the visible areas).

Originally posted by Bossa Nova:
D3 = DoomIII?
You’ve got a spec for the map format?!

See the following thread to have more information about that: http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/007830.html