Asset Creation Pipeline: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
No edit summary
 
(36 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Creating Your First 3D Model ==
== Making Your Own Art ==
===== Pre-requisites =====  
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.
First off you  will need a 3D modelling program, for this example we will be using Blender which is the recommended tool for creating assets for Off Grid
Here is a quick guide with some conventions to follow so that your models will conform to our pipeline and import correctly.
===== Setting Up Blender  =====  
== 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<br />
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<br />
[[File:Cycles_dropdown.png|200px|thumb|left|fig 0.1]]<br />
[[File:Cycles_dropdown.png|200px|thumb|left|fig 0.1]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Line 10: Line 18:
<br />
<br />


 
===== 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<br />
 
 
 
 
 
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<br />
[[File:Units Selection.png|200px|thumb|left|fig 0.2]]<br />
[[File:Units Selection.png|200px|thumb|left|fig 0.2]]<br />


Once you  have done that we just have to clean up our scene by removing the camera and the lamp. This can simply be done by right clicking them in the hierarchy and selecting delete.
=====Naming Conventions=====
Now that you have properly set up Blender you are free to create your 3D asset. An Important note while creating your asset is to insure that your 3D Asset follows Off Grids naming conventions:<br />
* All​ ​asset​ ​names​ ​should​ ​use​ ​UpperCamelCase​ ​and​ ​end​ ​with​ ​the​ ​appropriate​ ​number​ ​scheme _01,​ ​_02,​ ​_03 <br />
* If​ ​an​ ​asset​ ​is​ ​completely​ ​specific​ ​to​ ​a​ ​location,​ ​for​ ​example​ ​a​ ​sign​ ​for​ ​a​ ​company​ ​building then​ ​the​ ​format​ ​to​ ​follow​ ​would​ ​be: <br />
ObjectName-ObjectLocation_0X <br />
E.G​ ​-​ ​CompanySign-Bank_01
* If​ ​there​ ​are​ ​multiple​ ​variants​ ​of​ ​the​ ​asset​ ​and​ ​you​ ​feel​ ​that​ ​the​ ​asset​ ​needs​ ​further description​ ​then​ ​you​ ​should​ ​use​ ​the​ ​following​ ​format:<br />
ObjectName-Adjective-ObjectLocation_0X
​​ or
​ObjectName-Adjective_0X
E.G​ ​CompanySign-Big-Bank_01,​ ​CompanySign-Small-Bank_01,​ ​Fence-Mesh_01, Fence-Wooden_01
*All​ ​mesh​ ​objects​ ​in​ ​Blender​ ​or​ ​your​ ​3D​ ​application​ ​of​ ​choice​ ​should​ ​use​ ​the​ ​postfix​ ​​_mesh
E.G​ ​CompanySign-Big-Bank_01_mesh,​ ​Fence-Mesh_01_mesh
Example of the correct hierarchy in Blender:
[[File:NamingConventions.png|200px|thumb|left|fig 0.3]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
== Mesh Cleanup ==
Now that you have created your asset it is important to clean up any unnecessary Tris and insure the normals are facing outwards. '''Important - Your asset ​should​ ​not​ ​exceed​ ​max​ ​150​ ​tris​ ​for an​ ​average​ ​model​ ​(dependant​ ​on​ ​scale​ ​of object)'''<br />
To check the Tris count of your asset all you need to do is select your asset and look at the top bar as shown in fig 0.4
[[File:Triscount.png|600px|thumb|left|fig 0.4]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
===== Normals =====
To check the normals of an asset while in the perspective window you must press '''N''' which will open a new panel scroll to the bottom of the panel until you find the '''Shading section'''. Once at the shading section toggle Backface Culling as shown in fig 0.5
[[File:BackfaceCulling.png|400px|thumb|left|fig 0.5]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
== Mesh Normals Check ==
[[File:Blender-face orientation 1.png|thumb|left|face orientation settings]]
[[File:Blender-face orientation 2.png|thumb|left|face orientation preview]]
<br />
<br />
<br />
<br />
Line 100: Line 51:
<br />
<br />
<br />
<br />
Now that this option has been selected you may find parts of your asset are invisible like the cube on the left shown in fig 0.5, this is because the normals of the object are facing the incorrect way. To fix this you must flip the normals.To fix the normals you must be in edit mode and preferably in face selection mode. Now select the faces that need fixing.Navigate to the left panel shown in fig 0.6 if this is missing for you make sure you select the perspective window and press '''T'''. Select the Shading/UVs tab and click the button Flip Direction as shown in fig 0.6
[[File:FlipNormals.png|400px|thumb|left|fig 0.6]]<br />
<br />
<br />
<br />
<br />
Line 117: Line 64:
<br />
<br />
<br />
<br />
== Mesh Tri Count Check ==
[[File:Blender-tri-count1.png|thumb|left|tri count settings - statistics ]]
[[File:Blender-tri-count2.png|thumb|left|tri count settings ]]
<br />
<br />
<br />
<br />
Line 122: Line 72:
<br />
<br />
<br />
<br />
== 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 all you need to do is select Vertex paint from the interaction mode drop-down box as shown in fig 0.7
[[File:Vertex paint.png|200px|thumb|left|fig 0.7]]<br />
<br />
<br />
<br />
<br />
Line 139: Line 85:
<br />
<br />
<br />
<br />
To start painting your model just select the white bar below the colour wheel.(In fig 0.7 this bar is green) which will then bring up a new window as seen in fig 0.8
[[File:ColorSelect.png|400px|thumb|left|fig 0.8]]<br />
<br />
<br />
<br />
<br />
Line 159: Line 91:
<br />
<br />
<br />
<br />
== Vertex Colour Shader for Blender Visibility ==
[[File:Blender-shader.png|thumb|left|blender material setup for vertex shading]]
<br />
<br />
<br />
<br />
Line 168: Line 103:
<br />
<br />
<br />
<br />
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.
===Vertex Colours(base)===
{| class="wikitable"
|-
! Hex code
! Preview
! Description
|-
| #FFFBF0
! style="background:#FFFBF0;"|
| white​ ​walls​ ​etc.
|-
|-
| #CCCCCC
! style="background:#CCCCCC;"|
| Concrete,​ ​grey​ ​floors
|-
| #F0FAFF
! style="background:#F0FAFF;"|
| window​ ​glass
|-
| #FFF7E8
! style="background:#FFF7E8;"|
| incandescent​ ​lights
|-
|}


===Vertex Colours(Other)===
{| class="wikitable"
|-
! Hex code
! Preview
! Description
|-
| #4E4B4B
! style="background:#4E4B4B;"|
| Tarmac
|-
|-
| #82817E
! style="background:#82817E;"|
| Paving
|-
| #ADB2BD
! style="background:#ADB2BD;"|
| Aluminium
|-
| #8393B0
! style="background:#8393B0;"|
| Pale​ ​Painted​ ​Blue
|-
| #232426
! style="background:#232426;"|
| Bakelite​ ​Black​ ​Plastic
|-
| #414540
! style="background:#414540;"|
| Hangar​ ​Roof​ ​Runners​ ​dark​ ​Plastic
|-
| #c6c6b2
! style="background:#c6c6b2;"|
| Painted​ ​Metal​ ​(white)
|-
| #e9f0ff
! style="background:#e9f0ff;"|
| White​ ​Plastic
|-
| #FFF142
! style="background:#FFF142;"|
| Yellow​ ​Paint
|-
| #2E221B
! style="background:#2E221B;"|
| Electric​ ​Cables
|-
| #5E4D2E
! style="background:#5E4D2E;"|
| Rope
|-
| #D41414
! style="background:#D41414;"|
| Red​ ​Valves
|-
| #196EB4
! style="background:#196EB4;"|
| Blue​ ​Painted​ ​(waterworks​ ​machines/pumps)
|-
| #BD5C2E
! style="background:#BD5C2E;"|
| LightWood1​ ​-​ ​use​ ​for​ ​stairways​ ​(wooden)
|-
| #8B4627
! style="background:#8B4627;"|
| DarkWood1​ ​-​ ​mainly​ ​used​ ​for​ ​all​ ​woods
|-
| #753A1A
! style="background:#753A1A;"|
| MediumWood
|-
| #53260F
! style="background:#53260F;"|
| DarkMahogany​ ​-​ ​Use​ ​for​ ​handrails​ ​(wooden)
|-
| #A97537
! style="background:#A97537;"|
| Brass​ ​(Metal)
|-
| #3E752C
! style="background:#3E752C;"|
| GreenFelt​ ​-​ ​Use​ ​for​ ​carpet​ ​/​ ​stairway​ ​carpet​ ​initially
|-
| #BD9364
! style="background:#BD9364;"|
| Cardboard
|-
| #9FADAC
! style="background:#9FADAC;"|
| ShrinkWrap​ ​/​ ​Light​ ​or​ ​thin​ ​plastic
|-
| #e01616
! style="background:#e01616;"|
| Container​ ​-​ ​Red
|-
| #842404
! style="background:#842404;"|
| Container​ ​-​ ​Burgundy
|-
| #fc921a
! style="background:#fc921a;"|
| Container​ ​-​ ​Orange
|-
| #fff32c
! style="background:#fff32c;"|
| Container​ ​-​ ​Yellow
|-
| #26381d
! style="background:#26381d;"|
| Container​ ​-​ ​Dark​ ​Green
|-
| #10b930
! style="background:#10b930;"|
| Container​ ​-​ ​Green
|-
| #2888c7
! style="background:#2888c7;"|
| Container​ ​-​ ​Blue
|-
| #97d2ec
! style="background:#97d2ec;"|
| Container​ ​-​ ​LightBlue
|-
| #173e5d
! style="background:#173e5d;"|
| Container​ ​-DarkBlue
|-
| #f2edd8
! style="background:#f2edd8;"|
| Container​ ​-​ ​Cream
|-
| #c0c2d3
! style="background:#c0c2d3;"|
| Container​ ​-​ ​Grey
|-
| #eeedd
! style="background:#eeedd;"|
| Devices​ ​white​ ​Plastic
|-
| #f1ab10
! style="background:#f1ab10;"|
| Buttons​ ​Orange
|-
| #2E271B
! style="background:#2E271B;"|
| Buttons​ ​Dark​ ​Grey
|-
| #eb492e
! style="background:#eb492e;"|
| Buttons​ ​Red/Orange
|-
| #D14535
! style="background:#D14535;"|
| Buttons​ ​Pink 
|-
| #29241e
! style="background:#29241e;"|
| Screen​ ​Dark​ ​Grey
|-
| #3c7e3b
! style="background:#3c7e3b;"|
| Screen​ ​Green​ ​tone
|-
| #3b7e9f
! style="background:#3b7e9f;"|
| Screen​ ​Blue​ ​tone
|-
| #6F7069
! style="background:#6F7069;"|
| Rails-Track​ ​for​ ​Mobile​ ​Cranes
|-
| #705C32
! style="background:#705C32;"|
| Rail-Track​ ​Sleeper​ ​(wood)
|-
| #C26400
! style="background:#C26400;"|
| Fork​ ​Truck​ ​/​ ​Main​ ​orange​ ​for​ ​Harbour​ ​Vehicles
|-
| #423D3D
! style="background:#423D3D;"|
| Rubber​ ​for​ ​Wheels​ ​etc
|-
| #C7B19F
! style="background:#C7B19F;"|
| Lamp​ ​Shade
|-
| #D6B08D
! style="background:#D6B08D;"|
| Beech​ ​wood
|-
|}


===Off Grid Materials ===
===Off Grid Materials ===
Line 401: Line 117:
| Yes
| Yes
|-
|-
| Specular-Vertex
| Specular-High-Vertex
| Specular​ ​reflections​ ​(Mainly​ ​used​ ​for​ ​plastic)
| 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  
| Yes  
|-
|-
Line 441: Line 165:
<br />
<br />
<br />
<br />
== 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
[[File:VertexPaint.png|500px|thumb|left|fig 0.7]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
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.<br/>
[[File:Selection_modes.png|400px|thumb|left|fig 0.8]]<br />
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.
[[File:ColorSelect.png|400px|thumb|left|fig 0.9]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
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 ==  
==Preparing To Export ==  


Before you export your asset, it is important to ensure that you perform the following checks:  
Before you export your asset, it is important to ensure that you perform the following checks:  
*Check that the scale is correct – This can be done by selecting the object and pressing N, which will allow you to verify that the scale is 1.0,1.0,1.0
*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.
*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.
*Check that edges are set to hard/sharp
*Make edges hard/sharp - in Edit Mode selected required edges and Right Click>Make Sharp
*Check naming conventions are correct. See naming conventions  
*Set Normals - In edit mode select all faces (CTRL+A) then ALT+N - Set From Faces and Average>Face Area
*Check Export Settings are correct – see fig 0.7
*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!)
[[File:Blender-export-toUnity-setting.png|thumb|left]]
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />


==Importing Your Model ==
==Importing Your Model ==


To import into Unity, you can drag and drop your FBX file into the appropriate folder. Once you have the asset in Unity it is important to check the import settings of your asset. To ensure your model displays correctly within unity make sure that:
To import into Unity, you can drag and drop your FBX file into the appropriate folder:
*Material Naming is set to From Models material
Internal Location: Assets/Levelkit/Models/Props
*Material Search is set to Project-wide
 
Once set, your asset should display with the correct colours and materials that you have set in Blender.
== 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
[[Category:Modding]]

Latest revision as of 13:57, 31 January 2024

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