Skip to content

Character Import Guide

AdrienTD edited this page Mar 20, 2022 · 3 revisions

This guide will show one way for replacing characters in XXL1 with custom models using the XXL Editor and Blender.

Pre-requisites

Steps

Part A - Export model to DFF

  1. Open the XXL Editor and load the desired level.
  2. Open the Scene graph window (Window menu > Scene graph).
  3. Select the model you want to replace (Asterix, Obelix, ...) in the 3D view.
  4. Then, in the Scene graph window, click the Export geometry to DFF button.
  5. Save the DFF file.

Part B - Rigging

  1. Open Blender, (delete default cube).

  2. Import the DFF previously saved (character you want to replace, e.g. Asterix). Once imported, you should see the model and its armature that is parented to the model, as seen below:

  3. Separate Asterix's armature from the geometry. You can do this by:

    • In the Outliner area, hold Shift and drag the armature outside of the model's subtree.
    • In the 3D view, select the armature, right-click, click Parent > Clear Parent.

    It should look like this:

  4. Import the character you want replace with.

  5. Place the new character onto Asterix, scale/rotate it and verify that the proportions match.

    Be sure that any transformation you apply on the new character must be applied to its mesh! (use Ctrl+A and apply all transformations)

  6. Move/hide/delete Asterix's model away (and keep his armature)

  7. Now apply Asterix's armature onto the new character's model. Select the new character, hold Shift, select the armature, then press Ctrl+P and in the menu select "With automatic weights".

    If it works, the model should be now parented to the armature, like this:

    But if instead you get an error like this:

    Bone Heat Weighting: failed to find solution for one or more bones

    then your model is not well optimized for the auto weighting algorithm to work. See Appendix for tips on how to optimize your model.

  8. The model is parented to the Armature, however, the DFF exporter expects the other way round: the armature needs to be parented to the model. To do this, unparent the model from the armature (similar to step 3, but with the model instead), then parent the armature to the model: select the armature, hold Shift, select the model, press Ctrl+P, and in the menu select "Object". The hierarchy should now look like this:

  9. Ensure that the armature is still applied to the model: select the model, go to the Modifier tab, click Add Modifier, add an Armature modifer (in the Deform column), then in Object select the armature:

  10. Test your model if it is rigged: select the model, go to Pose mode select the bones and try to move them and see if the model is affected.

  11. Ensure that your model has a vertex color map: select the mesh, go to the Object Data properties tab, expand the Vertex Colors, and click the + button to add a new one.

  12. Be sure only the new character model is selected, then export it to DFF:

    • Go to File > Export > DragonFF DFF
    • Be sure Only Selected checkbox is enabled if you want to only export the selected model.
    • Be sure that the DFF version is set to GTA SA (v3.6.0.3).
    • Save the DFF.

Part C - Importing new DFF

  1. Go back to the XXL Editor and load a level
  2. Select Asterix's model, and in the Scene graph window, click Import geometry from DFF.
  3. Open your DFF file, and now you should see your model! (but with no textures yet)
  4. In the Scene graph window you should see a list of texture names that your new model uses, and which need to be imported. Click the Window menu, open the Textures window, then click Insert and insert every texture used by your model.
  5. Save the level and test it!

Model optimization tips

  • Be sure that all vertices of your model are linked in a single mesh.
    • Select all vertices, press M and do a Merge By Distance.

TBC