在OpenGl C ++中绘制Rain [英] Drawing Rain in OpenGl C++

查看:126
本文介绍了在OpenGl C ++中绘制Rain的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是opengl的新手,我必须在opengl下雨。是不是我必须使用LINES函数的随机数函数?或者如何绕过它?

I am new to opengl and I have to make rain in opengl. Is it like that i have to use random number function with the LINES function? Or how to go around it?

推荐答案

在屏幕空间中使用粒子系统绘制雨水 - 有关于此的教程,以便您可以使用youtube和google找到它。无论您的粒子是线条还是非常复杂的纹理精灵都取决于您和您的资源。在大雨的情况下,一个非常好的技巧是绘制水滴(颗粒),然后在水滴后面的3D场景上施加雾,因为大雨看起来有点嘈杂雾。
Draw rain with a particle system in screen space - there are tutorials about that so you can find it with youtube and google. Whether your particles are lines or very sophisticated textured sprites is up to you and your resources. In case of heavy rain a very nice trick is drawing the drops (the particles) and then applying fog on your 3D scene behind the drops because heavy rain looks like a bit "noisy" fog.


这不是C ++问题。



但是这个链接可能会有所帮助。



OpenGL中的增益 [ ^ ]
This is not a C++ question.

But this link might help.

Rain in OpenGL[^]


这篇关于在OpenGl C ++中绘制Rain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