Skip to content

Commit

Permalink
Fix glossy material for Teapot example (mrdoob#30253)
Browse files Browse the repository at this point in the history
* Fix glossy material

The glossy material for the teapot (I made this example) looks smooth, due to changes in the defaults for the MeshPhongMaterial. Changed lighting and colors & shininess power for glossy so that it looks glossy again.

* update screenshot
  • Loading branch information
erich666 authored Jan 3, 2025
1 parent 575cc3a commit 3778581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified examples/screenshots/webgl_geometry_teapot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions examples/webgl_geometry_teapot.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
camera.position.set( - 600, 550, 1300 );

// LIGHTS
ambientLight = new THREE.AmbientLight( 0x7c7c7c, 3.0 );
ambientLight = new THREE.AmbientLight( 0x7c7c7c, 2.0 );

light = new THREE.DirectionalLight( 0xFFFFFF, 3.0 );
light = new THREE.DirectionalLight( 0xFFFFFF, 2.0 );
light.position.set( 0.32, 0.39, 0.7 );

// RENDERER
Expand Down Expand Up @@ -96,7 +96,7 @@
materials[ 'wireframe' ] = new THREE.MeshBasicMaterial( { wireframe: true } );
materials[ 'flat' ] = new THREE.MeshPhongMaterial( { specular: 0x000000, flatShading: true, side: THREE.DoubleSide } );
materials[ 'smooth' ] = new THREE.MeshLambertMaterial( { side: THREE.DoubleSide } );
materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { side: THREE.DoubleSide } );
materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { color: 0xc0c0c0, specular: 0x404040, shininess: 300, side: THREE.DoubleSide } );
materials[ 'textured' ] = new THREE.MeshPhongMaterial( { map: textureMap, side: THREE.DoubleSide } );
materials[ 'reflective' ] = new THREE.MeshPhongMaterial( { envMap: textureCube, side: THREE.DoubleSide } );

Expand Down

0 comments on commit 3778581

Please sign in to comment.