Giter VIP home page Giter VIP logo

Comments (3)

marlonwc3 avatar marlonwc3 commented on September 15, 2024

Can you share all formats?

from threedee.

tomersimis-zz avatar tomersimis-zz commented on September 15, 2024

Some of them are very simple, like this one:

# cubo.obj
# cubo representado por triangulos centrado na origem
# Linhas que iniciam com # sao comentarios
# Autor: Marcelo Walter
# Lista de vertices
v -0.5 0.5 0.5
v -0.5 -0.5 0.5
v 0.5 -0.5 0.5
v 0.5 0.5 0.5
v -0.5 0.5 -0.5
v -0.5 -0.5 -0.5
v 0.5 -0.5 -0.5
v 0.5 0.5 -0.5
# Lista de faces
f 1 2 3
f 8 7 6
f 4 3 7
f 5 1 4
f 5 6 2
f 2 6 7
f 1 3 4
f 8 6 5
f 4 7 8
f 5 4 8
f 5 2 1
f 2 7 3
# fim do 

v %f %f %f where %f represents a vertex coordinate
f %d %d %d where %d represents a index in the vertices array

There are normal definitions too, marked by an "vn" in the first part of the string.

Some of them are more complex, having structures like
f %d/%d/%d %d/%d/%d %d/%d/%d where the first %d represents the vertex index, the second %d represents the texture coordinate (not needed atm) and the third %d represents the normal index

More information about the structure can be found in http://rodrigo-silveira.com/opengl-tutorial-parsing-obj-file-blender/

from threedee.

marlonwc3 avatar marlonwc3 commented on September 15, 2024

Our Normal class has 3 axis attributes but a Normal (vn) input has only two

from threedee.

Related Issues (3)

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.