Coder Social home page Coder Social logo

model-converter-python's Introduction

model-converter

This project aims to be a simple, lightweight, and useful 3D model editor. For the moment, only obj, off, ply ascii and stl models are supported.

Feel free to open an issue if you find anything wrong in this.

Scripts

A few utilities to manage 3D models :

  • convert.py that converts any type of model to any other
  • viewer.py which is a simple script that renders a 3d model

Install

This project is written in python 3. The convert.py script is made for needing nothing else than python. However, the viewer.py script has a few dependencies, you'll need :

  • pip (to install the other dependencies) sudo apt-get install python3-pip for example
  • PIL sudo pip install pillow
  • numpy sudo pip install numpy
  • pygame sudo pip install pygame
  • PyOpenGL sudo pip install pyopengl

Contributing

If you want to add a new format to this converter, it should be easy enough, you just have to create a python file in d3/model/formats that should :

  • be named after the format you want to add (e.g. obj.py)
  • contain a function that tests if a filename is in the specified format (e.g. is_obj)
  • contain a parser class (e.g. OBJParser)
  • contain an exporter class (e.g. OBJExporter)

About the parser

The parser should inherit the ModelParser class in the basemodel.py module. The ModelParser class has everything needed to create a 3D model and render it.

About the exporter

The exporter should inherit the Exporter class in the basemodel.py module. It should have a constructor that takes a ModelParser has parameter and a __str__ method that should compute the export.

Formats

Here is the list of all the supported formats

  • Wavefront .obj
  • Stanford .ply
  • Object File Format .off
  • STL files .stl

model-converter-python's People

Contributors

tforgione avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

model-converter-python's Issues

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.