当前位置:网站首页>three.js blur glass effect
three.js blur glass effect
2022-08-10 12:06:00 【Jedi Hongbin】
Creates a lens blur effect The properties of the following materials are mainly used 以及 MeshPhysicalMaterial 材质
const params = {
color: 0xffffff,
//Similar to transparency
transmission: 0.9,
opacity: 1,
//金属度
metalness: 0,
//粗糙
roughness: 0,
//折射率
ior: 1.52,
//厚度 The degree of blurring through which objects are seen
thickness: 0.8,
//镜面强度
specularIntensity: 1,
//镜面颜色
specularColor: new Color("#ffffff"),
//光强度
lightIntensity: 1
};
Ordinary wine glass

const params = {
color: 0xffffff,
"transmission": 0.9,
"opacity": 1,
"metalness": 0,
"roughness": 0,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}
const glassMaterial = new MeshPhysicalMaterial({
side: DoubleSide,
specularColor: new Color("#ffffff"),
...params,
});
metal wine glass

{
"color": 0xffffff,
"transmission": 0.9063505503810331,
"opacity": 0.9713801862828112,
"metalness": 0.7329381879762913,
"roughness": 0,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}

{
"color": 0xffffff,
"transmission": 0.7329381879762913,
"opacity": 1,
"metalness": 0.9063505503810331,
"roughness": 0.5812023708721422,
"ior": 1.209822184589331,
"thickness": 1.4049110922946655,
"specularIntensity": 1.0364098221845894
}
Frosted wine glass


参数
{
"color": 0xffffff,
"transmission": 0.9063505503810331,
"opacity": 0.9713801862828112,
"metalness": 0,
"roughness": 0.45114309906858596,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}
gui调试
for (const key of Object.keys(params)) {
gui.add(params, key, 0, 2).onChange((v) => {
glassMaterial[key] = v;
});
}
gui.add(
{
log: () => {
console.log(params);
},
},
"log"
);
边栏推荐
- Licking Exercise - 63 Find all anagrams in a string
- mpf6_Time Series Data_quandl_更正kernel PCA_AIC_BIC_trend_log_return_seasonal_decompose_sARIMAx_ADFull
- Go 事,Gopher 要学的数字类型,变量,常量,运算符 ,第2篇
- A little self-deprecating deconstruction about farmers "code"
- 【mysql】explain介绍[通俗易懂]
- 力扣练习——62 有效的数独
- LeetCode 61. 旋转链表
- Apple bucks the trend and expands iPhone 14 series stocking, with a total of 95 million units
- 皕杰报表在传参乱码
- jlink and swd interface definition
猜你喜欢

再有人问你分布式事务,把这篇扔给他

常量及数据类型你还记得多少?
Database management tool: dynamic read-write separation

可视化服务编排在金融APP中的实践

StoneDB Document Bug Hunting Season 1

CLIP还能做分割任务?哥廷根大学提出一个使用文本和图像prompt,能同时作三个分割任务的模型CLIPSeg,榨干CLIP能力...

A case of violent parameter tuning in machine learning

OPNsense安装配置Zenarmor

A little self-deprecating deconstruction about farmers "code"
![[E-commerce operation] Do you really understand social media marketing (SMM)?](/img/5b/6682c613305deb3dc15401077d38a0.png)
[E-commerce operation] Do you really understand social media marketing (SMM)?
随机推荐
7、Instant-ngp
codevs 2370 Small room tree (LCA)
做自媒体月入几万?博主们都在用的几个自媒体工具
Nocalhost - Making development more efficient in the cloud-native era
HDU 4135:Co-prime (容斥原理)
Microchip launched a high-performance 77GHz millimeter-wave radar chip, and has received tens of thousands of orders before mass production
Go 事,Gopher 要学的数字类型,变量,常量,运算符 ,第2篇
LeetCode 109. Sorted Linked List Conversion Binary Search Tree
16、Pytorch Lightning入门
制品库是什么?
Where can I view the version record of WeChat applet submission review history?
【Redis】内存回收策略
Since the media hot style title how to write?Taught you how to write the title
托米的咒语
[E-commerce operation] Do you really understand social media marketing (SMM)?
Introduction to Software Architecture
leetcode 823. Binary Trees With Factors(因子二叉树)
推荐6个自媒体领域,轻松易上手
网络基础(第一节)
可视化服务编排在金融APP中的实践