使用 c++ 从头开始​​在 3D 游戏中创建效果和 DirectX

发布于 2024-09-06 02:57:52 字数 353 浏览 4 评论 0原文

所以标题就这么说了。我找不到任何有关如何在 3D 游戏中实际构建效果的信息。稍后我可能会坚持使用某些引擎,但为了理解整个事情,我这次需要自己尝试一下。我发现了一些关于粒子系统的信息,这可能是正确的方法,但 Google 上的 DirectX 和粒子系统之间的任何其他连接都会给出 3DSmax 等结果。

因此,如果您能为我指出一些教程或解释它,我将不胜感激... 最后一种可能性是向我指出一些专注于这个东西的简单引擎(我真的不想通过大量代码并理解这个引擎是如何工作的,我只需要看看他们如何实现这个 FX 东西)。

谢谢

PS:另一种可能性是如果你知道讨论这个问题的好书。它可能更复杂,但除了教程之外,书籍通常写得更基础,所以这也是一个不错的选择

So the title says it. I couldn't find any info on how actualy build effects into 3D game. I'll maybe stick to some engine later, but for understanding of this whole thing I would need to try it on my own for this time. I found a few about particle systems which may be the right way but any other connection between DirectX and particle systems on google gave results as 3DSmax and etc.

So I would be thankful if you would point me on some tutorials for this, or explaining it...
Last possibilitie would be pointing me on some simple engine focused on this thing (I don't really want to fight through tons of code and understanding how this engine works, I just need to see how they implement this FX stuff).

Thanks

PS: the other possibilitie would be if you know about good book discusing this. It can be more complex but apart from tutorial, books are usually wrote more basicly so this would be also nice way to go

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浊酒尽余欢 2024-09-13 02:57:52

首先:粒子效果只是一种效果,最好指定粒子引擎这个词:p。

其次:搜索Gamedev的文章,如果你想要这样的东西,它确实是最好的资源。您可以在讨论板上找到大量文章,甚至可以找到大量链接和有用信息。我可以链接到的两篇文章是 NeHe 关于 OpenGL 中粒子的课程,它不是 directx,但 NeHe 的 OpenGL 教程非常好。我还找到了一个用于 directx8 和 VB (所以有点旧) 。

请记住,如果您无法自行优化,粒子引擎通常会严重影响性能,因此请尝试查看开源游戏引擎(例如 OGRE)以了解其实现方式,甚至更好的特定粒子引擎。

First of all: particle effects are just one kind of effects, it's better you specify the word particle engine :p.

Secondly: search int he articles of Gamedev, it's really the best resource if you want things like this. You can find lots of articles and even better, tons of links, and useful information on the discussion boards. Two articles I can link to is the NeHe lesson about particles in OpenGL, it's not directx but NeHe tutorials for OpenGL are very good. I also found one for directx8 and VB (so a little bit older).

Keep in mind though that a particle engine is often a huge performance hit if you can't optimize it yourself, so try to look at open source game engines (e.g. OGRE) on how they implement it or even better, specific particle engines.

许你一世情深 2024-09-13 02:57:52

如果您能为我指出一些这方面的教程,我将不胜感激

您需要下载 microsoft DirectX SDK
除此之外,您还应该尝试 NVidia SDK
您也可以尝试 ATI SDK。全部研究一下。

除此之外...还有几本关于 OpenGL 的书籍:“红皮书”“蓝皮书”橙皮书 。 Francis Hill 的 《使用 OpenGL 的计算机图形》 也是一本非常好的文章。

获取此信息并开始阅读。

如何在 3D 游戏中实际构建效果

这个问题太宽泛了。有灯光效果、粒子系统、后处理效果、物理(也是效果),甚至角色动画也是效果。目前尚不清楚你所说的是哪种影响。

您认为 DirectX 和 OpenGL 哪个更好。

他们或多或少是平等的。你可以在两者中做同样的事情。两者都尝试一下,然后选择您更喜欢的一个。 OpenGL 更适合玩耍和实验(因为您可以轻松绘制三角形,而不会弄乱硬件缓冲区),可在更多平台上使用,而且 GLSL 比 HLSL 更好(因为它不会“编译成程序集”)。 DirectX从一开始就以性能为导向,在XBox360上可用,第9版实际上还不错。 openGL更“抽象”,DirectX更接近硬件。

是否可以使用简单性、使用范围、性能、示例和资源数量等因素

  1. 如果你想要简单性,你应该忘记制作游戏引擎。如果您想处理 3D,您必须学习很多东西。
  2. DirectX 和 OpenGL 都用于制作 3D 相关产品。
  3. 使用 DirectX 和 OpenGL 都可以获得良好的性能,但如果您不知道自己在做什么,则性能会很差。
  4. DirectX 和 OpenGL 都有大量的示例和书籍 - 只需搜索即可。它们不是昨天制作的,所以已经有足够的信息了。

您需要选择目标、选择平台、选择 API、研究可用技术并开始编写代码。想知道“哪一个更好”是浪费时间。 3D 知识和算法同样适用于这两个 API。

So I would be thankful if you would point me on some tutorials for this

You need to download microsoft DirectX SDK.
In addition to it, you should try NVidia SDK.
You may also try ATI SDK. Study them all.

In addition to them... there are couple of books on OpenGL: "Red Book", "Blue Book", Orange Book . "Computer graphics using OpenGL" by Francis Hill is also a very good one.

Get this info, and start reading.

how actualy build effects into 3D game

This question is too broad. There are lighting effects, particle systems, post-processing effects, physics (which are also effects), and even character animation is an effect. It is unclear what kind of effects you are talking about.

What do you think is better DirectX or OpenGL.

They are more or less equal. You can do same things in both of them. Try both and pick one you liked more. OpenGL is better for playing around and experimenting (because you can easily draw triangle without messing with hardware buffers), available on larger selection of platforms, plus GLSL is better than HLSL (because it doesn't "compile into assembly"). DirectX is geared towards performance from the beginning, available on XBox360, and 9th version was actually good. openGL is more "abstract" and DirectX is closer to hardware.

If you could use the factors as simplicity, area of usage, performance, number of examples and resources etc

  1. If you want simplicity, you should forget about making game engine. You'll have to learn quite a lot of things if you want to deal with 3D.
  2. Both DirectX and OpenGL are used for making 3d-related products.
  3. You can get good performance with both DirectX and OpenGL, and get poor performance if you don't know what you're doing.
  4. Both DirectX and OpenGL have insane amount of examples and books - just search for it. They weren't made yesterday, so enough information is already available.

You need to select goal, select platform, select your API, research available technologies, and start writing code. Wondering "which one is better" is a waste of time. 3D knowledge and algorithm are equally applicable to both APIs.

梦醒灬来后我 2024-09-13 02:57:52

我觉得OpenGL是学习的最佳选择。 Glut 是免费提供的,并且具有实现粒子引擎所需的所有功能。另外,还有大量在线示例代码。我喜欢函数的样子。易于记忆和逻辑使用

OpenGL is the best bet to learn I feel. Glut is available free of cost and has all the functions you need to implement a particle engine. Plus theres loads of sample code online. I like the way functions are . Easy to remember and use logically

坦然微笑 2024-09-13 02:57:52

学习 D3D9.0c/D3D10 的最佳书籍由 Frank Luna 编写。只要把他放到亚马逊或谷歌上,你就会得到结果。他教授如何从头开始构建成熟的游戏引擎。

The best books for learning D3D9.0c/D3D10 are by Frank Luna. Just put him in to amazon or google and you'll get results. He teaches how to build a fully-fledged game engine from scratch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文