Normal Map Rotator
The normal map rotator changes both texel positions and tangent-space directions. Choose a quarter turn, declare the input Y convention, and compare the result under the same fixed light. X and Y rotate with the texture while Z keeps its hemisphere and alpha follows each moved texel.
How to Get Started
Upload an ordinary RGB tangent-space normal map or try the procedural sample. Declare OpenGL Y+ or DirectX Y− using source documentation or a known material setup. Choose 90 degrees clockwise, 90 degrees counterclockwise, 180 degrees, or 270 degrees clockwise. Compare Original and Rotated as textures, then switch to shared-light shading. Download the lossless PNG after processing completes. Reset selects the original orientation and default convention without repeatedly transforming earlier results.
What Is a Normal Map Rotator?
A normal map rotator changes the orientation of an existing tangent-space texture in its image plane. Its output must describe the surface directions of the newly oriented pattern. This differs from rotating a mesh in world space, rotating a light, or converting a green-channel convention. Those operations involve other coordinate relationships. Use the tool for a deliberately reoriented texture asset, and check that its associated material maps and UV setup are changed consistently.
Why Normal Maps Cannot Be Rotated Like Ordinary Images
A photograph only needs its pixels moved to change orientation. A normal texture also stores a local direction at every pixel. If a right-leaning slope moves with a clockwise turn but its red and green values remain unchanged, the new image still describes the old direction. This normal map rotator decodes RGB into signed components, changes X/Y numerically, normalizes the result, and re-encodes it rather than relying on a Canvas image rotation.
Rotating Texels vs Tangent Vectors
The coordinate convention is explicit: image x increases rightward and image y downward, while tangent X points right and tangent Y points up. For a clockwise quarter turn, source texel (x, y) moves to (height − 1 − y, x), and the Y-up tangent vector (X, Y, Z) becomes (Y, −X, Z). DirectX Y− green values are decoded into that same Y-up frame before transformation and encoded back afterward. Output retains the declared input convention.
90°, 180°, and Arbitrary Rotation
Quarter turns use exact integer texel permutations. Ninety and 270 degrees swap width and height; 180 degrees retains dimensions. Counterclockwise 90 is equivalent to clockwise 270, so those controls intentionally produce the same result. The normal map rotator always calculates from the immutable original, avoiding cumulative quantization from repeated clicks. Arbitrary angles are not offered: robust angle support would also require documented resampling, transparent padding, and expand-or-crop bounds behavior.
Normalization and Z Semantics
Rotating X/Y mathematically preserves vector length and leaves Z unchanged. The export pipeline still normalizes to handle malformed source magnitudes and eight-bit rounding. Lengths below 0.02 use neutral (0, 0, 1); other vectors retain their direction and Z sign after normalization. A negative Z source therefore remains in the negative hemisphere. This operation does not rebuild blue, remove compression artifacts, or turn an incorrectly encoded mask into a valid normal map.
Mirroring vs Channel Flipping
A spatial horizontal mirror moves texels across the image and negates tangent X; a vertical mirror moves them vertically and negates tangent Y in a consistent basis. A channel sign flip alone changes directions without moving features. The normal map rotator exposes rotation only, so neither mirror operation is hidden inside its buttons. Use the converter when the intended task is a convention or channel correction, and avoid applying a green flip twice during import.
Correct a declared channel convention with the converterWhen Rotation Is Useful
Quarter turns help orient directional tiles, trim textures, decals, fabric weave, or an atlas region prepared with compatible tangent assumptions. Rotate matching color, height, roughness, and other scalar maps spatially by the same amount using an appropriate image workflow. A mesh's UV rotation and regenerated tangent basis may already account for orientation, so rotating the normal texture again can double the correction. This normal map rotator cannot inspect your mesh or infer which asset convention is intended.
Common Errors
The main error is moving purple pixels without turning the encoded X/Y directions. Another is using the wrong input Y convention, which reverses the tangent rotation relationship. A mismatched tangent basis, UV layout, texture color space, or compression setting can remain wrong after a numerically correct quarter turn. Preserve alpha and hidden RGB when working with decals. Supported non-interlaced eight-bit PNGs retain those numeric bytes directly; browser fallback decoding may already have discarded them.
Who Needs Texture Orientation Changes
Texture artists can prepare rotated variants without manually swapping and inverting channels. Technical artists can compare a known directional pattern with the documented transform, and developers can verify quarter turns during asset conversion. The fixed-light comparison intentionally leaves lighting in place: highlight direction should respond to the rotated vectors rather than following the old shading. Processing and PNG encoding stay in browser memory, with no image-upload API and the same source dimension limits as other tools.
Validate Orientation in the Destination
The normal map rotator exports direct lossless RGBA8 PNG, permutes alpha exactly, and includes the turn and declared Y convention in its filename. Recheck vector lengths, inspect a recognizable ridge under horizontal and vertical lighting, and confirm the destination uses non-color normal import. The browser comparison tests the file's vectors rather than mesh tangents. Use the viewer for additional lighting and material inspection, then evaluate the actual asset with its final UVs and compression settings.
Inspect the rotated texture with the material viewerFrequently Asked Questions
Why can the rotated texture look similar but shade differently?
Its stored tangent X/Y directions turn with the pattern. Moving pixels alone would leave those directions wrong, which a fixed light reveals more clearly than a purple thumbnail.
Does 90° counterclockwise differ from 270° clockwise?
No. They name the same quarter-turn permutation and tangent transform. Both options are shown for convenient orientation choice.
Does rotation convert DirectX to OpenGL?
No. Declare the input convention and the output retains it. Y− is temporarily decoded into Y-up coordinates for correct rotation, then encoded back as Y−.
Can I rotate by an arbitrary angle or mirror the image?
This workspace supports exact quarter turns only. It does not expose arbitrary-angle bounds, resampling, or mirror controls.