Skip to content

alexprut/threejs-auto-show-bugatti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three.js — Auto Show — Bugatti Veyron

Project created during my Master's Degree in Computer Science for the Interactive 3D Graphics class.
Live preview: https://alexprut.github.io/threejs-auto-show-bugatti

Demo - Auto Show — Bugatti Veyron


Project Goals

Develop a web page based on 3D graphics, using the three.js library, that showcases a product using realistic materials and illumination.

Scene

Composed by a garage, 4 lights, a car and a stand where the car is placed. All the components are created using three.js primitive geometries except the car model.

Light Staging

The scene is composed by 4 directional lights respectively placed in:

  1. First light: new THREE.Vector3(0, 200, -140)
  2. Second light: new THREE.Vector3(0, 200, 140)
  3. Third light: new THREE.Vector3(180, 200, 0)
  4. Fourth light: new THREE.Vector3(-180, 200, 0)

Light source is a Standard Fluorescent light expressed in rgb values as 244, 255, 250.

Materials

The product use realistic materials based on diffuse plus micro-facet BRDFs, and normal mapping. For the above purpose, custom fragment and vertex shader were created. Other objects in the scene, use primitive three.js materials.

In the custom vertex and fragment shader the following shading equation was implemented:
Shading equation

Beta equation:
Beta equation

Lambertian BRDF equation:
Lambertian BRDF

Micro-facet BRDF equation:
Micro-facet BRDF

Fresnel effect using the Schlick Approximation equation:
Fresnel effect using the Schlick Approximation

D(h) using Trowbridge-Reitz equation:
Trowbridge-Reitz

G(l,v, h) - Geometry Factor using an easier approximation of Cook-Torrance equation:
Cook-Torrance

Interaction

The user is able to inspect the object using appropriate camera control mechanism (orbit around the product, zoom). It can also interact with the showcase product by changing the car back, top and front torso color.

Demo - Interaction

Product

The product in the showcase is a Bugatti Veyron car. The 3d model used was originally created by Troyano and taken from an official three.js example.

Post-Processing

Vignetting post-processing effect was used for reduction of the image brightness and saturation at the periphery. For the above purpose a custom fragment shader was created.

Credits

Color icon: Freepik
Bugatti Veyron model: by Troyano
Bugatti logo and favicon: from the official Bugatti website

About

Three.js (3D graphics) auto show scene (Bugatti Veyron)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published