---
name: pbr-map-calibration
description: "Apply a scanned PBR texture set with correct map semantics instead of using one image for every channel. Use for PBR, normal, roughness, текстуры."
---

# Настоящие PBR-карты

Apply a scanned PBR texture set with correct map semantics instead of using one image for every channel.

## Implementation decisions

1. Use sRGB for diffuse/base-color maps and NoColorSpace for normal, roughness, metalness and AO.
2. Choose the OpenGL normal map for Three.js; do not silently substitute a DirectX normal without flipping its Y channel.
3. Keep roughness and metalness maps independent. A grayscale roughness preview is not a color texture.
4. Preserve texture scale and repeat when moving from a sample sphere to the project geometry. Add sufficient UVs and subdivisions before displacement.

## Working source

Read [components/asset-viewer.tsx](../webcraft-shared/source/components/asset-viewer.tsx) when implementing this capability. The example belongs to the WEBCRAFT React/Three.js playground except the Python commerce starter, which runs without third-party dependencies. Use [shared catalog](../webcraft-shared/source/lib/catalog.ts) only to resolve related examples. Adapt the source to the target framework and preserve existing project conventions.

The original workshop uses Three.js 0.180 and procedural builders. The external asset viewer separately loads licensed glTF, scanned PBR maps and HDRIs. Preserve the provenance of each corpus. See [objects.ts](../webcraft-shared/source/lib/objects.ts) for material and geometry ownership and [scene.tsx](../webcraft-shared/source/components/scene.tsx) for renderer lifecycle.

## Verify observable behavior

- Roughness affects highlights rather than base color.
- Metalness and dielectric regions respond differently under the same HDRI.
- Seams and texture scale are checked on the destination mesh.

## Scope

Use only the parts relevant to the requested task. This skill does not grant permission to publish, spend money, change account access or expose secrets. The original brief and environment rules remain authoritative.

Version 2.0.0 · Original WEBCRAFT content · MIT
