Coder Social home page Coder Social logo

gd-obj's Introduction

gd-obj

.obj parser for Godot 4.0

(For a version that works in Godot 3.x check out the 3.x branch.)

Why?

Godot is unable to import .obj files during application runtime. gd-obj enables this functionality by implementing a basic obj parser. gd-obj supports uvs, faces, normals, and does surface triangulation.

How to use?

Setup

Simply include the ObjParse.gd file anywhere in your Godot project.

Load from paths

Call ObjParse.load_obj(path_to_obj, path_to_mtl). This will return a Mesh which can, for example, be placed into the mesh field of a MeshInstance.

The second argument path_to_mtl is optional. When excluded the parser will check if a materials file is specified in the .obj data and will automatically load it if valid.

Load from buffers

Call ObjParse.load_mtl_from_buffer(mtl_data, textures) to get the materials then call ObjParse.load_obj_from_buffer(obj_data, materials) to get the mesh.

gd-obj's People

Contributors

deakcor avatar ezcha avatar kb173 avatar jeffgamedev 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.