Difference between pages "3D Asset Workflow: Asset Assembling" and "3D Asset Workflow: Collisions"

From Frozenbyte Wiki
(Difference between pages)
Jump to: navigation, search
m (Asset Assembly Example Gallery)
 
 
Line 1: Line 1:
 
<div style="border-bottom:2px solid #99aac7; background:#d0def5; padding:0.4em 0.5em; font-size:130%; margin-bottom: 25px; text-align: center; float:top;">
 
<div style="border-bottom:2px solid #99aac7; background:#d0def5; padding:0.4em 0.5em; font-size:130%; margin-bottom: 25px; text-align: center; float:top;">
 
⬑  [[3D Asset Workflow]]</div>
 
⬑  [[3D Asset Workflow]]</div>
 +
<div style="border-bottom:2px solid #99aac7; background:#d0def5; padding:0.4em 0.5em; font-size:130%; float:right; margin-bottom: 25px;">
 +
Next step: [[3D Asset Workflow: Texturing]] →</div>
 +
<div style="border-bottom:2px solid #99aac7; background:#d0def5; padding:0.4em 0.5em; font-size:130%; float:left; margin-bottom: 25px;">
 +
← Previous step: [[3D Asset Workflow: UV Mapping]]</div>
  
 
<div style="padding-right: 10px; padding-left: 1000px; padding-top: 60px; padding-bottom: 80px;">
 
<div style="padding-right: 10px; padding-left: 1000px; padding-top: 60px; padding-bottom: 80px;">
Line 6: Line 10:
 
</div>
 
</div>
  
