CG in Games tosyk's blog

23Oct/12304

Ho to use Ninja Ripper

Русский / English

Official support page on cgig.ru/forum

[Updated 05 Feb 2017: Chrome ripping supported]

This article describes how to "rip" 3d models, shaders and textures out of the games using as an API directx 6, 7, 8, 9, 10, 11 versions for both 64 and 32 bit and import ripped models/textures into 3DS Max, Noesis or Blender.

Attention: ripper not (and will not) support ripping models with ingame positions how it works in 3D Ripped DX.

Note: The article is designed for expirienced 3ds Max users and doesn't cover detail things such as, for example, texturing objects, setting up materials, etc.

For the conversion process, we need the following tools:

  • 3ds Max (I'm using 2009 х86) should work on versions 2009+
  • Ninja Ripper v1.6.0 (ripper itself) Author: blackninja [page]
  • GIMS Evo Importer (3ds max import script) Author: 3Doomer [page]
  • [not necessarily] ninja_importer v1.3 (3ds max script) Author: blackninja [download]
  • [not necessarily] Noesis v4+ (3d model viewer/converter) Author: Rich W. [page]
  • [not necessarily] Blender v2.49b (3d modeling software) Author: Blender Foundation [download]

1. Setting up the ripper. Unpack the archive to any folder. Run the program:

Here's all ripper features

  • Extracting all available vertex information of the models (position, all the texture coordinates, normals, weights, BLENDWEIGHT, BLENDINDICES, BINORMAL, TANGENT), indices, textures, shaders. Theoretically all extracted information could be import into the 3D editor!
  • Support for D3D11, D3D9, D3D8 (processed, however not all methods/techniques, but should work for 95% of all games).

Show all ripper function description »

  • Target (DX11, DX9, DX8, DX7, DX6, DDRAW 32/64 bit application):
    • Exe - field for direct path for the executable file of the application/game;
    • Arg - field for additional settings for executable file;
    • Dir - field for direct path to the folder which contains executable file (filled automatically when you select .exe, no need to change by default);
  • Intruder Inject - mode in which the ripper will try to run .exe of the application/game directly, using for ripping only intruder.dll, if this mode doesn't work (do not rip or even response) then you need to select one of the wrapper modes;
  • wrapper modes - modes in which ripper will copy d3dX.dll in to the folder containing the executable file of the application/game, after this ripper windows can be closed (not for the firefox rip though), then you can start the game from any location, copied d3dX.dll will automatically hooks the render in the game. Thus no longer need to run the ripper itself for this game. Here are the available wrapper modes:
    • D3D8 Wrapper - for directx8 games only;
    • D3D9 Wrapper - for directx9 games only;
    • D3D11 Wrapper - for directx11 games only;
    • DDRAW Wrapper - for directx 6/7 games only;

    Note: you need to delete .dll from the game folder manually (in case you want to use Intruder Inject mode), ripper configurations is stored in the registry.

  • RUN - button to start the application/game
  • Output Directory:
    • Dir - field for output folder (filled automatically). This folder can be changed manually, be sure that checkbox "Don't change the path" is cheked;
    • Browse - button to explore folder with selected .exe file;
    • Don't change the path - uncheked atumaticaly filled with the path to selected executable;
  • Settings button:
    • Rip Hotkeys - you can change rip buttons here:
      • All - rip textures and 3d models;
      • Textures - rip only textures;
      • Forced - rip with time interval (for 3 seconds y default);
      • also you can alternatively use Alt, Ctrl or Shift with those hotkeys;
    • Save Shaders (for experts) - activating this will forced save of the haders (sometimes does not allow to run the game);
    • Forсed Rip Interval [X] second - as it said;
    • Save DirectDraw Surfaces (DX-DX7) - texture/sprites, mostly fair for 95-99 years games;
  • About/Donate button - if you like this tool and want new features to be added to it please support developers!
  • Exit button - closes ripper.

Select the game you want to "rip". In the Ripper window click the button '...' to select .exe of the game.


Note: You can add game's .exe by drag-and-drop from explorer window to the ripper window

Choose the mode in which the ripring process of the game will be produced. Mode depends on directx version which game runs on. See modes description:

  • Intruder Inject - mode in which the ripper will try to run .exe of the application/game directly, using for ripping only intruder.dll, if this mode doesn't work (do not rip or even response) then you need to select one of the wrapper modes;
  • wrapper modes - modes in which ripper will copy d3dX.dll in to the folder containing the executable file of the application/game, after this ripper windows can be closed (not for the firefox rip though), then you can start the game from any location, copied d3dX.dll will automatically hooks the render in the game. Thus no longer need to run the ripper itself for this game. Here are the available wrapper modes:
    • D3D8 Wrapper - for directx8 games only;
    • D3D9 Wrapper - for directx9 games only;
    • D3D11 Wrapper - for directx11 games only;
    • DDRAW Wrapper - for directx 6/7 games only;

Note: you need to delete .dll from the game folder manually (in case you want to use Intruder Inject mode), ripper configurations is stored in the registry

Start the game by pressing the Run button:

2. Game rip process. After game is started the folde _NinjaRipper will be created near the application exe. In game choose the desired location and click the "rip" button (F10 by default). After pressing F10 the game will "freeze" for a second or so, then it will run for a bit and "freeze" again for about 5-25 seconds. Duration of ripping process depends on complexity of the game and the computer capacity. During the ripping process all the ripped resources will be storing inside the <game EXE folder>\_NinjaRipper\ folder. 3d model format is .rip, texture format is .dds.

Press Textures rip button (F9 by default) to rip the textures only. Press Forced rip button to rip for a period of a seconds - it's important for ripping web sites (ex: WebGl) with 3d models. Firefox and Chrome is officially supported only. I should mention that normaly after ripping process is over the game will be unfreezed and you can continue it from the same point. However there're many games which continue runnig during ripping process or games which screen will dimmed after ripping process so you can hear the game but can't see it.

3. Importing models into 3ds max. There's a 2 versions of .rip import script for 3ds max:

  • first one (further: old) script was written by the ripper's author and have standart functions. Its only issue is getting uv coords out of .rip files;
  • second (further: new) script - GIMS Evo - has a lot of various functions. One of its important feature is importing vertex weights and bone creating in "right" position in the scene. I recomend using this script. New version of its web installer can always be downloaded here.

This is how main window of GIMS Evo looks:

How to install this script:

  • Extract "scripts" folder into the 3D MAX directory with files replacement.
  • Extract "GIMS" folder with files replacement into:
    • Windows Vista/7/8: "<DRIVE>:\Users\<USER_NAME>\AppData\Local\"
    • Windows 2K/XP: "<DRIVE>:\Documents and Settings\<USER_NAME>\Application Data\"
    • If you have some errors with GIMS Evo loading, run that script to get the installation path:
      • dl.dropbox.com/u/18649105/GIMS/ShowEGIMSPath.ms
  • Start 3D MAX, check your internet connection, and install GIMS from the Utilities tab

Показать детальное описание функций импортера »

Scene section:

  • Bones - choose to or not calculate bones along with the Skin modifier and weights on imported meshes :
    • Don't create - bones and weights will be skipped on import;
    • Create at zero - bones will be created at mesh pivot center also Skin modifier will be created on the mesh;
    • Create at calculated position - bones will be created at calculated positions and Skin modifier will be created on the mesh;
    • Reuse scene bones - existing in the scene bones will be reused with the new imported bones;
    • Split the mesh by skinning when possible - as it says the mesh could be splitted by the mesh skinning properties;
  • Flip Faces - check to flip polygons of the imported meshes;
  • Scale - setup imported meshes scale;
  • Position - setup XYZ position of the imported meshes;
  • Rotation - setup XYZ rotation of the imported meshes;
  • Miror - reflect imported meshes by XYZ;

UV coordinates section:

  • Flip U - flips UV coordinates by U;
  • Flip V - flips UV coordinates by V;
  • Offset U/V - setup U or V offset ;
  • Scale U/V - setup U or V scale;

Texture Indices section. Look at the texture's ID which is related to the imported mesh. For example Tex_0001_0.dds defined by the number before ".dds" is usually used as diffuse texture:

  • Diffuse - define which texture will be used for diffuse slot map by ID;
  • Bump - define which texture will be used for bump slot map by ID;
  • Specular - define which texture will be used for specular slot map by ID;

Import section is for settings of the mesh import:

  • Mode - choose to import single or group of files;
  • Engine - use specific engine for meshes to import. Use Other engine for all the games. However you can use the following engines: Frostbite 2, Frostbite 3, Frostbite 3.5, YETI engine;
  • Path - path to the folders with rip files and textures. Press folder icon to change;
  • File IDs - enter the mesh number to import. Could be the following input format: "0-15, 589, 67" or just "1" (without quotes);
  • Import - button to start Import;

Preset section at the bottom of the window:

  • Drop-down list with the name of the preset - you can select/save preset of the importer settings;
  • Remove - removes selected preset;
  • (i) - importer information button.

To import .rip models into 3ds max choose Import Mode, path to the files and press Import button. All the possible uv ccords will be loaded on the model automatically into separate uv channels if there's more than 1 uv set.

Show details on Outdated 3ds Max Importer »

Open 3ds max. Menu MAXScript > Run Script... choose a script ninja_importer.ms, window opens:

All importer function description

  • Source select (source selection and the import mode):
    • Group - import group files
    • Single - import single files
    • List File - import files from list (not implemented yet)
    • Input Dir/File - import source, the file or folder (depending on the selected mode)
    • RIP File Nums - field to enter the file numbers to import (Group mode only), the input format is: 0-15, 589, 67
  • Vertex Format (selecting the model building settings):
    • Auto - mode to automatically identify groups of data (vertices, normals, uv-coordinates), will work for most games
    • Manual - mode for manual definition of groups of data, you needed to import the models of the new games (mostly directx11)
    • Position (x,y,z) - fields for enter data defining the position of the vertices of the model, even in manual mode these parameters in 99% of games will not change
    • Normal (x,y,z) - fields for enter data defining the normals at each vertex of the model (not implemented yet)
    • TexCoord (u,v) - fields for enter data defining texture coordinates of the model, one of the most important parameters. For games, wich model imports without a proper uv-coordinates, a pair of UV always choosing by search. At the time is Identified that pairs can not exceed number 50, that is can be 6-7 or 18-19 or 24-25 or 39-40 etc. In very rare cases, a pair of uv can be 3-4 or 4-5 or 5-6, which is within the "normal field of definition", as well as 8-6 or 12-11, which is at odds with common sense, but may still be.
  • Transformations:
    • Scale - the scale of the imported model
    • Rotate - turn imported model on the selected axis
  • Tex.0 File Level - choice of a number of the texture, which applies to the model after import
  • Flip UV Vertical - will flip vertical texture coordinates
  • IMPORT - button to start the import process

To import a model click Browse button:

Choose .rip the file and click Open button. Model will load into 3ds max. If you do not like the result, change the Vertex Layout import mode from Auto to Manual, an additional options will be available:

Will attach an image for a visual understanding of what kind of numbers and what they are accountable (color/area in the image below correspond to the colors in the image above):

This picture shows the data template of the .rip file. From the template follows: green zone (model), blue zone (normal), orange zone (uv, texture coordinates), details:

  • vertex data (the model) is based on the first three values ​​(00=x, 01=y, 02=z), also the numbers correspond to what is in the importer, thus 00=0=x, 01=1=y, 02=2=z. These values ​​can be changed in the importer to accept any numbers, but in 99.99% of the games these values ​​remain unchanged, and it is better not to touch them at all
  • normal data (for smoothing groups models corresponding to the 03, 04, 05) - in the current version is not complete, changing the values not yield results
  • uv, texture coordinates - represented by two numbers (06, 07, or 07, 08 or 24, 25), not three as in the case of vertices or normals - in 80% of the games are the same, but there are games (eg: Battlefield : Bad Company 2 or NFS: Run) where you need to change these values to get proper uv​​, and sometimes even go in the values of "normal zone" (ie, they can be 03, 04), but they are never go into "verte zone". These values ​​need to change simple by search the numbers. In the picture below - an example.

Thus selecting the model by setting the import (uv, scale, rotation, etc.) then press the IMPORT button. The model will load into 3ds max.

You can also import models massively. To do this, instead of Single in Source Select choose Group and write the numbers corresponding to the .rip file's name this way: 15,489,0, 50-85 into RIP File Nums

After setting up import process press IMPORT button, all files that match the written numbers will be imported into 3ds max.

Note: If files imoported into 3ds max (models/textures) will be to many than 3ds max will crash. So choose and import exactly what ever you wanna work with by looking in texture names.

Ripped models (sometimes textures) can be also loaded into Blender or Noesis tools.

  • use this python script to import models into Blender (by Akaito);
  • script for Noesis is in the NinjaRipper archive;

4. About textures. Textures are always .dds files. They are automatically loaded into 3ds max for most of the time. It should be noted that each model corresponds several textures, for example a model Mesh_0000.rip can have multiple textures with names Tex_0000_1.dds, Tex_0000_2.dds, Tex_0000_3.dds etc. But you can only load one of these textures in 3ds max. What is the texture will be loaded is selecting in the importer by changing number in Texture Indices function.

Note: If you're using a program for generating "preview" for .dds files in Windows explorer (I use Mystic Thumbs) then when ripping dx11 games the mini-preview for such .dds will not be shown, because they have wrong file header, the problem is not solved yet. However you can edit/view those dx11 .dds files in photoshop/irfanview/etc.

5. Results. Here's some results of the game's rips Battlefield: Bad Company 2, Battlefield 3, NFS: Run, Expendables 2:

Comments (304) Trackbacks (0)
  1. Hi.

    When I import the model in 3d Max the position of different part of a body are all in the same place.

    It can be posible to respect the original coordinates of the different model parts?

    Regards.

  2. GSamu, not possible.

  3. Hi great tool, just wondering if there was plans for a global monitoring mode like 3DRipper has? It would be nice to be able to rip from games you have to launch from a web interface etc.

  4. Mal, no plans to do that — project is closed.

  5. When I rip a model out of a game it only captures half of it, what do?

    pic related
    https://s27.postimg.org/87t918rlf/Screen_Hunter_163_Dec_23_23_12.png

  6. huehue, maybe this object seen by half in the game. or another half is in another ripped object. try to import more objects in 3ds max.

  7. Tosyk, I import all the .rip files and delete the ones not wanted.

    also, How does ninja ripper work? it doesn’t grab everything in the game only some of the things that appear on screen?

  8. huehue,

    >only some of the things that appear on screen?
    yes! that’s the way all 3d rippers works.

  9. Hello…
    I wanted to know if can somehow convert that .rip file to .obj file??

  10. Hello Tosyk. On December 23rd 2016 you wrote “project is closed” .
    Does it mean , only the Ninja Ripper is discontinued, or is there no more successor at all ?

  11. togemax, I only meant NR developing 🙂

  12. Can anyone get the models from FNaF SL? 🙁

  13. Can anyone get the models from Siper IV

  14. Can anyone get the models from Sniper Elite IV
    or Mafia III

  15. A global monitoring mode would be nice.


Leave a comment

No trackbacks yet.