Skip to content

parkerallan/k3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K3D for KallistiOS KGL

K3D is a simple 3D asset library for KallistiOS projects using KGL. In this repo it shows up in three parts:

  • A binary model and animation format
  • A C runtime library for loading and playing K3D assets in KallistiOS KGL applications
  • A Blender exporter for writing mesh, skeleton, and animation files

Also includes an example with assets so you can see the whole thing working together

Runtime Library

The runtime code lives under example. It handles loading, animation playback, and rendering.

Key files:

At a high level, the runtime flow looks like this:

  1. Load a mesh from a .k3d file.
  2. Load a matching skeleton from a .k3sk file if the model is skinned.
  3. Load skeletal clips from .k3sa files and morph clips from .k3va files.
  4. Register those clips with the animation player.
  5. Update the animation player each frame and render the animated mesh.

Blender Exporter

The Blender exporter lives in k3d_exporter and writes files that match the runtime loader.

The exporter targets Blender 2.80 or newer and shows up in Blender's export menu as K3D (.k3d).

K3D uses a few related file types exported from Blender:

  • .k3d: mesh data
  • .k3sk: skeleton data
  • .k3sa: skeletal animation clips from your Blender actions
  • .k3va: vertex animation clips from your Blender shapekeys

This keeps the base mesh separate from animation data, but you can blend clips or play them at the same time as needed.

Example Asset Pipeline

The sample assets in romdisk show the intended layout:

This sample uses:

  • Skeletal clips which drive large body motion like the movement when standing idle or talking
  • Vertex clips which handle localized shape changes with facial expressions such as blinking or mouth movement for talking

About

3d model format, library, and exporter for Dreamcast via KallistiOS KGL

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors