Please send feedback to
chollemeersch@gmail.com
or pboehme@gmail.com

# Download

This software is still in development and undergoing frequent changes. The latest build is available here.

# Introduction

Njob is a simple tool that supports a number of filters related to normalmapping and texture creation. Its focus lies on portability and quick interaction.

v1.0 Features:

- Convert photographs to heightmaps
- Convert normalmaps back to heightmaps
- Generate ambient occlusion from height and normal maps
- Convert heightmaps to normalmaps
- Reads/Writes most common image formats, copy paste between other apps
- Keyboard shortcuts for all functions

Planned Features:

- Real time 3D preview
- Zooming

# Using njob

## Getting data in and out of njob

You can load and save images via the file menu. Njob uses the FreeImage open source image library and can read a wide variety of formats. It writes files in BMP, PNG, TIFF or TGA formats.

You can also copy-paste images with njob which may be quicker when interacting with other applications such as Photoshop.

## Setting the normal format

If your engine uses a nonstandard normal format it is important to set up njob correctly before using any of the normal mapping functions. Set the normal format in Edit -> Normal Format (Ctrl+P).

## Maintaining repeating textures

Njob can properly handle tiling textures without introducing unwanted seams. You can mark your source imagery as tiling in the setup screen (Ctrl+P).

## Converting photographs to height maps

This filter tries to convert a photograph to a height map by analyzing the lighting at various frequencies. While it doesn't provide correct depth maps the resulting depth maps are usually a lot better than various other simple techniques such as grayscale conversion.

To get optimal results with the height map filter provide it with a source photograph taken under "overcast" conditions. The tool works best on uniform smooth lighting without any harsh shadows.

Also quickly varying albeido (diffuse color) of the underlying material may confuse this filter, for example black tiles with white grout would detoriate the height map results.

## Converting normal maps to height maps

This filter converts a normal map back to a height map. Note that this will not necessarily result in the original height map the normal map was generated from. Especially for normal maps generated by tracing high poly models this is an approximate operation and is not equivalent to a depth trace.

## Converting height maps to normal maps

You feed it a heightmap and it returns a normalmap - this filter is mainly included for completeness. By using the "crispy bacon" estimation you can generate sharper normalmaps than most other programs. The disadvantage of this mode is that the normals will be shifted by half a pixel. (It is unlikely that this will be an issue, but you can solve this by offset the normal map texture coordinates by half a pixel in the shader).

The image below shows a comparison between traditional and crispy modes using the same heightmap input:

## Converting height & normal maps to ambient occlusion

This filter generates a local ambient occlusion map from a given height or normal map. This may be cheaper than doing a full AO trace on your highpoly and it can also provide AO for custom made detail normals not present in the highpoly.

## Smoothing out gaps in a normal map

If for some reason your normal map contains gaps like in between UV seams, or areas where highres geometry was missed by the renderer, you can use this function to add smooth padding and normalize these areas. Currently, njob can either use pixels with invalid normals (black, grey, etc) or an image's alpha channel as a mask for this operation.

# Hotkeys

## Functions

0 | Diffusemap > Heightmap
1 | Normalmap > Heightmap
2 | Normalmap > Ambient Occlusion
3 | Smooth edge padding
4 | Heightmap > Normalmap
5 | Heightmap > Ambient Occlusion

## Misc

Ctrl+O | Open (also: double click canvas)
Ctrl+S | Save
Ctrl+C | Copy to clipboard
Ctrl+V | Paste from clipboard
Ctrl+Z | Undo
Ctrl+Y | Redo
Ctrl+N, Ctrl+P | Set Normalmap format
Space+LMB | Pan
F1 | Help
Alt+X, Alt+F4 | Exit

# Troubleshooting

## I converted a normalmap to a heightmap and it looks wrong

You may not have set the correct normal format for the source texture you provided.