Giter Club home page Giter Club logo

dotobj's Introduction

dotobj 5.3.2

.obj/.mtl loader, written in native GML, for GameMaker Studio 2.3 by @jujuadams

Download the .yymps

Chat about dotobj on the Discord server

 

Lightweight .obj/.mtl 3D model loader written in native GML. Can load from external files or from buffers. This example does not show off complex renderering or PBR, it only demonstrates the loading capabilities of the library.

Details on the .obj format can be found here: http://paulbourke.net/dataformats/obj/

 

Look! It's Sponza! In GameMaker!

 

dotobj currently supports:

  1. Per vertex position, texture coordinates, and normals

  2. Materials and material libraries

  3. Groups and objects

  4. Vertex colours - (not in the official .obj spec, but some editors can export them)

  5. UV flipping and winding-order reversal to handle engine quirks

  6. N-gon faces

 

How do I import dotobj into my game?

GameMaker Studio 2.3.0 allows you to import assets, including scripts and shaders, directly into your project via the "Local Package" system. From the Releases tab for this repo, download the .yymps file for the latest version. In the GMS2 IDE, load up your project and click on "Tools" on the main window toolbar. Select "Import Local Package" from the drop-down menu then import all scripts from the package.

 

Please note that dotobj doesn't support the following features:

  1. Smoothing groups

Not a priority since you can usually bake normals on export, but it'd be useful to have regardless.

  1. Separate in-file LOD

Not sure how often this gets used. Probably possible to implement if requested.

  1. Line primitives

Line primitives are mostly used for visualisation in editors rather than for actual game rendering. It's possible to parse line primitives and output that, but it's not a priority.

  1. Freeform curve/surface geometry (NURBs/Bezier curves etc.)

Rare to see this in gamedev and getting GameMaker to generate surfaces is not going to be a pleasant process. This will probably never be implemented.

dotobj's People

Contributors

jujuadams avatar

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.