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@daniel-holden.com

Basic Usage
-----------

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

```python
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.

Seconly 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.

```python
import xNormal
xNormal.path = "C:\\Program Files (x86)\\Santiago Orgaz\\xNormal 3.17.13\\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.

```python
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()
```



Download files

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

Source Distribution

xNormal-1.0.zip (6.0 kB view details)

Uploaded Source

Built Distribution

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

xNormal-1.0.win32.exe (202.2 kB view details)

Uploaded Source

File details

Details for the file xNormal-1.0.zip.

File metadata

  • Download URL: xNormal-1.0.zip
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xNormal-1.0.zip
Algorithm Hash digest
SHA256 9dc70a46499435dbbc425351d47237e50f4f11fcb84324132d69e0d36a384a4f
MD5 453a130d6d82d118e0318d91da3cb566
BLAKE2b-256 6ce9b23b7a443a5a2a2808b3674d500449fa70e13687a787e497624e1c7b369d

See more details on using hashes here.

File details

Details for the file xNormal-1.0.win32.exe.

File metadata

  • Download URL: xNormal-1.0.win32.exe
  • Upload date:
  • Size: 202.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xNormal-1.0.win32.exe
Algorithm Hash digest
SHA256 732bc981563f57f5445dd4ba7b2cd2a76895c59a65df708e99652e0421f7be56
MD5 f384ab12402a45ebdc741eed918739e0
BLAKE2b-256 fb53b10e67bbc1a68d7985d68e7f1662990209a417df0ed9e7134d7f1f93942b

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.1

3 files

1.1.0

3 files

1.0.1

1 file

This release

1.0 This release

2 files

Supported by

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