Skip to content

Add ★ Falchion Knife | Doppler Sapphire (Factory New) demo - #81

Open
kokorolx wants to merge 7 commits into
img2threejs:mainfrom
kokorolx:add-falchion-sapphire-demo
Open

kokorolx wants to merge 7 commits into
img2threejs:mainfrom
kokorolx:add-falchion-sapphire-demo

Conversation

@kokorolx

@kokorolx kokorolx commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Hand-written procedural reconstruction of a Factory New ★ Falchion Knife | Doppler Sapphire (CS:GO/CS2) using img2threejs v2.0.0 + the cs2 domain plugin (metadata-assisted route, paint_index=416 = Sapphire phase).

This is the 7th iteration. Earlier versions (v1–v4) were placeholder geometry; v5–v7 add iridescent PBR materials, AO/normal/roughness maps, a baked Doppler texture, and showcase-tuned lighting/camera.

What's in the demo

  • Curved clip-point blade (ExtrudeGeometry with QuadraticBezier for the recurve)
  • Satin edge bevel following the curved profile
  • Doppler Sapphire material: MeshPhysicalMaterial with iridescence=0.2, IOR=1.3, clearcoat=0.3, color 0x4a78d4 (sapphire mid-blue), metalness=0.4, roughness=0.35
  • Baked Doppler Sapphire texture (doppler-blade.png, 1024×512) — clean phase-1 palette (avg RGB (30, 93, 194), blue-dominant)
  • PBR maps: doppler-normal.png (luminance-derived micro-relief), doppler-ao.png (luminance-inverted AO), doppler-roughness.png
  • UV2 channel added to ExtrudeGeometry so aoMap samples correctly (was a v5 dark-blade bug)
  • Gunmetal bolster + polished pivot screw (chrome)
  • Handle scales (top + bottom) with shared Doppler pattern
  • Solid pommel (rounded ellipsoid + block)
  • Curved blackened pocket clip (TubeGeometry along CatmullRomCurve3)
  • Mounting hardware: 3 handle screws, 2 clip screws
  • Look-dev rig: hemi 1.5 + key 1.8 (warm) + fill 0.8 (cool) + ambient 0.6, env intensity 0.3

Visual verification

Vision-model audit of v7 render (/tmp/falchion-sapphire-v7.png):

"Deep, rich sapphire blue with flowing wave patterns of lighter blue and white highlights layered over it. The blade displays the classic Doppler Sapphire aesthetic where darker, intense blue tones sweep across the surface, accented by bright white wave-like crests that give it a glossy, almost liquid appearance."

Quantitative:

  • Blue-pixel ratio: 0.0026% (v5) → 4.05% (v7) — 1500x improvement
  • Center-region avg RGB: (13, 16, 18) (v5, near-black) → (66, 69, 91) (v7, sapphire-dominant)
  • Vision-scene tree: 1 Group with 14 named meshes (blade, edge-bevel, bolster, pivot-screw, handle-top, handle-bottom, pommel-block, pommel-round, pocket-clip, 2× clip-screws, 3× handle-screws)

Files

  • src/demos/falchion-sapphire/createFalchionSapphireModel.ts (v7, ~330 lines hand-written)
  • src/demos/registry.ts (entry with installLights rig, cameraPosition: [2.5, 1.5, 9.0], cameraFov: 45)
  • public/img2threejs/assets/textures/doppler-blade.png (1024×512 phase-1 sapphire)
  • public/img2threejs/assets/textures/doppler-normal.png
  • public/img2threejs/assets/textures/doppler-roughness.png
  • public/img2threejs/assets/textures/doppler-ao.png
  • references/falchion-sapphire.png (2560×1440 source)

Build

npm run build  # tsc + vite, 0 errors

Commits

  • v1 placeholder → v2 pixel-measured factory → v3 curved clip-point + Doppler → v4 tightened assembly + curved clip + PBR maps → v5 phase-1 sapphire + iridescence + AO → v6 fix UV2 + bright key/fill + clean palette → v7 saturate material color
  • Branch add-falchion-sapphire-demo (7 commits, all pushed)
  • Standalone test harness at /tmp/falchion-test/ (port 4174) for clean-canvas iteration

Generated by @kokorolx using img2threejs v2.0.0 + plugin-cs2.

Hand-written procedural reconstruction from a single CS:GO inventory screenshot:
- Clip-point recurve blade with marbled blue/violet Doppler Sapphire (Phase 1) finish
- Translucent purple resin handle scales (mirrored top + bottom)
- Gunmetal pivot housing + 1 pivot screw + 4 mounting screws
- Solid rounded pommel (no lanyard ring)
- Blackened-steel rear pocket clip with bent tip
- Bright satin cutting-edge bevel
- 3-point studio lighting (key/fill/rim) + hemisphere env for iridescent thin-film response
- Idle float-spin animation (root.userData.tick)
- sculptRuntime with 10 named parts + 6 sockets, explodable + clickable

Generated via img2threejs v2.0.0 with cs2 domain plugin (metadata-assisted, paint_index=415).
Refactored spec, full review history, all 8 build passes complete.
@kokorolx
kokorolx requested a review from hoainho as a code owner October 5, 2026 16:46
…gned geometry

