From 1a65bcbd5a1e986a09aa1244a0fbba092239d4fd Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 10 Feb 2026 16:38:23 +0000 Subject: [PATCH] Upgrade to premium studio-quality 3D rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Material Upgrades: - Glass: MeshPhysicalMaterial with transmission=1, thickness=2, clearcoat - Color: Subtle blue tint (#eef6fc) - Settings: roughness=0, envMapIntensity=1 for realistic transparency - Steel: MeshStandardMaterial with metalness=0.9, roughness=0.2 - Satin finish, not matte - Color: Deep charcoal (#1a1a1a) - Walls: Clean off-white plaster (#fafafa, roughness=1) Geometry Refinements: - Slim steel profiles: 3cm (was 8cm) for modern industrial look - Frame depth: 5cm for proper dimensionality - Handles: Refined proportions, higher poly sphere (32 segments) - Glass thickness: 1.5cm (realistic heavy glass) - Dividers: Positioned slightly forward (z=0.01) flush with glass Architecture Improvements: - Proper doorway with reveal (15cm thick wall) - Fitted pillars (left/right) and lintel (top) - Door sits INSIDE the reveal for depth and shadows - Clean white floor as shadow catcher Premium Lighting: - Environment preset="studio" for realistic reflections on steel - ContactShadows for "anti-gravity" floating effect - Key light (5,10,8) with 4K shadow maps - Rim light for separation - Fill light for softness - Tone mapping exposure: 1.3 Camera Refinements: - FOV: 45° (was 50°) for less distortion - Position: (0, 1.6, 4.5) - better viewing angle - Limited azimuth rotation (±30°) for controlled perspective - Min polar: PI/3.5 (was PI/4) for better elevation Result: Cold metallic steel + heavy transparent glass + studio lighting = Premium "Anti-Gravity" photorealistic look Co-Authored-By: Claude Sonnet 4.5 --- components/configurator/door-3d.tsx | 74 ++++++++-------- components/configurator/scene.tsx | 133 +++++++++++++++++----------- 2 files changed, 119 insertions(+), 88 deletions(-) diff --git a/components/configurator/door-3d.tsx b/components/configurator/door-3d.tsx index 3f1f4d1..6bcd8b3 100644 --- a/components/configurator/door-3d.tsx +++ b/components/configurator/door-3d.tsx @@ -10,16 +10,17 @@ export function Door3D() { // Frame color based on finish const frameColor = { - zwart: "#1f1f1f", + zwart: "#1a1a1a", brons: "#8B6F47", grijs: "#525252", }[finish]; - // Door dimensions + // Door dimensions (more realistic proportions) const doorWidth = doorType === "paneel" ? 1.5 : 1.2; const doorHeight = 2.4; - const frameThickness = 0.08; - const glassThickness = 0.02; + const frameThickness = 0.03; // Slim steel profile (3cm) + const frameDepth = 0.05; // Depth of frame + const glassThickness = 0.015; // Realistic glass thickness // Calculate grid divider positions const getDividerPositions = () => { @@ -37,79 +38,80 @@ export function Door3D() { {/* Outer Frame - Top */} - - + + {/* Outer Frame - Bottom */} - - + + {/* Outer Frame - Left */} - - + + {/* Outer Frame - Right */} - - + + - {/* Glass Panel */} + {/* Glass Panel - Premium Physical Material */} - {/* Horizontal Dividers (Grid) */} + {/* Horizontal Dividers (Grid) - Slim profiles */} {dividerPositions.map((yPos, index) => ( - - - + + + ))} {/* Vertical Divider for Paneel */} {doorType === "paneel" && ( - - - + + + )} {/* Handle - U-Greep for Taats */} {doorType === "taats" && handle === "u-greep" && ( - - - + + + )} {/* Handle - Klink for Scharnier */} {doorType === "scharnier" && handle === "klink" && ( - + - - + + - - + + diff --git a/components/configurator/scene.tsx b/components/configurator/scene.tsx index 792014c..2459adc 100644 --- a/components/configurator/scene.tsx +++ b/components/configurator/scene.tsx @@ -1,53 +1,75 @@ "use client"; import { Canvas } from "@react-three/fiber"; -import { OrbitControls, PerspectiveCamera, Environment } from "@react-three/drei"; +import { OrbitControls, PerspectiveCamera, Environment, ContactShadows } from "@react-three/drei"; import { Door3D } from "./door-3d"; import * as THREE from "three"; function Room() { + const wallThickness = 0.15; + const doorWidth = 1.3; + const doorHeight = 2.5; + return ( - {/* Floor */} + {/* Floor - Clean shadow catcher */} - - + + - {/* Back Wall with Doorway */} - - {/* Left wall section */} - - - + {/* Proper Doorway with Reveal */} + + {/* Left Pillar */} + + + - {/* Right wall section */} - - - + {/* Right Pillar */} + + + - {/* Top wall section (above door) */} - - - + {/* Top Lintel */} + + + + + + {/* Main Wall - Left Section */} + + + + + + {/* Main Wall - Right Section */} + + + + + + {/* Main Wall - Top Section */} + + + - {/* Side Walls */} - - - + {/* Side Walls for depth */} + + + - - - + + + ); @@ -56,34 +78,29 @@ function Room() { function Lighting() { return ( <> - {/* Ambient light for overall illumination */} - + {/* Soft ambient light */} + - {/* Main directional light (sun) with shadows */} + {/* Key light - main illumination */} - {/* Fill light from the side */} - + {/* Rim light for separation */} + - {/* Spot light for drama */} - + {/* Fill light */} + ); } @@ -95,29 +112,41 @@ export function Scene3D() { gl={{ antialias: true, toneMapping: THREE.ACESFilmicToneMapping, - toneMappingExposure: 1.2, + toneMappingExposure: 1.3, + outputColorSpace: THREE.SRGBColorSpace, }} - style={{ background: "#f5f5f5" }} + style={{ background: "#fafafa" }} > {/* Camera */} - + {/* Camera Controls - Limited rotation */} - {/* Lighting */} + {/* Premium Studio Lighting */} - {/* Environment for reflections */} - + {/* Studio Environment for realistic reflections */} + + + {/* Contact Shadows for "Anti-Gravity" premium look */} + {/* The Room */}