Lighting effect

Please have a look into this . I have seen this webgl project on web. It has amazing lighting effect. Any one knows, how to do this much of lighting effect. The floor and surroundings are brighten. But that bright didn’t affect the environment texture. It doesn’t get fade. Is there any method available for set the target for lights like some objects should escape from the lighting. Any ideas about it. Please share

As far as I know - light does not affect scenes background texture at all (if that’s what you mean by environment texture ofc.)

If what you mean is reflection envMap, its lightness depends on an exposure param - you can see and example here.

Also, if your textures are faded you can try setting their encoding to Three.sRGBEncoding (similarly in the renderer you can adjust toneMapping and outputEncoding params.)

Thank you for your reply @mjurczyk . Can I use .jpg files for that environment ?

I believe so - anything that can be used as a Texture should be usable as an environment texture as well (and jpgs can be Textures, ofc.)

1 Like

Yes @mjurczyk . But in this example which you have shared, the environment texture is loaded as cubetexture. But see this example . Here, the environment texture is a single hdr image. I need to import a jpeg image like this example instead of hdr. Is it possible ?

@mjurczyk any update on this. Please

Just try? :man_shrugging: There’s also quite a few examples of using HDR textures in the official docs.

Sure @mjurczyk. But I need to know what loader should I used to achieve my need.