游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

关于使用程序生成(ProcGen)的正反面看法

发布时间:2016-06-13 14:38:18 Tags:,,,,

作者:Francisco RA

在本文中我将讨论使用程序生成(ProcGen)的正反两方面看法。这类型分析能够帮助你理解何时你该使用这样的工具,而这也将取决于你想要做的事。

Doi8ovs(from gamedev)

Doi8ovs(from gamedev)

不管是支持还是反对,其中的一些论据的原因可能是相同的。以下便是最常见的一些支持与反对意见。

(+代表支持,-代表反对,+/-代表依情况而定)

+/-效率:我们可以多快去设计场景?而ProcGen是否比手动创造内容更有效是取决于你要做什么。如果你想要创建一个3D模型,那么ProcGen可能比手动创造更有效。相反地,如果你要为一座城市创造10个,50个或100座建筑,那么你可能就需要重新考量使用其它方法。简而言之ProcGen的成本虽然远高于手动建模,但如果把时间成本也算在内的话,ProcGen的确是更有效的。

+/-成本:创造需要花费多少时间和金钱?当提到使用手动创造与ProcGen的成本时,如果你主张“时间就是金钱”,那么效率的作用性将更大。还有一个会影响成本的元素便是,你是使用自己的ProcGen系统还是使用像SpeedTree,Houdini,Sceelix等现有的解决方法。尽管你可能需要支付授权费,但这可以与团队所节省下的时间相抵。

-控制:即关于能够轻松定义特定设计和性能。如果你想要基于完整的控制性和特定细节去创造内容,那么最佳方法便是手动创造内容。不管是从时间,成本还是理智来考虑,这都是最佳选择。

+避免乏味:如果你必须亲手创造100个3D建筑,这便会是一份非常累人且乏味的工作。从这点看来游戏设计师会更加支持ProcGen。

+延展性:即关于能够轻松创造较小的场景和较大的场景。一旦你决定了你想要程序生成的内容的属性和参数,那么使用PC去生成的内容数量便只取决于PC的内存。从根本上来看,创造10个至100个建筑可能只需要几秒钟的时间。

+压缩性:或许你还记得我在之前的文章中提过的高纯度的ProcGen游戏,即一款适合96kb执行文件的第一人称3D射击游戏,因为这款游戏的所有内容(游戏邦注:包括3D网格,纹理,声音)都是程序生成内容。当游戏加载时它便会用掉超过300兆的内存。

+偏执狂:树的分布是否够随机?或者分支设定是否合理?如果你能够将真正随机的种子种在适当的边界系统中,ProcGen便能够帮助你解决这个问题。如果程序生成是发生在运行过程中,那么测试便特别重要。

tree distribution(from gamedev)

tree distribution(from gamedev)

+一致性:即确保所有元素能够遵循同样的风格和工作原理。现在我们将站在与上一点完全不同的位置上:这些树与其它星球上的树是否不同?如果你拥有一个全能的ProcGen系统或工具,你便能够保证同一类型的内容间的一致性,这是手动创造很难做到的。再一次地,测试真的很重要。

+可重用性:即能够充分利用你的付出。有些ProcGen系统拥有非常高的可重用性。改变一些参数便有可能创造出一组全新的内容。这也将呈现出一些值得你去考虑的价值。如果你能够更多地重复使用它,你便能够创造更有效的投资。

+/-可管理性:即能够轻松控制结果输出。如果你们正在讨论创造大量内容,那么ProcGen将帮助你集中控制整体结果。如果你所面对的是少数内容,那么手动创造或许更能把握控制权。有些ProcGen工具将通过基于参数的视觉语言而提供给你更多控制权。

+适应性:即能够通过改变去遵守你在系统中所明确的规则。如果你正在创造一个增加了两倍高度的建筑,那么台阶数量也将自动翻倍。如果这时候你使用的是合适的ProcGen系统,你便能够改变参数和结果去适应你所面对的各种限制条件。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转发,如需转载请联系:游戏邦

Procedural Generation: Pros and Cons

By Francisco RA

In this article I discuss the pros and cons of using procedural generation (ProcGen). This type of analysis is a good way for you to understand when you should use it and it varies depending on what you want to do. Some case examples in my previous post here.

The root cause for some of these arguments in favor or against might be the same. Here are a few of the most common pro and con arguments:

([+] for pro, [-] for con, [+/-] for depends)

[+/-] Efficiency: How fast we can design our scenes? Whether ProcGen is more efficient than manual content sculpting, really depends on what you are doing. If you want to model a single 3D building, for instance, then maybe ProcGen might not be as efficient as the manual method. On the other hand, if you are to create 10, 50 or 100 buildings for a city then you could reconsider. In short, ProcGen can have a larger overhead than manual modelling but after you “break even” timewise, ProcGen can become infinitely more efficient.

[+/-] Cost: How much time and money does it take to create? When it comes to the cost of using manual vs ProcGen, efficiency plays a big role when you consider the saying “time is money”. Another factor that influences cost is whether you create your own ProcGen system or use existing solutions such as SpeedTree, Houdini or Sceelix (shameless plug). Although you need to pay for the licenses, it may compensate the time your team saves.

[-] Control: The ease to define certain designs and properties. When you want to create content with total control and specific details your best bet is to create the content manually. For your time, wallet and sanity’s sake.

[+] Monotony free: If you have to create 100 3D buildings by hand, that can be a very tiresome and repetitive job. This is a point commonly made by game designers in favor of ProcGen.

[+] Scalability: The ease to create small scenes as well as large. Once you determine the properties and parameters of the content you want to generate procedurally (which generates the overhead previously mentioned), the time it takes a PC to generate any amount of content depends solely on the limitations of the PC. Basically, from making 10 building to 100 can be a matter of seconds.

[+] Compression: As you may remember from the high ProcGen purity game from my previous post, a whole 3D first-person shooter level fit into a 96kb executable because all its content (3D meshes, textures, sounds) were generated procedurally. When the game loaded up it used up over 300mb of RAM.

[+] Paranoia: Is this tree distribution random enough? Or the number of branches and sub-branches for that matter? Aaahhh… ProcGen can give you more peace of mind in that sense, if you feed truly random seeds to a properly bounded system. Testing is always important specially if generation is at runtime.

[+] Consistency: The guarantee that elements follow the same style and working principles. Almost in the opposite side of the spectrum from the previous point: Do these trees look like they’re from different planets? If you have a well rounded ProcGen system or tool specification, you can better guarantee greater consistency between content of the same type than if you did them manually. If you don’t, it can be a problem. Again, testing is important.

[+] Reusability: Being able to make the most out of your work. Some ProcGen systems have a high reusability factor. Changing a few parameters could generate a whole new set of content. This also brings value you should consider, if you decide to create one. The more you can reuse it, the better the investment is of creating or specifying one.

[+/-] Manageability: The ease of controlling the resulting output. If you are talking about creating large quantities of content, ProcGen can give you centralized control over the overall result. If you are dealing with small quantities, manual creation will give you more control. Some ProcGen tools also give you more control by giving you visual languages (normally node-based) with parameterization.

[+] Adaptability: change to obey the rules you defined in your system. If you make a building double its original height, then the number of floors could automatically double. If the ProcGen system you use is well developed, you may change one of its parameters and the resulting output will adapt to meet the constraints you have in place.

These are the broad strokes. There are also some general considerations you should have when you use procedural generation, but that I’ll leave for my next post.(source:gamedev

 


上一篇:

下一篇: