Loading...
Loading...
Build a paper sheet in Three.js that reads as paper up close — washi, cotton rag or kraft with baked fibre and tooth relief, laid and chain lines, a torn deckle edge with frayed fibres, four-layer thickness, a rolled corner and crease, ink that wicks along the fibres, toasted aged edges, contact shadows and back-lit translucency. Use for a hung sheet, scroll, page, label, shoji pane or card that must survive a macro close-up, or when paper looks like a flat white plane, has ruler-straight edges, no thickness, or does not glow when lit from behind. Use 3d-wood-material, 3d-cloth-material or 3d-metal-material for those materials, and paper-cinder-transition for burning paper.
npx skill4agent add mengto/skills 3d-paper-materialpaper-cinder-transitiondemo.htmlonBeforeCompileNOISEtearLinekibori.htmlwashiMatfootTearR height, G formation, B fibre, A fleck0.5 + fibre*0.34 + (tooth-0.5)*0.1 - fleck*0.2 - crease*0.55samples: 0(gnoise(q*2.1)-0.5)*1.5RGBAgetImageDataDataTexture2.6*curlthick/32thick/3thickemissive += L * trtr = 0.74 + (0.5-form)*0.85 + (0.5-lowfbm)*0.45 - fibre*0.22 - fleck*0.45L| washi | cotton rag | kraft | |
|---|---|---|---|
| tint | | | |
| fibre lattice A / B (per unit) | 1.9x54 / 44x2.3 | 15x17 / 16x14 | 7x26 / 26x7 |
| fibre relief, bump height (unit) | 0.55, 0.0017 | 0.32, 0.0024 | 0.8, 0.0034 |
| tooth freq, amp | 230, 0.09 | 430, 0.17 | 300, 0.20 |
| laid lines /unit, amp, chain | 110, 0.28, 0 | 150, 0.55, 0.5 | none |
| tear amplitude (T,R,B,L), fray scale | 64,72,60,76; x12 | 3,58,3,54; x6 | 96,3,4,3; x8 |
| thickness (unit), transmission | 0.0045, 1.0 | 0.0085, 0.42 | 0.011, 0.16 |
| roughness, sheen | 0.93, 0.4 | 0.9, 0.25 | 0.96, 0.10 |
tearLinesmoothstep(0.62,0.85, halo + fibre*0.4 + (0.5-form)*0.5)smoothstep(0.03,0.16, halo)smoothstep(0.5,0.12,length((fract(q*cell)-0.5)*vec2(1,1.9)))alphaTestalphaToCoverage: truealphaTestalphaMapalphaTest: 0.5perturbNormalArbbumpmap_pars_fragmentgetImageDataDataTextureflipYctx.filtershadowOffsetX = -20000samples: 0prefers-reduced-motiondocument.hiddendtResizeObserver1 - exp(-dt*k)PPU_B| item | score | why |
|---|---|---|
| fibre structure | 8 | warped, rotating strands, two scales; no fibre cross-overs in depth |
| deckle edge | 8 | four independent tears, fray fibres, feather strip; fibres do not shadow |
| thickness | 6 | three stepped layers; steps show at extreme rake, no cross-section fibres |
| translucency | 8 | formation-driven, stems, amber sun patch; no scattering blur by thickness |
| curl and crease | 6 | roll is convincing, crease reads faint at overview |
| ink | 6 | fibre wicking narrow; no pooling at stroke ends |
| aged edges and shadow | 6 | toast and foxing good; shadow on the wall is a hard shape |
| texel density | 8 | 22.8 px/mm in macro, 7.3 px/mm overview |