Hi,
I am currently working on a glass try-on demo in AR and use ThreeJS as the 3D Rendering engine.
Demo:
https://mazing-ar.com/glass-demo/
I have a problem with the quality of the scene, most 3d models are high in quality, but it seems especially the red one, is getting blurry. Do you have any idea how I could improve the quality here, I already tried various things with renderer, environment and glb loader. I experimented with anisotropy and devicePixelRatio, but I wasn’t successful.
This it how it looks:
This is the native model, how I try to achieve:
This is the code I’m using to load the …
- Environment loading:
new RGBELoader()
.setPath( `${PUBLIC_PATH}/3d/environment/` )
.load( `clarens_night_02_1k.hdr` , ( texture ) => {
texture.mapping = THREE.EquirectangularReflectionMapping;
texture.anisotropy = this.renderer.getMaxAnisotropy();
this.scene.environment = texture;
} );
- Renderer Config
this.renderer = new THREE.WebGLRenderer({
// alpha: true,
antialias: true,
canvas: this.canvas,
devicePixelRation: window.devicePixelRatio,
// powerPreference: 'high-performance',
// logarithmicDepthBuffer: true,
});
- Glb Loader
loader.load(file, function (gltf) {
gltf.scene.traverse( ( object ) => {
if ( object.isMesh === true && object.material.map !== null ) {
object.material.map.anisotropy = MAXANISOTROPY;
}
} );
setTimeout(() => {
res(gltf.scene);
}, 500)
}, undefined, function (error) {
rej(error);
});
Please let me know if anyone has any ideas, I would really appreciate your help
Best,
Stefan