SCHG How-to

Import Levels Into Sonic Unleashed

From Sonic Retro

SCHG:Sonic Unleashed (XBOX 360/PS3)
Main Article
Import Levels (360)

(Original guide by Gotta Play Fast)

A not-so-complete step by step tutorial on how to import levels into Sonic Unleashed. This method does not currently work on the PS3 version. (Will be updated once a better method has been found!)

Required Tools

Optional Tools

Worth noting: You can use just about any version of 3DS max for terrain exporting.

Step 1: Finding a stage

  • The Models Resource is a great place to find rips of stages/levels from games, although there are many alternatives that you can use.

Step 2: Importing into 3DS Max

  • Important: Make sure units are set to meters. Go into Customize and click Units Setup and set it to meters. You must also go into the System Unit Setup menu in the Units Setup menu and set it to meters. This ensures your stage will have the correct scale, as Sonic Unleashed (like generations) uses the metric system.
  • Use the import function by clicking the top left icon in 3DS Max. Select your file type and import the stage into 3DS Max.

Step 3: Scaling the stage

  • After importing, It is necessary to scale the stage. The easiest thing to do is create a box that is as big as Sonic. His dimensions are 0.5m x 0.5m x 1.0m. You can use this box as a reference.
  • Scale your stage by selecting all the objects in the stage, then in the right click menu, select scale. Make sure you don't scale your reference object!

Step 4: Exporting stage geometry

  • Once you have the correct scale, it's time to export the stage geometry!
  • First, you must download the Easy Ogre Max Exporter for 3DS Max, which is above in the required tools. Make sure you download the correct one for your 3DS Max version and for your operating system (x86 or x64).
  • Import the plugin by going into Customize > Plug-in Manager... then right clicking anywhere in the box and selecting Load New Plug-in...
  • Select the file that you downloaded and it should load into 3DS Max as an export option.
  • Click the top left icon and click Export. Have it export it as a .scene file. Make sure to export it into a separate folder so you can keep everything that you exported organized.

Step 5: Importing geometry to SonicGLVL

  • Open any Sonic Generations stage in SonicGLVL (This may seem strange, but it'll make sense later. I'll be using ssz200 as an example) and load the terrain groups (and unpack them before if it's not done already). After it's all loaded, clear all terrain geometry (it's under the terrain menu section). This will take a while, so please be patient. If it crashes, don't worry, because when you will relaunch SonicGLVL, the terrain geometry will be cleared. Once it is done, under the terrain section, click Import Ogre .scene as geometry.
  • After you select the .scene file, generate the terrain groups under the terrain section.
  • you must now go under the file section and repack the terrain geometry.

Step 6: Opening Sonic Unleashed stage files

  • Find the stage you want to replace and copy the files into a new folder. (Example)
  • After doing so, open Quick BMS with the 360 xcompress script, select the stage files and click "Open". You may be prompted that certain files share the same name, If so, type 'r' then hit the enter key, your files should finish decompressing shortly after.
  • You'll be met with your original files and the new decompressed ones. You can get rid of the original files, we won't be needing them anymore.
  • Now you'll need to give the new files their original names. (Example)
  • You are now able to unpack the .ar files with the 'Generations Archive Editor' tool. Extract the ars to new folders sharing the name of the files. (Example)

Step 7: Porting from GLVL cache

  • Things start to get tricky here, so you need to read carefully!
  • Open the cache folder within the GLVL directory and locate the Sonic Generations stage you re-packed earlier (you should find these folders in the stage cache).
  • Now you'll need to open the 'Resources' folder, and copy all of the files containing these extensions to the #ar folder: .terrain-group, .terrain, .tbst, .gil and .gi-texture-group-info.
  • After doing this, you'll want to throw all texture and material files, as well as autodraw.txt and the visibility-tree.vt from the 'Resources' folder into the ar folder. (you'll need to convert your materials to be compatible with Sonic Unleashed through the use of GLVL by clicking this, after doing so, navigate to your AR folder and hit save.)
  • You'll also want to delete the .PFI files located in the #ar folder!
  • Now, create a new folder where your ar and #ar folders are and name it 'Stage', you need to create another folder inside of that, and give it the same name as the ar folders. Within this, you need to create another two folders: 'gi-atlas' and 'terrain-group'.
  • Heading back to the GLVL stage cache, open the 'stage_ar' folder, select all the .ar files beginning with 'tg' and put them in your 'terrain-group' folder. Select the remaining .ar files (the ones beginning with 'GIA') and put those in your 'gi-atlas' folder!

Side Note: In Step 5, you basically created a Sonic Generations stage mod. This process basically backports the stages from Generations to Unleashed.

Step 8: Collision

  • Download Havok Content Tools 5.5.0 if you haven't already done so. Install it to your Autodesk 3DS 2008 directory or the XSI mod tool directory.
  • Go back to your current project in 3DS Max and select all of the objects that you want to have collision. It's recommended that minor objects such as grass or small bushes not have collision. Go to the right and hover over the icons and find the one that says modify. It should have a rainbow icon.
  • In the modifier list, select Havok Shape and Havok Rigid Body. All you need to is set the Shape type to Mesh, which is the most accurate type of collision.
  • You then must go and select Havok Content Tools on the menu bar and export it with the same settings as found in the Sonic Generations Level Tutorial, however, on 'write to platfom, you must select 360. not win32!
  • You can select the path to save your HKX to wherever you think is the best place to have it ready for importing (preferably in your #AR folder, with the same name as the stock collision).
  • Once you've put all those settings in, run the configuration. Errors might appear as you're generating the file, but just ignore them.

Step 9: XML

  • Almost there! You just need to make a few more minor edits, then you can view your custom terrain in Sonic Unleashed!
  • First on the list, open up stage.stg.xml and change sonic's spawn position (loading the terrain in GLVL and placing an object should give you the proper co-ordinates!). You may also want to remove these from stage.stg.xml.
  • Second: You can create a custom set in glvl, however you need to make sure that objects you use appear in Sonic Unleashed, any foreign objects (such as Generations-only items) can freeze the game!. Upon saving the set file, name it 'Normal.set.xml' and put it in your #ar folder. Remove the retail set files from the #ar folder if you wish.

Step 10: Repacking

  • You'll want to open 'Generations Archive Editor' once again. Drag all of the files from the AR folder into the window and repack with the original .ar name, make sure the padding is set to 40! (repeat the same process with the #ar folder)
  • Now all that's left is to test, drag your .ar files and 'Stage' folder over to a USB, ready for the xbox 360!