Importing your Character
To begin with, and following along with my basic tip (import & test often), let's go ahead and get our character loaded and setup in GameCore. Whether you have multiple custom meshes that you want to show / hide or setup otherwise, it's a good idea to make sure that any content you are doing work with loads fine into the engine at every step of the development process. As I mentioned previously, this will both serve as a bit of a confidence booster (woohoo it worked!) and confirm what you already knew (that it works and doesn't have any major issues).
The First Import
To add your character to GameCore, you want to do the same thing as any object - open the GameCore world editor and select the 'Add' object button (on the Items panel). This will prompt you with a dialog like the one below:

This should be something that is fairly familiar to you already, but just to make sure we're covering all of the bases, you want to select 'From object file', meaning that we are going to load a custom object instead of using one of the avaialble templates that ship with GameCore.
The standard GameCore file browser will open - browse and select the fbx object that you exported from your modeling package. Note that the model should contain the main mesh for your character and the skeleton itself. It does not necessarily require any animations at this point, but if you do have an animation in the character, it will be added as the 'idle' animation for your character and once loaded, should play the animation in the editor automatically.
If you do not see the animation play in the editor after load, then something might be wrong with your rig - we'll take a look at it in a bit more detail shortly though, so before we panic, let's go ahead and do so.
The Character Properties File (OPR)
As you may be aware of, when an object is added to the editor for the first time, GameCore automatically generates what is known as an 'OPR' file for the object. The OPR file stores all of the object's custom properties, such as whether it contains physics or casts shadows or has custom surface settings applied to it.
As we'll see shortly, the OPR file also contains the character's animations and motion tree as well.
In it's most basic form, an OPR file will look like the following:
OPRP
LoadObject MyCharacter.fbx
The first line 'OPRP' defines the fact that this is an OPR file. The second line is the first of many properties that we'll add to the object to define it's behaviors and appearance, in this case, that it needs to load the MyCharacter.fbx file.
With our demonstration character, 'Joe', the basic fbx that I have exported does not have any animations in the model, so he loads into GameCore in his basic 'reference' pose, as shown below:

As you might guess, the Pink areas aren't supposed to be like that. If you ever see this pink texture on any models you import, GameCore is telling you that it can't find the textures that the model is referencing for those surfaces. Basically the pink texture is our 'missing texture' texture.
If you have textures missing on your character, there are two options:
1) Go back to your 3d modeling package and remap the textures so that they are located in the proper spots. All textures for GameCore objects must be located within your project's 'media' directory in order to be included in the game when you export.
2) The second option is that you can smply select the character and then open the Object Surfaces panel to remap any missing textures - once remapped, the engine will remember the changes and map the textures properly from this point on.
If you do have missing textures on any model, for the sake of keeping your content clean, I would recommend that you go back to the modeling package and make sure that the materials are mapped to the proper locations, but I'm a bit of a stickler for organization, so this is up to you.
Printer-friendly version- Login to post comments
- PDF version
