← Commit history

layer shadows FOR REAL: spot becomes the dominant light (env->0.35 fill, hemi dimmed) - shadows only darken direct light on PBR, so env-dominant lighting was washing layer shadows out (ground showed them because StandardMaterial is spot-lit)

John Lauer ·9ed4adeb7e ·3mo ago ·parent cbc607e
3 files changed +15−6
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.74",+  "version": "0.1.75",   "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",   "tags": [     "hardware"
page.json+10−3
@@ -4,9 +4,16 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "brief": "Buck-boost 1S-4S battery charger board (TI BQ25792) with 14 Adom machine pins, by Adonis",-  "version": "0.1.74",+  "version": "0.1.75",   "tags": [-    "hardware"+    "adom",+    "adom-modular",+    "component",+    "charger",+    "battery",+    "bq25792",+    "power",+    "usb-c"   ],   "license": "proprietary",   "component": {@@ -49,7 +56,7 @@     "email": "[email protected]"   },   "visibility": "public",-  "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",+  "description": "BQ25792 Charger - a buck-boost 1S-4S battery charger board (Texas Instruments BQ25792) designed by Adonis in Fusion 360, with 14 Adom machine pins for the modular stack. Interactive colored 3D model, schematic and layout views.",   "dependencies": {},   "files": [     "README.md",
readme.html+4−2
@@ -313,7 +313,7 @@ exported bodies + design rules.</p>     copperMat.albedoColor=new (B().Color3)(0.95,0.60,0.42);  // copper     copperMat.metallic=1.0; copperMat.roughness=0.28;         // glossy metal sheen from the scene env     copperMat.backFaceCulling=false;-    copperMat.environmentIntensity=1.2;+    copperMat.environmentIntensity=0.5;     byKey.cu1.meshes.concat(byKey.cu16.meshes).forEach(m=>{ if(m.material) m.material=copperMat; });      // FR4 sublayers = real Board body clones (drill holes)@@ -379,15 +379,17 @@ exported bodies + design rules.</p>     // tuned for mm-scale scenes and repositioned by frameModel - which we bypass, so we     // reposition/rescale the spot for our meter-scale board ourselves.     if(sc.lights.length===0){ new (B().HemisphericLight)("rm_hemi",new (B().Vector3)(0.2,0.2,1),sc).intensity=0.9; }+    try{ sc.environmentIntensity=0.35; }catch(e){}   // IBL is unshadowable - keep it a fill, not the key     const CENTER=new (B().Vector3)(0.0252,0.0132,0);     SHADOW_LIGHT=sc.getLightByName("spotLight");     SHADOW_GEN=(viewer.getShadowGenerator && viewer.getShadowGenerator()) ||                (SHADOW_LIGHT && SHADOW_LIGHT.getShadowGenerator && SHADOW_LIGHT.getShadowGenerator());+    try{ const h=sc.getLightByName("light"); if(h) h.intensity=0.15; const bl=sc.getLightByName("bottomLight"); if(bl) bl.intensity=0; }catch(e){}     if(SHADOW_LIGHT && SHADOW_GEN){       // frameModel's job, done by hand: spot at the mm-rig's (600,-300,1500) ratio, scaled to meters       SHADOW_LIGHT.position=new (B().Vector3)(CENTER.x+0.6, CENTER.y-0.3, 1.5);       SHADOW_LIGHT.direction=CENTER.subtract(SHADOW_LIGHT.position).normalize();-      SHADOW_LIGHT.intensity=2.2;                    // 2e6 was for mm distances; ~2 at meter scale+      SHADOW_LIGHT.intensity=6.0;                    // DOMINANT direct light - shadows only darken direct light on PBR, so it must dominate       SHADOW_LIGHT.shadowMinZ=0.5; SHADOW_LIGHT.shadowMaxZ=3.0;       if("angle" in SHADOW_LIGHT) SHADOW_LIGHT.angle=0.45;       try{