3d-metal-material
Skill này làm gì
Skill này hướng dẫn agent làm bề mặt kim loại trong Three.js trông như kim loại thật thay vì nhựa xám. Nó dành cho lập trình viên xây dựng sản phẩm, công cụ hoặc cảnh có kim loại đánh bóng hay đã cũ.
Khi nào nên dùng
- ✓Khi kim loại trong cảnh 3D trông như nhựa xám hoặc một vệt mờ xỉn.
- ✓Khi bạn cần thép, đồng thau, vàng hoặc đồng đỏ trông đúng trong cảnh 3D trên web.
- ✓Khi một lưỡi, tay cầm hoặc công cụ bằng kim loại cần cạnh mòn hoặc lớp hoàn thiện cũ.
Liên kết skill
https://github.com/MengTo/Skills/blob/main/agent-skills/3d/3d-metal-material/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm cho cái đục thép trong cảnh bàn làm việc 3D của tôi trông như kim loại đánh bóng, với cạnh bị mòn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đặt kim loại như một chất dẫn điện thật không có màu sơn, rồi chiếu sáng bằng một studio tối có các vệt phản chiếu sáng và độ nhám thay đổi. Kết quả được chỉnh để phản chiếu giúp bề mặt được nhận ra là kim loại.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
3D Metal Material
Mechanism: a conductor has no colour of its own, so it looks like metal only when a dark environment holds a few very bright, hard-edged things to reflect, and the surface then bends those reflections with roughness that varies across it. Remove the bright cards and the same steel goes flat grey; remove the roughness variation and it goes CG-clean.
Boundary. This skill is the material and the environment it reads. Reach for 3d-specular-rim-glow when the job is one bright edge catch and halo on a product, 3d-high-resolution-textures when you ship authored PBR texture sets and need texel density and mip budgets, 3d-ultra-realistic-water for water. Siblings 3d-wood-material, 3d-cloth-material and 3d-paper-material cover the non-metal surfaces that usually sit next to metal; use them for the bench, handle or wrapping. The demo has a bench and a chisel handle only as staging.
Verified stack of the demo: Three.js r169 (three@0.169.0), WebGL 2, GLSL patched into MeshStandardMaterial/MeshPhysicalMaterial with onBeforeCompile, PMREMGenerator, a HalfFloat MSAA target and a hand-written ACES pass. No post-processing library.
Build order
Do these in order; each one fixes a named failure the previous step cannot.
Conductor, not painted.
metalness: 1,color= the metal's F0 (linear reflectance at normal incidence), nothing else incolor. A bright base colour turns lit faces into white paint, and metalness < 1 lets a diffuse term leak in as plastic.A dark room with bright cards. Build the environment as a real
SceneofMeshBasicMaterialplanes withtoneMapped:falseand HDR radiance above 1, on a near-black background, thenPMREMGenerator.fromScene. A bright uniform sky makes every reflection the same mean tone, and raisingenvMapIntensityonly lifts that mean. A canvas equirect capped at display white cannot make a window brighter than the paper. Cards used in the demo:card size, position linear radiance window, 4 x 3 panes 1.08 x 1.20 panes on 1.30 x 1.47 pitch, at (-5, 4.2, 4.8) 3.8, 3.55, 3.05 cool side card 3.0 x 5.4 at (6, 1.6, 2) 0.52, 0.68, 0.90 warm back card 2.0 x 4.6 at (2.5, 2.2, -5.5) 1.50, 1.22, 0.88 top card 7.5 x 2.2 at (0, 6, 0) 0.52, 0.55, 0.60 floor bounce 9 x 9 at (0, -4, 0) 0.18, 0.12, 0.07 background 0.045, 0.050, 0.060 Aim a card at the object. The eye sees the reflection of whatever lies along the mirror direction. The hero plate is turned to the bisector of eye and window (yaw -0.38, pitch -0.36 rad). Left face-on to a dark region, the same polished steel reads black.
Vary the roughness. Roughness is the finish, not the constant. Layer low-frequency smears (fingerprints), two angles of micro-scratches, and a fine grain into
roughnessFactor, and fade each below its pixel footprint withfw = max(length(dFdx(p)), length(dFdy(p))). Uniform roughness is what makes metal look rendered.Give it a bevel. Use a chamfered box (round the arrises 1 to 3 mm at object scale, 3 to 5 segments). A sharp 90 degree edge has no normals between faces, so it catches no highlight. Above 6 to 19 percent of the smallest side it reads as soap.
Ground it in darkness. Contact shadow blobs and a shadow-casting key light on a dark bench. Metal on a bright ground reflects the ground and loses contrast.
Tone map last. Render into a HalfFloat target, add the bloom, then ACES and the sRGB encode by hand. Keep
renderer.toneMapping = NoToneMappingwhile rendering to the target.
Constants
F0 goes in color as linear values (Color.setRGB(r,g,b, LinearSRGBColorSpace)), so you do not lose the tint to an sRGB round trip.
| metal | F0 linear | aged surface tint (uPatCol) |
|---|---|---|
| steel | 0.56, 0.57, 0.58 | rust 0.16, 0.055, 0.02 |
| brass | 0.89, 0.72, 0.36 | dark tarnish 0.09, 0.055, 0.02 |
| gold | 1.00, 0.71, 0.29 | dirty wear 0.13, 0.085, 0.03 |
| copper | 0.95, 0.64, 0.54 | verdigris 0.10, 0.34, 0.27 |
| finish | base roughness | envMapIntensity | extra |
|---|---|---|---|
| polished | 0.09 (0.045 to 0.6 after variation) | 1.0 | smear +0.11, scratch +0.24, grain +-0.025 |
| brushed | 0.26 (0.10 to 0.75) | 0.72 | MeshPhysicalMaterial.anisotropy 0.85, streaks 520 and 1500 cycles per unit along the grain |
| aged | 0.36 (0.10 to 0.95) | 0.85 | patina lowers metalness to 0.28, raises ro |
Câu hỏi thường gặp
Tại sao kim loại cần một căn phòng tối?
Skill giải thích rằng kim loại hiện phản chiếu, nên cần vài hình sáng, sắc nét để phản chiếu.
Skill có bao gồm gỗ hoặc giấy không?
Không. Những loại đó có skill riêng. Skill này bao gồm kim loại và ánh sáng mà nó phản chiếu.
Skill bao gồm những kim loại nào?
Thép, đồng thau, vàng, đồng đỏ và sắt, với các lớp hoàn thiện đánh bóng, chải xước và đã cũ.
Chi tiết
Mô tả gốc của tác giả
Build hyperrealistic PBR metal in Three.js: steel, brass, gold, copper and iron as true conductors (metalness 1, measured F0 tint, no albedo) with roughness-varied finishes (polished, brushed anisotropic, aged with patina and worn edges) lit by a dark HDR studio of real bright window cards prefiltered with PMREM. Use when metal looks like grey plastic, a dull blur, or a black hole; when blades, tools, rings, ingots, hardware or product metal need reflections with edges and structure; or when a finish needs scratches, streaks, fingerprints and bevels that catch light.
repo: MengTo/Skills
Độ phổ biến
- Sao GitHub
- 7.2k
- Vị trí xếp hạng
- #13318
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
3d-cloth-material
7.2kGiúp agent của bạn tạo vải dệt 3D trông thật trong Three.js, với sợi dệt, ánh bóng nhẹ, nếp gấp tự nhiên, viền gấu và đường may.
3d-falling-leaves
7.2kGiúp agent của bạn thêm lá rơi chân thực vào cảnh 3D, với lá xoay tròn, trôi theo gió và được tái sử dụng khi máy quay di chuyển.
3d-four-seasons
7.2kGiúp agent của bạn thêm diện mạo xuân, hạ, thu, đông vào cảnh 3D, thay đổi cây cối, ánh sáng, bầu trời và tuyết mà không cần dựng lại cảnh.
3d-high-poly-models
7.2kGiúp agent của bạn dựng mô hình 3D chi tiết với hình dạng mượt và cạnh trông thật, rồi tạo các phiên bản nhẹ hơn chạy tốt trên web.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.