Code Monkey home page Code Monkey logo

uv-exporter's Introduction

uv-exporter

Exports UV mapping from an obj file
Now all coordinates will be mapped into the [0, 1] range, so everything will be cramped in the square. Better than a lot of details lost.

A full rework is due. No more manual parsing, I'll get some better obj parser.

Usage:

(in command promt)
python uvexporter.py -i %SOURCE% [-o %OUTPUT%] [--h %HEIGHT%] [--w %WIDTH%] [-lw %LINEWIDTH%]

Parameters:

*-i %SOURCE% Path for your obj file. You must have this parameter or the script would not have anything to process.
*-o %OUTPUT% Path for your exported image file. If left blank, the image file will be named as the source obj file.
*--h %HEIGHT%
*--w %WIDTH% Optional output image size. By default 2048 x 2048 px.
*-lw %LINEWIDTH% Optional line width. By default 1.

Other information / Limitations:

Only one UVW mapped mesh per obj file, since the author didn't realise there could be multiple meshes in one obj file.
UTF-8 encoding preferred, try saving your obj as UTF-8 if some locale error pops up.

uv-exporter's People

Contributors

mikkelimatlock avatar

Stargazers

LgxGeoGo avatar  avatar spy14414 avatar Ellis avatar caocao avatar

Watchers

 avatar

Forkers

mykoma

uv-exporter's Issues

list index out of range

Hi, @Schmeichel20
I called python3 uvexporter.py -i test.obj, but it failed.

Traceback (most recent call last):
  File "uvexporter.py", line 112, in <module>
    main()
  File "uvexporter.py", line 74, in main
    if vertex_index[1] != '':
IndexError: list index out of range

Do you know how to solve it? Thanks for your time.

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.