Skip to main content

Asset Creation - Part 1: Block Mesh

The purpose of the block mesh is to spend less than 20 minutes to create an extremely rough block out version of the model that can be  used as a stand-in version of the asset. This allows us to get an early version in the game asap so that the level designers and programmers aren't blocked in their ability to do there work.

Goals

  1. Save a file into the correct location with the correct naming convention.
  2. Block out and extremely rough version of the model that vaguely looks like it could be the asset.
  3. Ensure scales and proportions are correct.
  4. Name all of content inside of the file appropriately.
  5. Set up an export collection, and point the file path to the in-game location for the asset.
  6. Export it into the appropriate game folder and establish it as an asset in the game.
  7. Create collision for the asset in-game.

Step-by-Step

Prepare / start the task:

  • Check the Vikunja Art project page to see if you were given a task / find a task that you can do from the to-do list.
    • Refresh the page and make sure nobody else is already working on the given task before you assign yourself.
    • Assign the task to yourself:
      • Assign to user -> Type your name, accept.
    • Move the task to the 'in progress' column, to let the team know you're actively working on it.

Check your Git working directory (pounce-art):

  • Have the Working with Git page at the ready.
  • Open the pounce-art repo in SourceGit.
  • Make sure you have no uncommitted files in the 'Local Changes' section.
  • MakeGo to the 'History' section and sure you have the dev branch checked out.
    • If you don't already have a local dev branch, right click on origin/dev and choose "Checkout origin/dev... "
      • Use the default settings and click 'OK' to create local copy of the dev branch.
  • Pull the latest changes from Origin.origin.

Make the Blender file:

  • Have the Game folder structure  at the ready.
  • Start in the pounce-art repository.
  • Determine the asset type:
    • characters - A rigged an animated character (robot, security camera, tanuki)
    • environments - Static assets to build the environment (walls, floors, trim, windowsills)
    • props - Items that can potentially be moved around in the game (vase, crate, sign, coins, statues, diamonds)
  • Create the folders for your asset.