Replaces the v1 hand-written placeholder with a measured-pixel layout:
- pommel at x=-5.23 (length 2.25, rounded sphere end)
- handle at x=-2.76 (length 2.70, Doppler Sapphire resin blue)
- pivot/bolster at x=-0.01 (length 2.20, gunmetal)
- blade at x=+3.62 (length 5.05, Doppler Sapphire marble blue, tip cone at x=+6.14)
- polished pivot screw, blackened pocket clip + 2 screws, 3 handle screws
- camera re-framed to (8, 3.5, 9) looking at origin
- look-dev lights: hemi + key (warm) + fill (cool) + rim
- MeshPhysicalMaterial with iridescence on Doppler regions, metalness=1 on metals

PBR: Doppler blade metalness=1, roughness=0.10, iridescence=0.7, clearcoat=0.4
     Handle metalness=0.4, roughness=0.20, iridescence=0.5
     Bolster metalness=1, roughness=0.45
     Pivot screw metalness=1, roughness=0.05 (polished steel)
     Pocket clip metalness=0.7, roughness=0.50 (blackened)
Replace box-blade placeholder with curved ExtrudeGeometry falchion profile:
- Blade: ExtrudeGeometry from a 2D Shape with curved edge, clip-point tip, ricasso flat
- Handle: ExtrudeGeometry with finger-groove bottom (concave choil)
- Baked Doppler texture from reference-delit.png (1024x512 cropped from blade region)
- MeshPhysicalMaterial with iridescence=0.7 + clearcoat=0.5 for marble
- Polished pivot screw, gunmetal bolster, blackened clip, 3 handle screws
- Lighting: hemi + warm key + cool fill + rim + sapphire accent point light
- Tighten assembly: handle scales overlap bolster; blade root slots into bolster
- Curved cutting-edge bevel follows blade profile via QuadraticBezier
- Curved pocket clip via TubeGeometry along CatmullRomCurve3
- Added normalMap (doppler-normal) + roughnessMap (doppler-roughness)
  for surface micro-detail on Doppler areas
- Updated camera to 3/4 preset (4.0, 3.0, 14.0)
- Generated doppler-blade-phase1.png: boost blue in phase 1 zones (43% of
  pixels), suppress red; result is a deeper, more saturated sapphire
  appearance vs the generic mid-blue of v4
- Generated doppler-iri.png: iridescence mask from (B-R)+(B-G) gradient;
  iridescenceMap wired to MeshPhysicalMaterial
- Generated doppler-ao.png: ao map from inverted luminance; aoMap +
  aoMapIntensity=1.0
- iridescenceIOR bumped to 1.45 (sapphire IOR) for the gem-like sheen
- iridescence 0.7 -> 0.85, clearcoat 0.5 -> 0.6
- Move camera to [2.5, 1.5, 9.0] FOV 45 to actually fit the 13-unit knife
- Replace default studio rig with bright key+fill+ambient pointed at origin
  (hemi 1.5, key 1.8, fill 0.8, ambient 0.6) — actual showcase default rig was
  too dim for the iridescent blade
- Add UV2 attribute to ExtrudeGeometry so aoMap (which uses UV2 by default)
  actually samples the texture instead of returning 0
- Reduce metalness 1.0 -> 0.6, add clearcoat 0.5 to balance warm IBL reflections
  with sapphire-blue texture
- Regenerated doppler-blade.png with clean phase-1 sapphire palette: avg RGB
  (30,93,194), dominant blue everywhere with bright highlights at high
  luminance pixels
- Regenerated doppler-normal.png from luminance pattern
- Material base color 0x1b2d8a (deep navy) -> 0x4a78d4 (sapphire mid-blue)
  multiplies with the texture's luminance pattern, producing a saturated
  blue surface where the diffuse dominates
- environmentIntensity 0.6 -> 0.3 to reduce white-washing from IBL specular
- Vision verification: 'deep, rich sapphire blue with flowing wave patterns'
  Blue-pixel ratio 2.17% -> 4.05% (87% improvement)
@kokorolx

kokorolx commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

v7 visual confirmation: sapphire-saturated Doppler blade now rendering correctly in the showcase viewer.

Quantitative:

  • Blue-pixel ratio: 0.0026% (v5) → 4.05% (v7) — 1500x improvement
  • Center-region avg RGB: (13,16,18) near-black → (66,69,91) sapphire-dominant
  • Vision verification: 'deep, rich sapphire blue with flowing wave patterns of lighter blue and white highlights'

Key fixes between v5 and v7:

  1. Added UV2 attribute to ExtrudeGeometry so aoMap samples correctly (was returning 0)
  2. Reduced metalness 1.0 → 0.4 to balance IBL specular with diffuse blue
  3. Material base color shifted from deep navy 0x1b2d8a to sapphire mid-blue 0x4a78d4
  4. Camera moved from [4,3,14] FOV 32 to [2.5,1.5,9] FOV 45 so knife fills ~50% of frame
  5. Replaced default studio rig with bright key+fill+ambient aimed at origin
  6. environmentIntensity 0.6 → 0.3 to reduce white-washing from IBL
  7. Regenerated doppler-blade.png with clean phase-1 sapphire palette (avg RGB (30,93,194))

Latest commit: 303ef81 (v7)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant