I developed an interactive VR-ready Cornell Box simulation inspired by physically-based rendering principles. The 3D environment includes realistic lighting, material response, and user interface control. The project was built using Three.js and shader programming, and features a full VR interface with controller support.
VR-ready Cornell Box simulation
Preview Project View CodeWhat
How
Modeling
- Constructed a Cornell Box-style room with walls, ceiling, and floor using
PlaneGeometry
, with accurate positioning and rotation.
- Applied different materials on key objects:
MeshLambertMaterial
on a coneMeshPhongMaterial
on a cylinderMeshPhysicalMaterial
on a sphere
- All parameters were adjustable via lil-gui.
- Integrated multiple types of lights:
- Ambient
- Point
- Directional
- Hemisphere
- Spot
- Added
RectAreaLight
for each wall to simulate light bouncing and improve realism.
- Created a GUI panel to control lighting types, colors, intensity, and material properties (transparency, metalness, textures).
- Embedded the GUI in VR using
HTMLMesh
andInteractiveGroup
.
- Enabled WebXR using
VRButton
andXRControllerModelFactory
. - Supported VR controller interaction and GUI manipulation within the 3D space.
Results
- Created an immersive WebXR environment simulating realistic materials and lighting.
- Achieved real-time interactivity in both desktop and VR modes.
- Developed an extendable platform for testing PBR and UI experimentation in VR.
- Gained proficiency in integrating shader-based materials, VR interfaces, and dynamic lighting using Three.js.