= Summary =
+
=Collisions=
Check also [[3D Asset Workflow: Blocksets]] and [[3D Asset Workflow: Tile Textures and Trimsheets]]
+
* Collisions are very simple and very low poly meshes that tell the game engine where the collideable edges of the model are
* After the 3D asset set pieces are retopoed, UV mapped, and textured, it's time to '''assembly to set'''
+
* Collisions can be divided into two categories; [[3D_Asset_Workflow:_Collisions_and_Breakable_objects#Static_Collisions|static]] and [[3D_Asset_Workflow:_Collisions_and_Breakable_objects#Dynamic_Collisions|dynamic]]
* Asset assembling step is used for asset sets which consists of multiple parts, some of which duplicated and mirrored to save texture space
+
** Static objects are stationary, dynamic objects are dynamic, and can be e.g. thrown or kicked around the level, or otherwise interacted with
** E.g. when making a chair model, you can only make one chair leg, and duplicate + mirror it to create a chair with for legs - all of which use the the same UVs
+
* When making collisions, be wary of sharp edges or holes, in which the characters can get stuck
*** This is the reason assembling needs to be done ''after'' UV mapping
 
** '''If your model only consists of one mesh with no mirrored/duplicated pieces, you can skip this step and move straight to''' [[3D Asset Workflow: Naming the Asset]]
 
  
[[File:Noble furniture 13.JPG|900px|center]]
+
== Static Collisions ==
 +
* Collisions for objects which can't be manipulated by the characters in the game
 +
* For example just a static piece of environment in the game that doesn't move in any way
 +
* Can be made in one layer with multiple objects colliding with each other
 +
* The collision layer must be parented with the original object
 +
'''Naming:''' xx_static_collision
  
== Asset Assembling Workflow Steps ==
+
'''Example of the hierarchy:'''
# Make sure you have all the pieces needed to create all the assets that are required
+
# box
# Make new mesh layers as required, and assembly the new meshes to the new layers
+
## box_static_collision
#* Use the pieces wisely - most of the time, they don't need to be actually attached to each other, if they just look like they are
+
 
#** However, don't leave any holes, and delete geometry that's left inside the model
+
==Dynamic Collisions==
# [[3D_Asset_Workflow#Trine_Art_Team_Terminology|"Vessanpönttöily" and "juhlamokkailu"]] are also parts of the asset assembly workstep
+
* Collisions for objects which move and/or can be manipulated by the characters in the game, for example dropped or kicked
#* '''Make sure the assets have nice and natural unevenness and asymmetry''' in them, so that they fit the Trine style better
+
* The collision objects can't be concave, so in most cases the dynamic collision must be made with many objects
#** It's better to add the wonkiness at this step rather than when sculpting, as it's easier to retopo symmetrical assets
+
* These must be separated to different layers, and can't collide with each other
#** If your making blocksets, check [[3D Asset Workflow: Blocksets]] - they need to match to each other more mathematically at times, so asymmetry can't be too radical
+
* All the dynamic collision layers must be parented with the original object
# If needed, create new mesh layers for the same meshes different variations
+
'''Naming:''' xx_collision_dynamic(_01)
#* Three is usually a good amount of variations for the same mesh
+
 
#* '''Note that the variations should look different enough from each other to make an actual difference'''
+
'''Example of the hierarchy:'''
# Add separate parts (e.g. door frames, doors) to their own layers
+
# box
#* Make sure the pivots are in a sensible place - e.g. on the hinges of doors
+
## box_collision_dynamic_01
#** This makes them more usable to the level artists
+
## box_collision_dynamic_02
# If needed, make [[3D Asset Workflow: Billboards|billboards]] and/or very lowpoly background versions of the assets at this point
+
## box_collision_dynamic_03
# When done, move onto [[3D Asset Workflow: Naming the Asset]]
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="background-color: #f3e9f5; border-width:2px; border-radius:10px; margin: 5px;">
 +
Examples of Static and Dynamic Collisions via images
 +
<div class="mw-collapsible-content">
 +
[[File:Static and dynamic collisions.jpg|1000px]]
 +
</div>
 +
</div>
 +
 
 +
 
 +
== Adding Collisions in Editor ==
 +
* Once the collisions for each object are done in Modo, and the models are exported to the Editor, you need to add Components to the type to make the collisions actually work
 +
* Most of the time you can just copy and paste the needed components from some existing model, that is similar to your new model
 +
* It's good to copy the Components from objects that have similar material or size, but the shape doesn't matter because your object will use the collision model you made for it in Modo
  
= Asset Assembly Example Gallery =
 
 
<div class="toccolours mw-collapsible mw-collapsed" style="background-color: #f3e9f5; border-width:2px; border-radius:10px; margin: 5px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="background-color: #f3e9f5; border-width:2px; border-radius:10px; margin: 5px;">
Asset Assembly Example Gallery
+
Image Guide to Adding Collisions in Editor, with Explanatory Texts
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<gallery widths=300px heights=300px mode="nolines">
+
[[File:Copy component.jpg|600px|collision tips]]
File:Noble furniture 13.JPG|Also with an [[3D Asset Workflow: Alternative Textures|alternative texture]]
+
 
File:FurnitureFinal.png
+
* Select the model in Type Tree and see its Properties
File:General crate chest set.png
+
* There should already be these Model Components
File:Carriage 29 9 2021.jpg|Also with a [[3D Asset Workflow: Tintmask|tintmask]]
+
** ModelComponent
File:Props decoration chain rope 16.8.2021 WIP4.JPG
+
** TransformComponent
File:Breakable lamp 15.2.22.png
+
* You need to either copy or search and add these components
File:Fence Texture Final.png
+
** HittableComponent
</gallery>
+
** ContactEffectCreatorComponent
 +
** PhysicsComponent
 +
*** StaticMesh (for static collision)
 +
*** ConvexCompound (for dynamic collision)
 +
* Copy by selecting the object you want to copy from in Type Tree and right click "Copy Components", don't copy ModelComponent and TransformComponent, DO NOT COPY FROM DYNAMIC TO STATIC OBJECT OR FROM STATIC TO DYNAMIC!
 +
* If there aren't similar objects with collision in the game, Add by selecting the object you want to add to in Type Tree and right click "Add Component Type", then search the needed components
 +
** In this case, you can either '''Add''' or '''Add and Inherit'''. By just Adding, the Components stay shared with the type you copied it from, with Add and Inherit you create a separate copy of the Component
 +
[[File:Ohjeita editoriin ErilaistenModeliTyyppienKomponentit collisionit.jpg|1200px|Teemu's collision tips]]
 
</div>
 
</div>
 
</div>
 
</div>

Revision as of 10:39, 1 August 2023

3D Asset Workflow
Next step: 3D Asset Workflow: Texturing
← Previous step: 3D Asset Workflow: UV Mapping

Collisions

  • Collisions are very simple and very low poly meshes that tell the game engine where the collideable edges of the model are
  • Collisions can be divided into two categories; static and dynamic
    • Static objects are stationary, dynamic objects are dynamic, and can be e.g. thrown or kicked around the level, or otherwise interacted with
  • When making collisions, be wary of sharp edges or holes, in which the characters can get stuck

Static Collisions

  • Collisions for objects which can't be manipulated by the characters in the game
  • For example just a static piece of environment in the game that doesn't move in any way
  • Can be made in one layer with multiple objects colliding with each other
  • The collision layer must be parented with the original object
Naming: xx_static_collision

Example of the hierarchy:

  1. box
    1. box_static_collision

Dynamic Collisions

  • Collisions for objects which move and/or can be manipulated by the characters in the game, for example dropped or kicked
  • The collision objects can't be concave, so in most cases the dynamic collision must be made with many objects
  • These must be separated to different layers, and can't collide with each other
  • All the dynamic collision layers must be parented with the original object
Naming: xx_collision_dynamic(_01)

Example of the hierarchy:

  1. box
    1. box_collision_dynamic_01
    2. box_collision_dynamic_02
    3. box_collision_dynamic_03

Examples of Static and Dynamic Collisions via images

Static and dynamic collisions.jpg


Adding Collisions in Editor

  • Once the collisions for each object are done in Modo, and the models are exported to the Editor, you need to add Components to the type to make the collisions actually work
  • Most of the time you can just copy and paste the needed components from some existing model, that is similar to your new model
  • It's good to copy the Components from objects that have similar material or size, but the shape doesn't matter because your object will use the collision model you made for it in Modo

Image Guide to Adding Collisions in Editor, with Explanatory Texts

collision tips

  • Select the model in Type Tree and see its Properties
  • There should already be these Model Components
    • ModelComponent
    • TransformComponent
  • You need to either copy or search and add these components
    • HittableComponent
    • ContactEffectCreatorComponent
    • PhysicsComponent
      • StaticMesh (for static collision)
      • ConvexCompound (for dynamic collision)
  • Copy by selecting the object you want to copy from in Type Tree and right click "Copy Components", don't copy ModelComponent and TransformComponent, DO NOT COPY FROM DYNAMIC TO STATIC OBJECT OR FROM STATIC TO DYNAMIC!
  • If there aren't similar objects with collision in the game, Add by selecting the object you want to add to in Type Tree and right click "Add Component Type", then search the needed components
    • In this case, you can either Add or Add and Inherit. By just Adding, the Components stay shared with the type you copied it from, with Add and Inherit you create a separate copy of the Component

Teemu's collision tips