如何在统一的天空盒之间进行平滑过渡? [英] How to make smooth transition between skyboxes in unity?
问题描述
我有几个统一的天空盒(白天和黑夜),并希望定期在它们之间实现平滑过渡,以创建昼夜循环.我查了很多问题,但它们要么已经过时,要么我不知道它们的意思,任何帮助将不胜感激.
I have a couple of skyboxes in unity (Day and Night) and want to achieve a smooth transition between them periodically, to create a day and night cycle. I've looked up many questions but they're either outdated or I have no idea what they mean, Any help would be appreciated.
推荐答案
感谢您的评论回复.
我使用了这个着色器 - http://wiki.unity3d.com/index.php?title=SkyboxBlended 正如在另一个问题的回答中所建议的那样.问题是,很多初学者不知道如何使用着色器,我现在将对此进行说明.
I used this shader - http://wiki.unity3d.com/index.php?title=SkyboxBlended as suggested in an answer to another question. The problem is, a lot of beginners do not know how to use shaders, which I'm going to illustrate right now.
- 在您的项目中创建一个着色器,打开它,然后将着色器复制粘贴到上面的链接中.
- 创建材料.
- 将着色器拖放到材质上.
- (假设你已经导入了天空盒纹理)如果你点击你的材质,它应该让你在检查器窗口中放置 12 个纹理(一个天空盒 6 个,另一个天空盒 6 个)
- 现在,通过使用混合滑块,您应该能够看到天空盒彼此淡入淡出:).您可以编写脚本来更改混合值、自动生成昼/夜循环或季节循环.
如果您需要更多帮助,请随时发表评论
If you want more help, feel free to comment
这篇关于如何在统一的天空盒之间进行平滑过渡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!