Skip to content

Latest commit

 

History

181 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blender to GameMaker Vertex Buffer Exporter

This exporter can be used to export all kinds of vertex formats.

Description

  • Generates a file with (vertex) buffer contents
  • Applies transforms & modifiers
  • Generates an accompanying JSON file that describes all exported content
  • Features:
    • Customizable vertex format, allowing for:
      • Static geometry batches
      • Dynamic geometry batches (mesh data + offset per mesh/object in json file)
      • Batched morphs
      • Basic export of any material/shader properties
    • Usable as a collection exporter

Installing the add-on in Blender

  • In Blender, go to Edit > Preferences
  • Go to tab Add-ons and select Install from File...
  • Select the zip file blender-gms-vtx-buffer-v1.1.0.zip and confirm (the filename will be different for another version of the exporter)
  • Tick the checkbox next to Import-Export: Export GameMaker Vertex Buffer
  • Click Save User Settings
  • The add-on is now ready to be used

Installing presets

Preset files are Python files (.py) that contain an operator preset's code. These files need to placed in the right directory for the operator to detect them. To install a new preset:

  • Navigate to %USERPROFILE%\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\presets\operator
  • Create a new directory with the name export_scene.gms_vtx_buffer. This is the bl_idname of the operator.
  • Place the preset file in this directory The included presets can be installed from the add-on's preferences

Important The preset format changed in v1.1.0. Presets created with an older version of the exporter will no longer work!

Usage

In Blender

  • Select one or more objects that you want to export
  • Export using an existing export preset or create your own configuration

In GameMaker

  • Load the file as a buffer using buffer_load.
  • Define the vertex format, either in the code editor or load it from the JON file.
  • Create a vertex buffer from the buffer using the created vertex format.
  • Create a shader with vertex attributes that correspond to the vertex format.
  • Draw the model using the shader.

To export the vertex format, tick Export Object Data. This generates an additional .json file which contains a description of the vertex format. The format description can be found under the key blmod/mesh_data/format.

Advanced

More info and examples can be found in the wiki: https://github.com/blender-to-gmstudio/blender-gms-vtx-buffer/wiki

Creating vertex formats

See the wiki on defining vertex formats.

About

Generic Blender exporter for GameMaker that exports highly customizable vertex formats

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages