Skip to content

Roughness problem when using equirectangular hdr image for MeshStandardMaterial's envMap #14709

@zhutq

Description

@zhutq
Description of the problem

I'm trying to use equirectangular .hdr image as MeshStandardMaterial's envMap.
It seems roughness does not work with equirectangular .hdr envMaps, although it does work with cube hdr maps.

The original examples/webgl_materials_variations_standard.html, using cube hdr maps, looks like:
screenshot from 2018-08-14 21-36-11

When using an equirectangular hdr image instead, the result is as follows. The reflections of higher roughness are as sharp as that of lower roughness.
screenshot from 2018-08-14 21-41-38

My loading code:

new THREE.RGBELoader().load( 'textures/miranda_uncropped.hdr', function( texture ) {
	texture.encoding = THREE.RGBEEncoding;
	texture.flipY = true;
	texture.mapping = THREE.EquirectangularReflectionMapping;

       	// .....
       	var material = new THREE.MeshStandardMaterial( {
		map: imgTexture,
		bumpMap: imgTexture,
		bumpScale: bumpScale,
		color: diffuseColor,
		metalness: beta,
		roughness: 1.0 - alpha,
		envMap: index % 2 === 0 ? null : texture
	} );
        // ......
Three.js version
  • Dev
  • r95
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions