Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)7.2k · #13328

3d-wood-material

Skill này làm gì

Skill này hướng dẫn agent tạo bề mặt gỗ trong cảnh 3D bằng code. Nó dành cho lập trình viên làm ván, ghế dài, tấm chạm khắc hoặc cán dụng cụ phải trông như gỗ thật khi nhìn gần.

Khi nào nên dùng

  • ✓Khi một ván, ghế dài hoặc cán trong 3D trông như nhựa hoặc gỗ sơn.
  • ✓Khi bạn cần thớ gỗ đi theo hình dạng của vật thể.
  • ✓Khi bạn muốn lớp dầu, sáp hoặc sơn bóng trên gỗ trong cảnh 3D.

Liên kết skill

https://github.com/MengTo/Skills/blob/main/agent-skills/3d/3d-wood-material/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/MengTo/Skills/blob/main/agent-skills/3d/3d-wood-material/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm cho ghế dài trong xưởng 3D của tôi trông như gỗ sồi đã thấm dầu, với vòng năm hiện rõ.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tạo một vật liệu gỗ bằng code, điều khiển đồng thời họa tiết vòng năm, lỗ chân lông, tia gỗ và vết dụng cụ. Mỗi chi tiết mờ dần theo khoảng cách để gỗ vẫn mịn khi nhìn từ xa.

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 Wood Material

Mechanism: one small periodic noise field, mip-filtered, is read at several different stretches and scales inside the fragment shader, so ring position, latewood, pores, fibres, rays and tool marks all come from the same wandering grain and feed colour, roughness and relief together, each fading out by its own screen footprint.

Boundary. This skill is the wood surface itself. For whole-scene light, rays and scoring wood renders, use 3d-wood-lighting-scorecard. For image-based PBR sets (downloaded maps, texel budgets, KTX2 delivery) use 3d-high-resolution-textures; reach for it when you need a photographed or scanned species. For silhouette, bevel and LOD geometry use 3d-high-poly-models; this skill only needs a rounded arris (below). Cloth, metal and paper have their own siblings.

Run demo.html first (Kibori bench, four species, four finishes, macro views, and a switch that swaps in the failure). PROMPT.md recreates it.

Recipe

  1. Patch, do not replace. Build MeshPhysicalMaterial({color:0xffffff, roughness:max(0.43,r), ior:1.43, specularIntensity:0.72}) and edit it in onBeforeCompile: #include <map_fragment> multiplies diffuseColor by the wood colour, #include <roughnessmap_fragment> sets roughnessFactor=clamp(roughness*W.rough,0.35,1), #include <normal_fragment_maps> replaces the normal with a screen-space bump of the wood height W.h. Lighting, shadows, IBL and tone-mapping stay stock. The vertex stage only passes object-space position vOP and the object normal.
  2. Bake one field. A 1024² RepeatWrapping, LinearMipmapLinear, NoColorSpace render target of periodic gradient noise (period 64, three octaves: .r base, .g fbm 0.60/0.27/0.13, .b a shifted copy). Reading it as texture(p/64) costs one tap. All timber shares it; per-board difference is a seed offset, not a texture.
  3. Grain axis. uAxis 0/1/2 picks the log axis; along is that coordinate and cross2 the other two. endgrain = pow(|n·axis|, 6) flips pores from streaks to open cells and dulls the colour on cut faces.
  4. Rings. Drift the pith with two slow fields, radius=|(cross2+(-drift, offAxis+0.48))*(1,0.56)|, growth=radius*ringFreq plus fbm wobble (±1.25 rings), ring=floor(growth), phase=fract. Each ring draws its own width from annual noise: lateWidth=0.065+annual*0.21. Latewood is a steep smoothstep(0.94-w, 0.97-w, phase) cut off by 1-smoothstep(0.965,1,phase). Small offAxis gives cathedral arcs; large offAxis gives straight quarter-sawn lines.
  5. Detail layers, each faded by its own footprint (fwidth of growth, length(dFdx,dFdy) of the pore, fibre and ray coordinates):
layer coordinates strength
pores (vessels) (fiberX*96, along*7.5), cells at end grain cross2*88, smoothstep(0.59,0.75) tone +0.25, rough +0.19, height -0.42
fibres (fiberX*230, along*2.4) tone -0.16, height +0.09, x0.25 at end grain
rays (across*13, along*115), smoothstep(0.64,0.78) tone +0.26 towards pale, rough -0.075
checks curl.b smoothstep(0.70,0.82) x uChecks tone toward dark*0.68, height -0.20
knots hash cell 1.85 x 4.6, 29% occupied, influence dies at the cell edge tone +0.44 core, deflects fibres
tool marks (along*17, across*0.4) height +0.045 x uTool
  1. Tone: tone=0.075+late*0.40+early*0.070+pores*0.25-fibres*0.16+(broad.g-0.5)*0.23+knotCore*0.44, colour mix(pale,dark,clamp(tone,0.035,0.83)), then *(0.93+annual*0.095+…). Roughness 0.91+late*0.13+pores*0.19+(broad.b-0.5)*0.20-rays*0.075+endgrain*0.14.
  2. Bump, not normal map. bumpNormal uses the derivative-based Mikkelsen bump and clamps the gradient to 0.38*|det|, so a steep step never flips the normal. uBump=bump*0.020.
  3. Finishes are parameters, not textures. Raw: clearcoat 0. Oil: pow(rgb,1.16) and rough*0.88, clearcoat 0.10 / 0.55. Wax: clearcoat 0.22 / 0.38. Urushi: luminance curve pow(l,0.5), end grain darkened *(1-eg*0.55), warm tint, worn arrises rubbed back to the pale colour, clearcoat 0.42 / 0.40.
  4. Round the arris. chamferBox on every board, radius min(w,h,d)*0.055 (at most 0.24 of any side), 3 to 5 segments, with normals set from the rounded corner. A sharp box edge has no highlight and reads as a cut-out.
  5. Give every board its own seed, and keep it stable when species or finish changes (save and restore woodMaterialSerial around the build, see
Câu hỏi thường gặp

Có cần ảnh chụp gỗ không?

Không. Skill tạo gỗ từ họa tiết thủ tục mà không dùng texture ảnh.

Có những lớp hoàn thiện nào?

Có dầu, sáp và sơn bóng.

Có thiết lập ánh sáng phòng không?

Không. Ánh sáng phòng do một skill chiếu sáng gỗ riêng đảm nhận.

Chi tiết

Mô tả gốc của tác giả

Build convincing timber for Three.js as one procedural MeshPhysicalMaterial with growth rings, cathedral figure, pores, medullary rays, checks, tool marks, end grain, and oil, wax, or lacquer finishes, so the grain follows the form and survives macro close-ups without image textures. Use for wood boards, benches, carved panels, tool handles, joinery, floors, and any request to make 3D wood look real, detailed, or less like a tiled photo or plastic.

repo: MengTo/Skills

Độ phổ biến

Sao GitHub
7.2k
Vị trí xếp hạng
#13328
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự