Skip to main content

xNormal Wrapper

This is a wrapper for the program xNormal that allows for easy scripting and automation.

It is licensed under BSD

For any issues feel free to contact me at:

contact@theorangeduck.com

Basic Usage

The below generates a normal map and ambient occlusion map for the piano meshes.

import xNormal
xNormal.run("piano_high.obj", "piano_low.obj", "piano.png", 
			  width=256, height=256, gen_normals = True, gen_ao = True)

Extended Usage 1

The belows shows some more features.

First the path is set. By default the wrapper assumes xNormal.exe is in the PATH variable.

Secondly it generates a normal map with a switch coordinate system and an AO map with fewer rays and jitter. Finally is generates a convexity map.

For a full list of options have a look in the source code where they are listed and easy to see.

Finally it stores the errorcode of xNormal in case of something being wrong.

import xNormal
xNormal.path = "C:\\Program Files\\xNormal\\3.19.3\\x64\\xNormal.exe"
err = xNormal.run("piano_high.obj", "piano_low.obj", "piano.png", width = 256, height = 256, 
                   gen_normals = True, normals_x = "+X", normals_y = "-Z", normals_z = "+Y",
                   gen_ao = True, ao_rays = 64, ao_jitter = True, 
                   gen_convexity = True, convexity_scale = 0.75)

Extended Usage 2

Scripting xNormal goes via the form of supplying it with a configuration file. These can be generated and saved for later use.

To build a configuration file xNormal.config it must be supplied with a list of high mesh options, a list of low mesh options and a list of generation options.

import xNormal
high_config = xNormal.high_mesh_options("piano_high.obj", scale = 2.0)
low_config = xNormal.low_mesh_options("piano_low.obj", scale = 2.0)
generation_config = xNormal.generation_options("piano.png", gen_normals = True)

config = xNormal.config([high_config], [low_config], generation_config)

f = open("later.xml", 'w')
f.write(config)
f.close()

Metadata

Release files for xNormal 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xNormal 1.1.1
File Size Uploaded Provenance
xNormal-1.1.1.tar.gz 5.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for xNormal 1.1.1
File Interpreter ABI Platform
xNormal-1.1.1-py3.7.egg Legacy Egg format - - Details
xNormal-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / xNormal-1.1.1.tar.gz

Download URL xNormal-1.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4624339495e79a70ddee6d177e71a3e626cbbace616c4251f958a7818b6c2185
BLAKE2b-256 checksum
How to use checksums
d15331988f2014a2c8a1c980033064ba252c079dc93bd9d7bb4e162f6afd6254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / xNormal-1.1.1-py3.7.egg

Download URL xNormal-1.1.1-py3.7.egg
Size 10.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
1abefffd706b426044262f6f76770fc732c4827578a6a8ddb7378bb299d7c594
BLAKE2b-256 checksum
How to use checksums
ec8bd0c2bfbca63764f1a1b0d08e6c033fc7fa42d34ed8b99a1b6c6d63c7b24d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / xNormal-1.1.1-py3-none-any.whl

Download URL xNormal-1.1.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8340f22600a12a06a39da3c7bf514a2c258e07968e85c3d8dddb0a77073db78
BLAKE2b-256 checksum
How to use checksums
6b1e7e7a68704f3f810085bf0ca3aaf3df4df61fe1833c66470d71f8ebcc1d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for xNormal 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page