Make the Block Mesh:

  • Have the Style Guidelines  at the ready.
  • Open Blender and immediately save the file into asset folder that you created a moment ago.
    • e.g. pounce-art/art_assets/props/crate_wood/crate_wood.blend
    • Follow the Naming Conventions.
      • Do NOT include things like "WIP" or "Blockmesh" in the name, always use the final name for the asset.
  • Use modeling tools to create an extremely rough block out of the mesh (don't spend more than 15 minutes):
    • Keep it extremely simple, focus on scale and proportions.
      • Keep in mind the point is to establish the bounds /size / dimensions / proportions of the model.
    • Match the dimensions that were given in the task assignment.
      • You can use the sidebar's item tab to type in exact dimensions.
    • Use primitive shapes.
      • For a crate, use a cube.
      • For a fire extinguisher, use a cylinder with a sphere on top.
    • Keep the poly count low so we don't bog down performance in the game.
    • Make sure all content inside of the .blend file is organized and named correctly. 

Clean up the scene:

  • Ensure asset is centered and sitting on the floor (not below the grid). 
  • Make sure that you're oriented correctly forward.
    • Negative Y axis is forward, Positive Z is up (Note: these axes will be different inside of Godot).
    • Tip: Add a Suzanne monkey to the scene, check which was she if facing; Your mesh should face the same direction.
  • Apply all transforms.
  • Name all objects and mesh data.
  • Remove lights, camera, annotations, and other unneeded junk.
    • Tip: Use the "Blender file" view in the Outliner to help find and remove junk.
    • You can also use File -> clean up -> purge unused data
  • Do not pack textures or other large assets into the .blend file

Create a collection for the asset:

  • Name the collection
  • move the block mesh into this collection
  • If there are multiple assets in this .blend file, make a collection for each asset.
    • Only put multiple assets in a single file if the are logically linked. e.g.
      • A set of gears - small, medium, large.
      • A set of rocks - different shapes and sizes.
      • Fence posts - posts, boards, scaffolding.
  • Set up the collection exporter (for each asset collection).
    • You only have to set this up once during the block mesh phase. Subsequent phases will re-use the same settings.
    • Select the asset's collection, go to the 'Collection' tab in the 'Properties' editor.
    • Find the 'Exporters' sub-section, click the '+' button on the right, and choose 'glTF 2.0'
    • Set the 'File Path': 
      • SwapPoint the path to the equivalent folder in the pounce-game repo
        • TIP: start with the current .blend file's location by typing two forward slashes "//" for the File Path, then click the browse button (// is short hand for the current .blend file location.)
        • Once the file browser opens to the location of the current .blend file, swap the "-art" for "-game" in the file path to send it over to the other repo.
      • Use the default 'Relative Path' option, it will look like this: 
        • //../../../../pounce-game/art_assets/props/crate_wood/crate_wood.gltf
      • Do NOT use absolute file paths, which look like this:
        • /home/xgreer/Projects/BUGJam/pounce/pounce-game/art_assets/props/crate_wood/crate_wood.gltf
      • Make sure you add the ".gltf" file extension
    • Set the 'Format': to 'glTF Separate (.gltf + .bin + textures)'
    • Enable 'Collection' -> 'Export at Collection Center'
    • Enable 'Data' -> 'Mesh' -> 'Apply Modifiers'
    • Set 'Data' -> 'Material' -> 'Materials' to 'Placeholder'
      • Note: We will handle proper material assignments in Godot during later asset creation phases.
    • For static meshes (things without animated bones):
      • Uncheck 'Data' -> 'Shape Keys'
      • Uncheck 'Data' -> 'Skinning'
      • Uncheck 'Data' -> 'Animation'
    • For skeletal meshes (things with animated bones):
      • Check 'Data' -> 'Armature' -> 'Use Rest Position Armature'
      • Check 'Data' -> 'Armature' -> 'Export Deformation Bones Only'
      • Check 'Data' -> 'Armature' -> 'Remove Armature Object'
  • Save the .blend file.
  • Don't commit to the repo yet, follow the next steps and make sure the export works first.

Check your Git working directory (pounce-game):

  • Open the pounce-game repo in SourceGit.
  • Make sure you have no uncommitted files in the 'Local Changes' section.
  • Make sure you have the dev branch checked out.
  • Pull the latest changes from Origin.

Set up the entity scene in Godot

  • Open the 'Pounce' project in Godot.
  • In Blender - Click the 'Export All' button in the collection exporters section.
  • Switch back over to Godot, when it becomes the active window the default asset importer will run.
  • Make an entity for your newly imported asset:
    • In Godot's FileSystem,  navigate to the entities folder
    • Open the folder for your asset type:
      • characters
      • environments
      • props
    • Right click, and choose 'Create New' -> 'Scene...'
    • In the 'Create New Scene' dialogue:
      • Select the fourth circle option to select a custom root node.
      • Set the 'Scene Name' to match your asset:
        • e.g. "crate_wood"
      • Click the "Pick Root Node Type" button to the right of the fourth circle option (Its icon looks like a file hierarchy)
        • Choose the appropriate node type:
          • CharacterBody3D - For characters.
          • StaticBody3D - For environment art that doesn't move.
          • RigidBody3D - For props that can be pushed around.
        • Click the 'Pick' button.
      • Click the 'OK' button.
  • Double click to open the newly created entity scene.
  • Drag the .gltf file into the scene tree
  • Right click on the node that you just dragged in, and choose 'Editable Children'

Set up Collision for the entity:

  • Right click in the 'Scene' tree, choose 'Add Child Node...'
  • Use the 'Create New Node' dialogue to choose 'CollisionShape3D', and click the 'Create' button.
  • Use the 'Inspector' (on the right side of the screen) to modify the 'CollisionShape3D'
    • Set the 'Shape' option that's appropriate for your block mesh.
    • Use the gizmos in the 3D viewport to resize the shape to fit the mesh.
    • Use the Inspector to expand the 'Shape' and 'Transform' properties if you need to type precises values
  • Repeat this to make several collision shapes if needed.
    • Note: If you duplicate a 'CollisionShape3D' node in the Scene tree, Godot will share the collision shape data between them. This means both shapes will always have the same size. If you need them to each have their own unique size:
      • Right click on the Shape type in the 'Inspector', and choose 'Make Unique' to decouple it from the other shared shape.
  • Save the .tscn file.

Commit changes / complete the task:

  • Commit to the pounce-art repo:
    • Make sure you're in the right branch: dev
    • StageGo onlyto the 'Local Changes' section and and stage the .blend file for the newly created asset.
      • Make sure you haven't staged irrelevant files.
    • Write a commit message:
      • Prefix the message with the name of the asset and a colon. 
        • e.g. "crate wood: Create block mesh"
    • Push the change to origin.
      • If it prompts you for credentials, enter your username and password for git.bugjam.dev
  • Commit to the pounce-game repo:
    • Make sure you're in the right branch: dev
    • Stage the files for the newly imported asset e.g.:
      • art_assets/props/crate_wood/crate_wood.bin - The binary mesh data for the exported gltf file.
      • art_assets/props/crate_wood/crate_wood.gltf - The text header file for the exported gltf file.
      • art_assets/props/crate_wood/crate_wood.gltf.import - Godot import settings and UID for the asset.
      • entities/props/crate_wood.tscn - The text-based scene file that contains the entity and it's collision.
      • Make sure you haven't staged other irrelevant files.
    • Write a commit message:
      • Prefix the message with the name of the asset and a colon. 
        • e.g. "crate wood: Import block mesh, set up crate_wood.tscn entity"
    • Push the change to origin.
      • If it prompts you for credentials, enter your username and password for git.bugjam.dev
  • Move a the Vikunja task to 'in-review'
    • Check the box for "Block Mesh" in the task description. 
    • Tell Lexi you're finished with that asset, and get approval to move on to Block Mesh Plus