Actions

Fangame How-to:SonicGDK/Configuring 3D computer graphics software

From Sonic Retro

Revision as of 12:29, 8 June 2013 by Xaklse (talk | contribs) (Added pictures.)

(Original guide by Andrew75 and Xaklse)

Exclamation.svg This article is a work in progress.
Its content and location may change completely and frequently until this notice is removed.

A guide about how to configure properly some programs used to create 3D models and import them into SonicGDK.

Introduction

I (Andrew) have been assisting a few teams using SonicGDK as a sort of technical advisor, as it seems many people are experiencing the same issues over and over again. The main issue that I've been seeing occurs when you guys make custom models for UDK (be it in 3ds Max, Maya or Blender) and Sonic doesn't stick to the meshes properly, he seems to hop for a few moments as he runs.

Some of the issues that cause this occurs when people import undersized models and then scale them up in UDK by a certain percentage. A workaround would be to select Build from the UDK editor toolbar and Build All. It could also be related to the file you're exporting, using an outdated FBX exporter from your modeling program (this relates to the version of UDK that you're using), so make sure to update the FBX format to the latest version for your program.

Someone asked me for advise on how to fix the hopping issues, but both the "Build All" and FBX compatibility problem were not the root of the issue. It turns out that we needed to export the model with the true scale from the modeling package (not scale up in UDK). The best habit would be to make game assets in the true scale that will be used in the game, or rescale the asset in the modeling package before exporting the poor thing. What are the correct scales for Sonic and his assets? I've put together a little tutorial to help get you guys started.

Configuration

Figure 1
Figure 2
Figure 3
Figure 4
Figure 5

First thing you will need to know is that 3ds Max and Blender share the same exact scale for models being exported from both programs using the default scale setting to UDK. An interesting note: in 3ds Max, 1 generic Max unit, cm, meter, or whatever scale you have default units set to, they will all export to the same sized model in UDK (1 unit of any type of measurement is equal to 1 UDK unit).

Next we will set the spacing for your grid to 1 or 2, I'll go into detail why later for both methods in a minute, SonicGDK has double sized scale requirements (due to sonic being programmed at a larger scale for his jump height and run speeds, ect, vs UDK units, 3ds Max units, Blender units or even classic sonic pixels (For my projects I use 1 classic sonic pixel =1 3DS unit + 200% rescale = 2x2 UDK units) Basically We need to match SonicGDK scales, not really UDK scales we will need to: A: Model in grid space setting of 2. (may be confusing for some people) or B: Set the spacing to 1 and than rescale after the model is finished but before exportation. Myself? I prefer Plan B since its easyer to keep track of units of 1 rather than multiples of 2.

When rescaling a mesh and you want to export it to the game... please use Reset Xform! What reset Xform does is reset all transforms, rotations and scales to be a new default. otherwise you "may or may not" get some issues in the future, (Just in case you need more info) An example of when to use reset Xform is when scaling an object up by 200% than apply the reset Xform tool to that object, what this did was make the 200% become the new 100% without changing the scale size of the model. It's also recommended to apply reset Xform in any and all situations including just before skinning a character mesh. (It's better safe than sorry)

Here we see Sonic's UDK scale compared to UDK grid scale of 1 Notice how 1 pixel is equal to 2x2 udk grid units

SGDK's Sonic model may be shorter when standing next to the classic sonic 1 sprite's height, the programmed units match the Sprite more than the model (at least I think so) (also note: I think Sonic's model was rescaled by code for the SonicGDK model, have no idea what the initial scale was) these scales im going into are more useful for making environments, than sonic's actual model scale) May have to look into the sonic modeling scale to sgdk rescale conversion thing in the future.

If modeling Sonic or environments: Sonic is 39 pixels tall in classic games, which is 39 units tall in modeling package (rescaled by 200% = 78 units tall for SonicGDK) The maximum jump height so that sonic can land on Platforms and environmental pieces would be 100 units in the modeling package (rescaled by 200% = 200 units high)