Crop & Transform

This feature was introduced in the “Artist Point” release

Crop, Rotate, or Tile a localspace heightfield or bitmap.

When to Use

Anytime you need to manipulate the extents of a localspace object. For example:

  • Cropping a photo down to the relevant area to create a material
  • Extracting individual elements from a source image that you can then scatter into your world
  • Creating a balanced in-play area for a game by mirroring the input

How to Use

The input to the device must be in localspace. Worldspace data is embedded into a world and cannot be individually manipulated.

Connect your localspace heightfield or bitmap into the input, and the cropped or transformed version will be output.

You can easily control the cropping area in the visual editor:

Visual Edit icon

Click the visual edit icon to open the device in the view!

Parameters

Resolution Type: When the new size is different than the old size, control how to determine a new image resolution:

  • Original or smaller: The output resolution is limited to the input resolution. If the cropped area is larger than the original, the size will not exceed the original in either dimension.
  • Expandable: If the cropped area is larger than the original, the resolution of the object will be increased proportionally.

Boundary Handling: If part of the crop rectangle lies outside of the original image, this controls how to rectify that situation:

  • Blank: Outside areas are left at 0 (black)
  • Edge values: Outside areas are clamped to the nearest edge value from the input
  • Repeat interior: Outside areas are taken as if the input tiled across space
  • Mirror interior: Outside areas repeat as above, but as a mirror-image pattern.

Width: The new width of the input, as a percentage. It can be larger than 1.

Height: The new height of the input, as a percentage. It can be larger than 1.

Tips and Tricks

  • This device is easiest to control in the visual editor of World Machine.
  • It’s not immediately obvious that the crop device is also able to create mirrored or repeating maps, by positioning the crop rectangle partway outside of the input and selecting a non-blank boundary handling mode

Limitations

This device currently only operates on heightfields and bitmaps. It may in the future also operate on materials.

Updated on December 4, 2021
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support

Start the discussion at forum.world-machine.com

Historical Comments

Leave a Comment