Code Monkey home page Code Monkey logo

unityobjparser's Introduction

UnityObjParser

This obj parser for Unity allows you to load models from obj+mtl files in runtime. Requires C# 6. Tested with Unity 2017.3 on windows.

Key features:

  • Asynchronous. And I don’t mean coroutines, I mean separate threads, so your application doesn’t hang when it reads geometry.
  • Fast. Millions of polygons take tens of seconds to load on desktop cpu. Keep in mind that in build it’s about 3 times faster than in editor.
  • Features support. You can load meshes with triangles or quads, with positive or negative vertex indexes, there’s support for different normals and uv coordinates on a vertex, white spaces in file names etc.
  • Simplicity. Just call await ObjParser.Parse(path) and you’re good to go! Example scene is also included.

Limitations:

  • Parser uses async/await, so you need C# 6 and a platform with threading support.
  • Only loads from files. There’s no option to load from a url, so you’ll have to add that yourself if you need it.
  • Limited materials support. I’m only loading albedo, normals and transparency. Again, you’ll have to add more features yourself if you need them, it should be simple enough.
  • Polygons with more than 4 vertices are supported, but only if they are convex and vertices are in one plane. If you’re not sure if that’s the case, triangulate your meshes during export.
  • Textures are cached, models are not. Textures cache can be cleared.

unityobjparser's People

Contributors

mmaletin avatar

Stargazers

Nikita Kirakosyan avatar Man Sun avatar Иван avatar HHHHHHHHHHHHHHHHHHHHHCS avatar

Watchers

James Cloos avatar  avatar

Forkers

tsinglee2009

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.