Asset Creation Pipeline

From Off Grid Wiki
Jump to navigation Jump to search

Making Your Own Art

Using Unity as a mod editor means that you don't have to stick with just our models to build your levels, you can make your own, or edit ours to make the props and architecture that will fit your level. Here is a quick guide with some conventions to follow so that your models will conform to our pipeline and import correctly.

Blender Pipeline - Set Up

Cycles Render Engine

Before we start creating 3D assets we need to set blender up properly. To start we will change Blenders rendering engine to Cycles Render. This can be seen in fig 0.1

fig 0.1












Units

Now that we have the correct render engine selected we must insure that blender is set to the correct units. A single Unity3D Unit is 1m, therefore we must set our unit preset to meters within Blender. This can be done by selecting scene properties and then selecting the drop down box under the units section. This can be seen in fig 0.2

fig 0.2















Mesh Normals Check

face orientation settings
face orientation preview

























Mesh Tri Count Check

tri count settings - statistics
tri count settings

























Vertex Colour Shader for Blender Visibility

blender material setup for vertex shading











Off Grid Materials

Names of possible materials in engine

Material name Description Has 2 sided
Diffuse-Vertex Simple​ ​diffuse​ ​shader Yes
Specular-High-Vertex Specular​ ​reflections​ ​(Mainly​ ​used​ ​for​ ​plastic), High Smoothness Yes
Specular-Mid-Vertex Specular​ ​reflections​ ​(Mainly​ ​used​ ​for​ ​plastic) Mid Smoothness Yes
Specular-Low-Vertex Specular​ ​reflections​ ​(Mainly​ ​used​ ​for​ ​plastic) Low Smoothness Yes
Metallic-Vertex Specular​ ​reflections​ ​for​ ​metal Yes
Glass-Vertex Transparent​ ​+​ ​Specular​ ​for​ ​glass Yes
Illuminated-Vertex Objects​ ​that​ ​illuminate​ ​such​ ​as​ ​screens​ ​and​ ​lights Yes
ScriptControlledLamp Screens,​ ​Lamps,​ ​etc​ ​that​ ​have​ ​their​ ​color​ ​& emission​ ​controlled​ ​by​ ​code. No

In​ ​cases​ ​where​ ​a​ ​mesh​ ​is​ ​one​ ​sided​ ​but​ ​can​ ​we​ ​seen​ ​from​ ​either​ ​side​ ​such​ ​as​ ​plant​ ​leaves or​ ​paper,​ ​use​ ​the​ ​two​ ​sided​ ​version​ ​of​ ​the​ ​above​ ​shaders.​ ​The​ ​naming​ ​convention​ ​simply adds​ ​the​ ​post​ ​fix​ ​“-2sided”.

For​ ​example,​ ​paper​ ​would​ ​use​ ​​Diffuse-Vertex-2sided and​ ​two​ ​sided​ ​glass​ ​would​ ​use Glass-Vertex-2sided

















Vertex Painting

Now we need to add some colour to our asset. To do this we use Vertex painting. To apply vertex paint to your asset you need to select Vertex paint from the interaction mode drop-down box as shown in fig 0.7

fig 0.7


















To begin painting the model you have a few options: Flood colour with Shift K this will colour the entire selection. The other option is to paint vertices manually like a paint brush. To do this you must have the vertices you wish to paint selected.

fig 0.8


In Fig 0.8 you can see the selection types highlighted, The square icon represents face selection and will allow you to select and paint whole faces on your mesh.


fig 0.9

















Here you can select any colour you wish using the colour wheel or you can select the Hex button to use hex codes to find a specific colour. Using the hex codes in the table below will allow you to match colours used within Off Grid.

Scale Reference

You can import items from the Offgrid levelkit project or make your own variants or use as existing scale reference.

Preparing To Export

Before you export your asset, it is important to ensure that you perform the following checks:

  • Set scale to 1.0,1.0,1.0 - In Object Mode press CTRL+A then Apply Scale
  • Check that the pivot is set to the correct place. The default place for setting your pivot should be the centre of the object unless the object is being placed on the ground in which case it would be Bottom centre. To change Pivot move the 3D cursor to desired location of pivot: In Edit Mode select face, edge or vertex that you want the pivot to move to, press SHIFT+S Cursor to Selected. Then in Object Mode open the dropdown for Object>Set Origin>Origin to 3D Cursor.
  • Make edges hard/sharp - in Edit Mode selected required edges and Right Click>Make Sharp
  • Set Normals - In edit mode select all faces (CTRL+A) then ALT+N - Set From Faces and Average>Face Area
  • Move Object to 0,0,0 in blender world space
  • Apply Rotation (CTRL+A)
  • ROTATION FIX FOR UNITY IMPORT:
    • 1) We need to add a +90 rotation to the X axis so that Unity will read the assets as 0,0,0 (an annoying Blender to Unity thing) so to do this we have to Rotate the object -90 on X. Press R, X -90.
    • 2) Reset Rotations to 0 (CTRL+S > Apply Rotations)
    • 3) Add a 90 rotation onto X (and return mesh to upright position. (R,X,90)
  • Check naming conventions are correct- and make sure the Mesh in Data Properties has the same name. We use these loose conventions: Name-SpercificDetails-Scale_01 (if an alt colour we add 02 etc)

Export Settings

  • Make sure your blender Export settings are as follows:

Blender and Unity have different X,Y,Z axis and scene scales, and that is annoying. These settings will make sure that your object (which should now have a +90x rotation and 1,1,1 scale) will be correctly received in Unity. These will now be converted by Unity on import to 0,0,0 Rotation and 1,1,1 scale - yay!)


































Importing Your Model

To import into Unity, you can drag and drop your FBX file into the appropriate folder: Internal Location: Assets/Levelkit/Models/Props

Set Up Prefab

Create Prefab in same location: Assets/Levelkit/Models/Props (Semaeopus Internal Location - for Modders you can use any location that makes sense to you. These will be moved to Modder Things to be included in the Level Kit Project once reviewed by Lead Artist)

  • Set material
  • Set colliders
  • Set Layer (Default for props, Level for walls, Glass for glass)
  • Set Static