Actions

SCHG How-to

Import Levels Into Sonic Generations

From Sonic Retro

Revision as of 09:30, 2 November 2012 by Kyllian1212 (talk | contribs) (Step 6: Importing the geometry into SonicGLVL)

(Original guide by Sky The Destroyer)

SCHG: Sonic Generations
Main Article

Objects
Collision Properties

File Index
BB

BB2
BB3

How-To
Import Levels

Create Breakable Objects
Create Splines

This is a step by step tutorial on how to import custom levels into Sonic Generations.

Required Tools

Optional Tools

Additional Notes: You can use any version of 3DS Max from 9 to 2013 for the purpose of exporting terrain geometry, but it's recommended to get the 2010 version, as the 2011 version is quite unstable. The only reason you'll ever need a version like 2011 or less is due to the Havok Content Tools, that need to be of that specific version to work fine in the game. Do notice Max 2012 and 2013 can save Max files that are backwards compatible with Max 2011 if specified.

Step 1: Finding the stage

  • The Models Resource is a good place to find model rips if you want port a level from a game. However, that isn't the only place where you can find model rips. You can go around the internet searching for model rips. If you want to, you can create your own level from scratch, or you can rip a level from a game.

Step 2: Importing into 3DS Max

  • First and foremost: Make sure the units are set to meters! This is crucial. 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.
  • Use the import function by clicking the top left icon in 3DS Max. Select your file type and import the stage into 3DS Max. You then have to make sure the import options are like the following images if this appears: Image 1 Image 2
  • If that does not appear when you import it, export it as an .obj file and reimport it. This will give you the options as shown above, which are required to import the stage, otherwise the collision will be off.

Step 3: Scaling the stage

  • The next thing to do is 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 and then in the right clicking and selecting scale. Make sure you don't scale your reference object!
  • On the bottom of the screen, you should see the three axes: X, Y, and Z. They all should say 100, which is the scale percentage. If you set them to 50, your stage will be 50% of its original size. If you scale it to 150, it'll be 50% bigger than it originally once was.
  • For open world maps, be sure to upscale it a lot if it isn't big already for Sonic's size. The map may look big from the editor, but it won't be as big in game. This is because Sonic moves fast, and thus making the map feel smaller. If you're scaling a stage from a game, 10% or 15% would be good scale percentages to try.

Step 4: Lighting

Directional Light

  • Using a directional light is the way to go for easy and simple lighting that takes almost no time at all to set up.
  • First off, go into the create tab on the right of your screen. Select lights (it should be the third button). Now, in the drop down menu, select Standard. Create a Free Direct light.
  • The best way to get it aligned if you want it to be neat is to place it in the top left viewport, then in the bottom left viewport, move it around as you please.
  • And that should be it. Make note of the light's name; you're going to need it later on.

Global Illumination Ambiance (GIA)

  • If you're not going to render GIA for your stage import, delete Stage-Add.pfd in the Packed folder and repack the stage through SonicGLVL. This file stores the GIA, so it's useless if you don't have any GIA rendered. Deleting this file will decrease the file size of your stage by a good bit.
  • This section is incomplete. Please help by writing a step by step tutorial about GIA!

Step 5: Exporting the level geometry

  • After you've finished with scaling and lighting, it's time to export the level 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.
  • Here are the options that you should have.

Step 6: Importing the geometry into SonicGLVL

  • Open any stage in SonicGLVL and load the terrain groups (Or unpack them before if it's not done alerady). After it's all loaded, clear all terrain geometry (it's under the terrain section). This may take a while, so please be patient. It'll probably crash. Dont worry, when you will relaunch SonicGLVL, the trerrain 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.
  • Back in SonicGLVL, go to the Spawn/Helpers category, and place a SonicSpawn object wherever you want it to be. With the object selected, go into the Stage Menu, and make the selected object the Active Spawn. If you're importing over Green Hill, then you need to go into SonicGLVL's cache and delete all of the text in the Instancer.xml file to remove the grass.
  • Finally, you must go under the file section and repack the terrain geometry. Leave the options as default.
  • If you created a directional light, make sure to go into Terrain.stg.xml and modify the <Light> parameter to have the name of your light. This is how the game will load your directional light.

Step 7: Creating and importing stage collision into Sonic Generations

  • You must download Havok Content Tools 2010 2.0, as it says in the required tools section. Install it to your Autodesk 3DS 2011 directory (it should auto-select the directory it for you).
  • Go back into 3DS Max 2011 and select all of the objects that you want to 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 these settings: This is the order of the following options Settings for Create World Settings for Transform Scene Settings for Create Rigid Bodies Settings for Write to Platform
  • You can select the path to save your HKX to wherever you think is the best place to have it ready for importing.
  • Once you've put all those settings in, run the configuration. Errors might appear as you're generating the file, but just ignore them.
  • The final step is here: importing the collision into Sonic Generations. If you're replacing it over Green Hill Zone Act 2, you need to open Generations Archive Editor and open #ghz200.ar.00 and replace ghz200_col.phy.hkx with the newly generated one.
  • Other stages will have different collision file names, but you can easily find the collision file that you need to replace by looking for the stage's name and the file extension .phy.hkx tacked on (#ssz200.ar.00's collision file is ssz200.phy.hkx).
  • After you've saved your collision file, you can launch Sonic Generations and test out your newly imported level.