3D ENGINE VIEWPORT · SOBEL / SCHARR TANGENT-SPACE BAKER

Real-Time Normal Map Generator & 3D Lit Viewport

Generate OpenGL & DirectX tangent-space normal maps, height, roughness, and AO maps from any image in real time with a live 3D lit-sphere shader preview.

Drop Diffuse, Bump, or Height Image (PNG / JPG / WebP)
Real-time Sobel / Scharr Normal Map baker + OpenGL/DirectX Y-flip + live 3D lit sphere
Drag across the 3D lit sphere on the right to orbit the light source in real time.
2D Map Output
OpenGL (+X, +Y, +Z)512x512
3D Lit Viewport
Drag to orbit lightL(0.4, 0.5, 0.8)
NormaForge Engine browser normal map generator with real-time PBR lighting preview

Bake Accurate Tangent-Space Normal Maps Straight in Your Viewport

Flat diffuse textures look lifeless under dynamic 3D lighting. Adding a properly calibrated Tangent-Space Normal Map—paired with matched Height, Roughness, and Ambient Occlusion channels—makes low-poly walls, sci-fi armor plates, and terrain catch realistic specular highlights without adding a single extra polygon.

NormaForge Engine (normalmapai.site) computes real-time derivative normal maps right inside your browser:

  1. Load any height, bump, or diffuse image (or click Sci-Fi Hex Panel, Carved Stone, Diamond Tread, or Organic Bark to inspect procedural test heightfields immediately).
  2. Choose your target engine space: switch effortlessly between OpenGL (+Y Up) for Blender/Unity/Godot/Three.js and DirectX (-Y Down) for Unreal Engine and 3ds Max.
  3. Select your mathematical kernel: compare 3×3 Scharr (rotational accuracy), 3×3 Sobel (crisp pixel edges), and 5×5 Wide Smooth (soft rounded slopes) while dragging the 3D Lit Sphere to inspect live Blinn-Phong + Fresnel shading.
  4. Download all four matched maps (Normal, Height, Roughness, AO) as clean power-of-two PNGs.

Convolution & Shader Parameter Matrix

Control Recommended Setting Technical Impact
Engine Space OpenGL or DirectX Automatically sets Green channel polarity (+Y vs -Y) so bumps never appear inverted inside your 3D engine.
Filter Kernel 3×3 Scharr Minimizes diagonal angular error compared to standard Sobel, ideal for curved rivets and rock crevices.
Strength 1.5 – 3.5 Scales dH/dx and dH/dy tangent slopes prior to vector normalization normalize(nx, ny, 1.0).
Pre-Smooth Blur 1 px for photos; 0 px for clean CAD heightmaps Suppresses JPEG compression blocks before taking spatial derivatives.
Seamless Edge Wrap Checked for tileable textures Wraps convolution taps across image boundaries so seamless textures remain seamless in tangent space.

Why Real-Time Blinn-Phong Sphere Verification Prevents Shipped Bugs

Inspecting a raw purple-blue RGB normal texture with the naked eye makes it notoriously easy to ship an inverted green channel (+Y imported into Unreal without flipping Green, turning raised bricks into indented holes). Dragging our interactive 3D Lit Viewport lets you place the virtual light directly above the sphere (L.y > 0) and confirm immediately that convex bumps illuminate on their upper edge and cast crisp shadows underneath.

Quick Engine Setup After Exporting Your Maps

Need a dedicated coordinate-space breakdown? Open our OpenGL vs DirectX Converter, study technical bit-depth specs on Normal & PBR Specs, or explore 4K/16-bit workflows on Pricing.

Frequently Asked Questions

What is the difference between Scharr and Sobel filters for normal maps?

Classic 3x3 Sobel weights [1,2,1] introduce slight angular bias along 45-degree diagonals. The 3x3 Scharr kernel [3,10,3] is mathematically optimized for rotational isotropy, producing noticeably cleaner bevels on circular rivets, hex panels, and organic stone.

Should I choose OpenGL or DirectX normal space for my engine?

Select OpenGL (+Y Up) for Blender, Unity, Godot, Three.js, and Cinema 4D. Select DirectX (-Y Down) for Unreal Engine, 3ds Max, CryEngine, and Substance Painter DirectX projects.

Why should I add 1–2 px of Pre-Smooth Blur before generating normals from a photo?

Derivative operators amplify single-pixel camera sensor grain and JPEG 8x8 block edges into harsh speckled noise. Adding 1 px of separable pre-smoothing eliminates high-frequency grit while preserving crisp structural slopes.

Does Seamless Edge Wrap preserve tiling on seamless textures?

Yes. Keeping Seamless Edge Wrap enabled causes the Sobel/Scharr convolution kernel to wrap around opposite image edges via modulo arithmetic so your normal map never develops border seams.

How do I test bump direction inside the 3D viewport?

Drag directly across the shaded 3D sphere or plane on the right to move the point light source around the surface and confirm ridges highlight on the side facing the light.

Want Real 3D Meshes & Gaussian Splats From Your Reference Photos?

Move beyond flat surface bump maps—capture complete 3D objects and environments from photos.

Turn Photos into Full 3D Gaussian Splats & Meshes on TripoSplat.com

Explore 3D Shader Documentation