Giter VIP home page Giter VIP logo

yamc's Introduction

YAMC

Yet Another Model Converter for GameMaker

License Discord

About

Yet Another Model Converter (YAMC) is a tiny tool that loads a model from one of many supported file formats and exports it into a binary file that can be simply loaded in GameMaker using functions buffer_load and vertex_create_buffer_from_buffer.

See file yamc.gml for simple utility functions. The utils folder also includes a shader that you can use as a base for your custom ones. If you are not familiar with shaders, you can also draw the models using GameMaker's built-in shaders with lighting, fog etc. See examples folder for little example projects.

Features

  • Convert static model into a binary file, easily loadable using functions buffer_load and vertex_create_buffer_from_buffer.
  • Customizable vertex format. Supports 3D position, normal, texcoord (up to two layers), color and tangent vector with bitangent sign (float4).
  • Invert vertex winding order.
  • Convert to -Y-up (default) or +Z-up space.
  • Generate flat or smooth normals if the model has none.
  • Flip UV coordinates on the Y axis.
  • Bake materials' diffuse colors into vertex colors.

Limitations

  • The entire model is collapsed into a single vertex buffer, therefore it cannot have sub-meshes with different textures/materials/shaders, different vertex formats and different primitive types (the entire model needs to be either point list, line list or a triangle list).
  • Animations are not supported.

Usage

Run yamc -h to see help message with all arguments and their description.

Building from source

Following commands build yamc binary into folder dist. Requires CMake 3.23 at least and a C++17 compiler!

git clone https://github.com/blueburncz/YAMC.git
cd YAMC
cmake -B build -S .
cmake --build ./build/ --config=Release

Links

  • Assimp - Used to load models.
  • BBMOD - More advanced tool with support for animated models and a huge library for advanced 3D rendering in GameMaker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.