Three.js:基于图像的照明(IBL)

编程入门 行业动态 更新时间:2024-10-09 12:28:11
本文介绍了Three.js:基于图像的照明(IBL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在寻找将 IBL 添加到我的场景和对象中.但是我在网上找不到任何东西.有一些使用 envMap 的示例,但问题是使用 envMap 时,对象看起来像 chrome ...

I'm searching to add an IBL to my scene and objects. But I can't find anything on the web. There are some examples with an envMap, but the problem is that with the envMap the object looks like chrome...

我正在尝试产生这样的效果:

I'm trying to have such an effect:

我发现您可以使用 IBL(基于图像的照明)、PRT(预计算辐射传输)或 PBR(基于物理的渲染).但是我不知道如何在three.js中使用这种效果.

I found that you can use IBL (Image Based Lighting), PRT (Precomputed Radiance Transfer) or PBR (Physically Based Rendering). But I'm unable to know how to use such an effect with three.js.

使用来自 r74dev 的新 MeshStandardMaterial 后,我可以得到以下结果:(前)(后)

After using the new MeshStandardMaterial from the r74dev I'm able to have the following result: (before) (after)

但我不能将 MeshStandardMaterialenvMap 与纹理一起使用.纹理或 MeshStandardMaterial 都不起作用.

But I can't use MeshStandardMaterial and envMap with textures. Either the texture or the MeshStandardMaterial dooesn't work.

推荐答案

感谢 WestLangley 我正在使用 MeshStandardMaterial:

Thanks to WestLangley I'm using MeshStandardMaterial:

var objectGeometry = new THREE.SphereGeometry( 10, 100, 100 );  
material  = new THREE.MeshStandardMaterial({envMap : textureSkydome});

(r74dev)

这篇关于Three.js:基于图像的照明(IBL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 15:39:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1396176.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   js   IBL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!