GameGuru Guide

GameGuru - Model Importer Part 1 for GameGuru

GameGuru – Model Importer Part 1

Overview

The function of the model importer is to make custom assets available in GameGuru for use in populating your game. All you need is the textures and the model file. (some disclaimer about xfile format and possible future type accepted.)

Theory: Textures

Why should my textures be in .DDS format?
Because it is a format that is made for game engines, It is compressed and decompresses fast for game play.

Why do these textures have _D, _S and _N in the file names?
They are suffixes that tell the shader which texture to use.

What do they mean?
_D is for Diffuse texture. The diffuse texture is the color on your model.
_S is for Specular texture. The specular texture are the highlight of light that come off the models edges, and faces.
_N is for Normal or Bump texture. The Normal texture is used to simulate roughness on your model.

What do you mean by power of 2.?
Gaming textures use this format of size, so calculations come out correct, for UV mapping and Scale.
Power of two examples. 2×2, 16×64, 128×128, 1024×1024, 512×1024,
You can use any size up to 4096 x 4096. In any power of 2 combinations.

Do I have to use .dds textures?
No, but you will either see nasty textures on your model in game, or you will bog down the engine in no time.
Example. 2048 x 2048 tga texture can be as big as 80mb or larger.
the same texture converted to .dds format is around 2 mb.

One can obviously see the advantages there.

Why should I not use .jpg files?
They have a dirty compression technique, that produces a lot of un wanted artifacts on the model in game. This format was made to transfer graphics over the web faster, not use in gaming.

But wait, you say that .dds files are compressed?
Yes that is true, but they are compressed with a less lossy algorithm and are specifically designed for gaming.

What programs can I use to make these .dds textures?
You can use Photoshop with the NVidia dds plugin
You can use GIMP with the .dds and Normal plug ins
You can use any paint program that is capable of exporting .dds files. Do a search online for your paint program and see if an import / export plug in is available.

More theory will be added over time here. so check back.

Requirements:

Required:

The textures and intended import object is .X (Direct X) file format or DBO format.

Note: It is suggested that you keep your imported assets together in a folder for your convenience.

The model:

Must be in Direct x format, or Dark Basic Pro format.
Make your model in your model program, and export it as a x file.
There are many programs and each one has its way of exporting these files for you. Read the help files for the model program you are using for procedures on how to export.

Things to consider:
Model size and complexity. Scale the object to a real world size, don’t make a 10 Foot tissue box, when in reality it is only 12 inches. Just a good habit to get into.
Split your models up into logical pieces, don’t try and export your fully modeled house as one piece. Yes it might get in without errors, but it is not efficient for collision purposes, as there will be collision assigned to parts of the model, that don’t need it. Like ceiling and columns against walls.

The Textures:
Prepare the textures in your paint program and place them in the folder with the model.

Create your textures for your model, and export them to your folder where the model is.

Use only one map when mapping your model.
Ex. If you have a tree with leaves and a trunk, do not have one map for the wood and a seperate map for the leves. Everything should be on one map.

Be sure to name the your textures with the appropriate suffix in the file name.

TextureName_D: The Diffuse texture slot for you model.

Optionally, you may also have the following effect maps for use with shaders.

Texturename_S: The specular texture slot for your model.
Texturename_N: The normal map slot for your model.
Texturename_I: The illumination map slot for your model.

Accepted formats include: png, bmp, jpg, tga and dds, but will be converted to dds format for use in GameGuru.

Important: You must include at least a diffuse texture (_D) or else no texture will be imported and your model will appear black in-game

What will be made from the conversion

What will be made from the conversion:
The 6 basic files you need for any object being used in GameGuru.

  • FPE: The File that contains the initial settings for the editor to setup the object when used.
  • BMP: The preview image (thumbnail) used when choosing an asset from the library.
  • DBO: The model format that will be used for the mesh in the editor when placed in the level.
  • TextureName_D.dds: The Diffuse texture slot for you model.
  • Texturename_S.dds: The specular texture slot for your model.
  • Texturename_N.dds: The normal map slot for your model.

Note: These are the minimal texture requirements for the shaders used in GameGuru. Other textures can be needed for different shaders. Furthermore, these will only be converted if they already exist and are in the same folder location as the _D texture (explained in the Requirements section). The importer will not generate these shader maps on its own.

Model Importer – The Basics – Proceedure

To access the Model Importer:

Left Mouse Button (LMB) on the file menu and choose Import Model:

A window will open up, asking you to choose which asset you want to import.
You can choose from the following file formats: X, FPE or DBO. Now press the “Open” button at the lower right of the window.

The import interface will appear:

