Kembali ke Alat

Normal Map Generator

Tukar heightmap kepada peta normal ruang tangen

100% PercumaBerjalan dalam pelayar andaTiada pendaftaran

Tentang alat ini

Tukar mana-mana heightmap atau imej skala kelabu kepada peta normal ruang tangen terus dalam pelayar anda. Menggunakan pengoperasi kecerunan Sobel pada saluran luminans, dengan kekuatan, kelicinan, dan konvensyen paksi-Y OpenGL/DirectX yang boleh dilaras. Sesuai untuk enjin permainan, kerja shader, dan berpasangan semula jadi dengan modul aukimi Matter untuk reka bentuk bahan prosedural. Sebahagian daripada aukimi Matter.

Ciri-ciri

  • Pengesanan kecerunan berasaskan Sobel pada luminans
  • Konvensyen OpenGL (Y+) dan DirectX (Y-)
  • Kekuatan dan kelicinan yang boleh dilaras
  • Songsangkan saluran X / Y secara bebas
  • Pratonton heightmap dan normal berdampingan
  • Imej tidak pernah meninggalkan pelayar anda

Kes penggunaan

Bahan dan shader enjin permainanPenukaran bump-ke-normal yang pantasPratonton input sebelum menghantar ke aukimi Matter

Kongsi alat ini

Bantu orang lain menemuinya

Buat akaun percuma untuk menyahkan tera air

Simpan kerja anda, akses suite kreatif penuh, dan eksport tanpa tera air.

Sign Up Free

Mahu lebih kuasa?

Cuba aukimi Matter

Editor tekstur prosedural berasaskan nod untuk mencipta bahan PBR dengan pratonton 3D masa nyata.

How to convert a heightmap to a normal map

Turn a grayscale heightmap into a tangent-space normal map using Sobel gradient detection, entirely in your browser.

  1. 1

    Drop your heightmap anywhere on the tool

    Drag a PNG/JPG onto the workspace. The image is auto-downscaled to 1024 px max edge for real-time preview.

  2. 2

    Adjust Strength

    Higher Strength deepens the surface slope — good for subtle inputs, too high for already-contrasty ones.

  3. 3

    Add Smoothing if needed

    A 1–3 px box blur removes single-pixel noise that would otherwise create speckles in the normal map.

  4. 4

    Pick OpenGL or DirectX

    Unity/Godot/Blender → OpenGL. Unreal → DirectX.

  5. 5

    Download the PNG

    The output is a standard tangent-space normal map that any PBR material slot accepts.

Soalan Lazim

What is the difference between a heightmap and a normal map?

A heightmap stores elevation at each pixel (single-channel grayscale). A normal map stores a 3D surface direction (X, Y, Z) encoded in the RGB channels. GPUs can compute lighting far more cheaply from a normal map than by re-integrating a heightmap every frame.

Is this OpenGL or DirectX convention?

Both. The Convention selector switches the Y axis: OpenGL (Y+) is the default, used by Unity, Godot, Blender Cycles/Eevee. DirectX (Y-) is used by Unreal Engine and older Direct3D titles. If your lighting looks inverted in Unreal, flip to DirectX.

Does the color of the source matter, or only the luminance?

Only luminance. We compute Rec. 601 luminance (0.299·R + 0.587·G + 0.114·B) then run a Sobel gradient on that single channel. Feeding a color image works, but grayscale heightmaps give the cleanest result.

How does the Sobel operator work here?

Sobel convolves two 3×3 kernels over the luminance to estimate the gradient dx/dy at each pixel. We treat that gradient as the surface slope, build the normal vector (−dx·s, −dy·s, 1), normalize, and pack into RGB as (n·0.5 + 0.5)·255. Strength scales the gradient before normalization.

Can I use this output directly in Blender / Unity / Unreal?

Yes. Drop the PNG into your material's Normal slot. In Unity and Blender keep OpenGL; in Unreal switch to DirectX (or flip Y with the "Flip Green Channel" import option).

Why does the Smoothing slider help?

Real heightmaps often have 1-pixel noise that becomes amplified by Sobel. A mild box blur (1–3 px) removes that noise without losing large-scale detail. Zero is fine for clean procedural inputs.