D3DModelRipper – Extracting Models From Directx9 Games


While there are tools out there that do this sort of thing, I couldn’t find the source code for any of them.  So I put together this library as a way of knowing how it goes down.  I gotta say 3d graphics is not my thing in the least, so putting this together was both challenging and fun.


To use the library, run your desired game, open up the cmd line, go to your exectuable directory and type in: Injector.exe “EXE Name” d3d9.dll PrimCount NumVerts.


Injector.exe “Slender – The Eight Pages.exe” d3d9.dll 2136 1469

The above command will pull the geometry for one of the trees in the Slender forest and dump into a file called model.obj in your Slender executable folder.

If you do not know how to get the primcounts and vertnums for the geometry you want check this other tool out.

The resulting file is in obj format.  This is probably the simplest format out there for representing 3d geometry, and most 3d modeling software is able to recognize it.



Slenderman Model in 3dsmax


Tree from the Slenderman Forest In 3dsmax


Slenderman Retextured


Github Repo

Full Project With Source

3 Responses to D3DModelRipper – Extracting Models From Directx9 Games

  1. […] want to see a working project with source that implements what has been discussed here, checkout this project.  I might also put together something for directx10 and 11, and OpenGL in the near […]

  2. Phil Bro says:

    Hey thank you so much. What you have done is simply epic. I’am currently trying to dump a whole frame. Could you give me some conclusions how to do it? Greetings and thanks for the amazing work

    • emist says:

      Hey man, its been a while since I coded this so I’m not as sharp on it as I was. However, I think I’m dumping the model by passing values to the DrawIndexedPrimitives hook and dumping the model if the values match. If you dump everything that passes through DrawIndexedPrimitives without filtering by values then you should have the whole frame.

Leave a Reply

Your email address will not be published. Required fields are marked *