Options:

  • View: Shows you which view direction you are using.
  • Save Entity: Saves entity to GameGuru Format.
  • Cancel: Cancels out of the importer and returns to the editor main screen.
  • ?: Help for using the import functions.
  • Properties: Switches to the properties screen where you can set the desired properties of the imported object.
  • Collision: Switches to the collision page where you can define your custom collision to an imported object.
  • Thumbnail: Switches to the Thumbnail screen where you can position your imported object for the snap shot.

The Property Screen:

Once you have you model in the importer, this is where most of the settings will be changed.
If your model has a texture exported with it, you should see it in the importer screen, on the model and the Square Preview on the left.

Clicking on texture preview will open up a window where you can choose a different texture.

Accepted formats include: png, bmp, jpg, tga and dds, but will be converted to dds format for use in GameGuru.

Note: Make sure your textures are in multiples of 2 (ie., 512×512, 1024×1024, 512×1024, 2048×2048, 64×128, 128×1024).

If your model does not have a texture exported with it, the model will have red and white UV squares on it.

Click the texture view icon to choose a desired texture. Clicking on texture preview will open up a window where you can choose a different texture.

Again; accepted formats include: png, bmp, jpg, tga and dds, but will be converted to dds format for use in GameGuru.

Note: Make sure your textures are in multiples of 2. IE: 512×512, 1024×1024, 512×1024, 2048×2048, 64×128, 128×1024.

Also; not all textures will be appropriate for all models, do to the way their individual UV Mapping is set up on the model. Some prior thought might be required.

GameGuru – Model Importer – Operations

The function of the model importer is to make custom assets available in
GameGuru for use in populating your game. All you need is the textures and the
model file.

Properties Panel:

Options:

  • Scale: Allows you to scale your model up or down.
  • Shader: Sets the shader for use for rendering. Press and hold the LMB and scroll to the desired shader. Note: Entity_basic.fx Shader is the best choice for most objects.
  • Y Rotation Allows you to rotate your object around the Y axis as the default insert position. Note: You can also use the LMB in the view to rotate your object. Use Shift+LMB to snap to 45 degree increments.
  • Collision Mode: Changes the collision options allowing you to choose the collision style needed. Hold down the LMB to change.

Collision types:

  • Polygon: Per vertex collision, Static and Dynamic objects. More work for the engine.
  • Box: Uses a box encompassing the bounding box of the object. Static and Dynamic objects.
  • No Collision: Use this if an object cannot be reached by the player. Ceiling lamps, beams things like that. Door and window frames, as the walls would carry the collision. Columns against the walls.

Limb one Box: Limb number will cause that limb only to receive BOX collision and the rest of the object will have no collision at all. Used for trees where the trunk needs Collision, but the rest of the canopy does not.

Limb one Poly: For unusual or curved objects such as bent trees or collapsed pylons for example, POLYGON collision can be achieved by choosing this mode.

Collision Boxes: An advanced collision assigning mode allowing you to define multiple boxes for collision use. Used for very complex objects and will have it’s own guide.

Default Static: Yes, sets the entity into static mode making it non script-able or movable. Setting this to no, will allow the object to be script-able.

Strength: Sets the strength of an object , defining how much strength till the object is destroyed. Setting this to Zero, make the object invulnerable.

Is A Character: No, to define this object as a non character, Yes, to define this object as a character.

Is An Objective: Setting this property to other then zero, will allow you to define objects as objectives, for collection purpose. Once all objectives have been achieved in the game, then that will end the level.

Transparency: None is no transparency, but pure black will still be transparent. Standard for when you need transparency along with Alpha Masking, Render Last for use with objects that are water line object (separates depth sort automatically).

Material: Sets the material for the sound and the bullet hole decals.

Script: Choose the script require for any dynamic entity. For static object use default LUA.

Show Guide: On will show a scaled image of a normal human for size comparison against your model. Off will Hide the object.

Note: You can rotate an object on this screen in the Y Axis only by clicking your left mouse button (LMB) and dragging in the direction of rotation desired. Pressing shift key and dragging the left mouse button (LMB) will snap to 45 degree increments.

Collision Screen

Where you can set up Custom Collision boxes for your object, for complex Collision. Note: this screen will do nothing unless the Collision Boxes are selected in the Properties Screen. Under collision mode. This will be covered in depth in a later Guide.

Thumbnail Screen

With this screen you can rotate your object to the desired x,y,z rotation for the required thumbnail file to show an icon of your object in the library.

When you are finished making adjustments to your imported object, then press the Save Entity button at the top. A window will open asking for the location that you would like the files stored.
Browse to the location, give the file a name, then press the Save button in the lower right.

All the required files are generated for you, and are now ready for use in GameGuru!

Open the Entity Library, and find your object under the entitybankuser folder.

Double-click on it, then place it in your level where you would like. Press the Test Game icon and watch your creation be part of your next game!

SteamSolo.com