Polybump Basic Usage Guide

Overview

Step 1: Creating Low-Poly Geometry

Create a low-poly model in 3ds Max and unwrap it by using the Unwrap UVW modifier.

If there is a mirrored section, the entire object, normals and/or UV's may be inverted. Make sure that all normals are facing outward and that there are no overlapping areas in the UV layout.

Step 2: Creating High-Poly Geometry

Create a high-poly object. When creating the object, make the edges softer and less sharp (softer curves) than in real life.

The high-poly object should slightly overlap at its extremities the low poly object.

Step 3: Creating the Cage File

A cage file is a single geometry or group of geometries that are used to stop rays from hitting two surfaces of the same object, which would result in miscalculations.

It essentially applies to concave geometries. For instance, it could be a single plane between two fingers of a hand, or a cylinder in the sleeves of a jacket.

All cage geometries should be attached as one object. For more information about creating a cage file, see the .

Step 4: Adjusting the Objects

Adjust your low-poly and high-poly objects so that both objects are in the same position and have roughly the same volume. If your polygon count allows it, make sure that any major extrusions or indents in the high poly are present in basic form of the low-poly object.

Make sure that the cage object is also located at the same coordinates as the low-poly and high-poly objects.

Step 5: Exporting Objects with the Polybump Plugin

The polybump.dlu should have been placed in either the stdplugs or the 3ds Max Plugins folder to be able to export your objects.

  • Before exporting the objects, make sure that they are located in the right position and have been reset with Reset XForm.
  • Start the PolyBump plug-in from the Utilities tab by clicking the More... button and selecting Crytek PolyBump.
  • Select you low-poly object. Its name should appear in the Selection box of the plug-in.
  • Click the OBJ Export button.

When saving, give the object a relevant name. For instance, naming the files with the suffix _low, _high and _cage makes it easier to select the right object later in the PolyBump standalone program.

Names have no effect on PolyBump calculation.

Select the high-poly object. Make sure that it is located at the same coordinates as the low-poly object.

  • Click the OBJ Export button. Save it with an appropriate name.

Select the cage object, make sure that it is located at the same coordinates as the two other objects.

  • Click the OBJ Export button and save it with an appropriate name too.

Step 6: Starting the Polybump Standalone Application

Start the PolyBump standalone application. The program loads by default with an empty .SRF.

Select Computation Settings from Document > Computation Settings.

Step 7: Loading a Low-Poly Object

In the Computation Settings windows, click the ... button on the right of the Low Poly file input box. Locate your previously exported low-poly object and click Open.

Step 7: Low-Poly Settings

In the Low poly settings window, specify which material channel PolyBump will use to calculate and click OK. This provides the option of running separate calculations for different material ID's.

Step 8: Loading a High-Poly Object

In the Computation Settings windows, click the ... button on the right of the High Poly files input box. Locate your previously exported high-poly object and click Open.

You can also load multiple high-poly objects.

Loading multiple high-poly objects is useful for importing a very high resolution object from ZBrush to 3ds Max into smaller parts.

It is very important to make sure that in 3ds Max all pivots are in the same position and all parts are Reset XForm before exporting to OBJ with the PolyBump plug-in.

If Smooth is checked, the high-poly object(s) will be smoothed on load. This is usually not necessary since objects exported through the PolyBump OBJ exporter in 3ds Max keep their smoothing groups. However, when exporting as OBJ from ZBrush or other 3D applications, smoothing may not be kept.

Step 9: Loading a Cage Object

In the Computation Settings windows, click the ... button on the right of the Cage file input box. Locate your previously exported cage object and click Open.

Step 10: Previewing the Objects

Click the Preview Input button at the bottom-right of the Computation Settings window, opening the objects overlaid in a preview window.

This is useful for checking if any areas of the high-poly object are too far outside of the low-poly object.

It is also useful to check the position of your objects, especially relevant when exporting from such programs as ZBrush.

The low poly mesh is displayed in white and the high poly in black. When a cage mesh is used, it is displayed in red.

Step 11: Setting Up Calculation Options

In the Computation Settings window, set the following options, which PolyBump will use to calculate the maps:

Rayshooting:

  • Mode: (Latest, Nearest) Using Latest is better as more details are captured.
  • Ray length: (% of low poly size) The higher this value, the longer the ray will last before returning a default value. The longer the ray is, the higher the risk of them hitting other surfaces. Therefore a cage file may be necessary.
  • Horizon: (low, med, high) When calculating a .ACC map, (Horizon), you have the option to define the quality. This is a trade off against the time it takes to calculate. Med is a good value to use.
  • Anti-aliasing: (none, Sel 2x2, Sel 3x3, full 2x2, full 3x3) Here you have the option to set the level of Anti-aliasing the high the settings the better the quality.

Output: Defines the output size. Should be the same as the texture map.

Step 12: Starting the Computation

If you want to try the tutorial, use the following settings:

Rayshooting:

  • Mode: latest
  • Ray length is: 10
  • Horizon: med
  • Anti-aliasing: full 3x3

Output:

  • Width: 1024
  • Height: 1024

Click OK in the Computation Settings window to close it.

Now click Document > Start Computation in the Menu bar.

Step 13: Calculating

While PolyBump is calculating, a progress window is shown. The calculation only uses free processing power so you can keep working as usual while it is running.

The percentage of the calculation will be shown for the indicated pass.

Step 14: Saving the SRF File

After PolyBump has finished calculating, save your SRF file from the Menu bar, under File > Save As... with the name of the output _ddn and _ddndif maps.

The result is displayed in thumbnail fashion.

From this, you can immediately see any major errors before opening your file in Photoshop.

Step 15: Exporting the Data

Now, you need to export the SRF data to generate the maps you need for the engine. In the Menu bar, click Document > Export data.

If you didn't set the correct path for the Resource Compiler (File > Application Settings), you will get a not found error message. Click OK and set the correct path in the ResourceCompiler Settings window.

Step 16: Setting the SRF Export Options

In the SRF Options tab of your SRF file, set the following options for PolyBump to use and click the Apply Settings & Compile button to generate the different maps.

Normalmap (_DDN):

  • Reduce resolution: Reduce or increase resolution of the output.
  • Expand border: Expand the border of the calculated map. A couple of pixels will reduce the likelihood of seams appearing. Higher value will help reduce any seams for mip maps.
  • Transform vectors to: Tangent space, object space - Sometimes you may want to use object space for static objects.

Horizon data:

  • Accessibility (_ACC): When checked an .ACC map will be generated. This can be overlaid onto a diffuse texture to add baked shadows or form to the object.
  • Unoccluded Are Direction (_DDNDIF): As with the .ACC map, this essentially bakes in shadows in crevices and intruded areas. You have the ability to increase the brightness of the map, or how dark the crevices will be in the game.

When you apply a normal map in the editor, the engine will automatically look for an existing _DDNDIF and use it as an occlusion map. It needs to have the same prefix name as the normal map (e.g. normal_DDN - normal_DDNDIF).

  • Displacement (Alpha of Normalmap): Not yet supported

In the SRF Additional Bump tab, you can use a bump map that allows you to create surface details that are difficult to model. The texture coordinates are taken from the low-resolution mesh.

The bump map has to be specified as a Targa (TGA) image. Dark pixels on the bump map are treated as pits.

To deselect a bump map, click on the ... button on the right of the File Path (relative to the SRF file): input box and press cancel.

Step 17: Testing the Maps

Once the object is exported from 3ds Max using the CryENGINE Exporter, load it in the Sandbox Editor and apply the generated maps in the material editor:

Here the result is displayed with the generated normal map:

Same object with DDNDIF applied: