Skip to main content

Generate vertex normal data from wavefront .obj files

Project description

objnormals

Generate vertex normal data from wavefront .obj file

Input: sample.obj (without vertex normal info)
Output: sample_out.obj (with vertex normal info)

Run

objnormals filepath

Sample file input:

# cube.obj

v 0.0 0.0 0.0
v 0.0 0.0 1.0
v 0.0 1.0 0.0
v 0.0 1.0 1.0
v 1.0 0.0 0.0
v 1.0 0.0 1.0
v 1.0 1.0 0.0
v 1.0 1.0 1.0

f 1 7 5
f 1 3 7
f 1 4 3
f 1 2 4
f 3 8 7
f 3 4 8
f 5 7 8
f 5 8 6
f 1 5 6
f 1 6 2
f 2 6 8
f 2 8 4

Sample file output:

# cube_out.obj

v 0.0 0.0 0.0
v 0.0 0.0 1.0
v 0.0 1.0 0.0
v 0.0 1.0 1.0
v 1.0 0.0 0.0
v 1.0 0.0 1.0
v 1.0 1.0 0.0
v 1.0 1.0 1.0

vn 0.0 0.0 -1.0
vn 0.0 0.0 -1.0
vn -1.0 0.0 0.0
vn -1.0 0.0 0.0
vn 0.0 1.0 0.0
vn 0.0 1.0 0.0
vn 1.0 0.0 0.0
vn 1.0 0.0 0.0
vn 0.0 -1.0 0.0
vn 0.0 -1.0 0.0
vn 0.0 0.0 1.0
vn 0.0 0.0 1.0

f 1//1 7//1 5//1
f 1//2 3//2 7//2
f 1//3 4//3 3//3
f 1//4 2//4 4//4
f 3//5 8//5 7//5
f 3//6 4//6 8//6
f 5//7 7//7 8//7
f 5//8 8//8 6//8
f 1//9 5//9 6//9
f 1//10 6//10 2//10
f 2//11 6//11 8//11
f 2//12 8//12 4//12

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

objnormals-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

objnormals-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file objnormals-0.1.1.tar.gz.

File metadata

  • Download URL: objnormals-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for objnormals-0.1.1.tar.gz
Algorithm Hash digest
SHA256 857c0d68c20fb86a208945132b1717fe525e459b459ca7896af931977dbe9e9f
MD5 e3eaed2ad84ec58c6a6ca3668fbad466
BLAKE2b-256 aac3aaa37ca98a354078bc13ee7eece85e772b41f3783181951ed6882a402495

See more details on using hashes here.

File details

Details for the file objnormals-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: objnormals-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for objnormals-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1ab7432822ee7b10c76c7d9cb2ffa0f44a3825d2e1911e43f8201faf4612423
MD5 c3101932f8ce602b37111f78e6b34312
BLAKE2b-256 81f606b464ed000bf8d3e84436f7b165c8dec760afaa57fe284cb47d13c28ab8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page