开发者

How, and what can i use to create 3d fire in Opengl (more exactly to simulate the sun)?

Hy. I am trying to simulate the solar system, and i need to simulate the sun using some kind of fire. I got my hands on some projects using par开发者_StackOverflow社区ticles, but are too complicated, so many files, i don't understand most of the code (I am new in C++ and opengl), but most of them don't work, they need some libraries that i can't find. Can someone help me with a link to a tutorial or a demo which works? PS I am using Visual C++


A good way to learn C++/OpenGL would be to write your own, simple, particle engine. There are plenty of resources out there :-) I wrote my own a long time back and it's surprisingly simple.

Here are some links to some tutorials:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19

http://www.naturewizard.com/tutorial08.html

http://www.swiftless.com/tutorials/opengl/particles.html

Some of these are 2D only. If you want 3D point sprite particles (point sprites are 2D textures that rotate to face the camera and appear 3D), then here is a short, simple article on the short, simple solution.

Hope this helps,

James

EDIT: When you get on to more advanced stuff, take a look here for different ways of rendering point sprites :-)


You may find a good set of OpenGL tutorials here:

http://nehe.gamedev.net/

Tutorial for doing particles is here:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19


You might be able to get the effect you want by simply blending a couple textures that rotate at different speeds. That is, if I'm guessing the look you're going for correctly.

So, things you'll want to look into are, glBlend, texture matrix and billboarding.

You won't be able to achieve the same kind of things you would with particles, but it's simpler ( sounds like you want to start with something easier ) and it might get you the look you're going for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