![](https://i-blog.csdnimg.cn/blog_migrate/4b981b917436c9b5d19897389c8ee27b.png)
虚幻4 程序化 植被
Lennart Johansen is an expert in 3D visualization and mapping systems. And now he’s helping 400+ developers apply procedural vegetation and run-time masking to myriad games and virtual experiences. Unexpectedly, his part-time hobby has blossomed into a full-time job. And he’s got some cool growth plans too.
Lennart Johansen是3D可视化和制图系统的专家。 现在,他正在帮助400多个开发人员将程序植被和运行时遮罩应用于各种游戏和虚拟体验。 出乎意料的是,他的兼职爱好变成了全职工作。 而且他也有一些不错的增长计划。
Based in northern Norway, with a background developing complex systems for military and civilian purposes, Lennart Johansen is well acquainted with harsh environments. While preparing those systems – some of which are used for search-and-rescue operations – many of his pre-Unity development challenges were like those faced by Unity developers.
Lennart Johansen总部位于挪威北部,其背景是开发用于军事和民用目的的复杂系统,他熟悉恶劣的环境。 在准备这些系统(其中一些用于搜索和救援操作)时,他在Unity之前的许多开发挑战都与Unity开发人员所面临的挑战类似。
“We had to solve a lot of similar kinds of problems when creating the mapping systems, where we used real-world data for the rulesets and spawning systems.”
“在创建映射系统时,我们不得不解决很多类似的问题,在这些系统中,我们使用现实世界的数据作为规则集和生成系统。”
“我们内部都有游戏” (“We all have a game inside us”)
Johansen brought his hard-earned work experience to his first Unity project – a virtual-reality piece. “I truly believe we all have a game inside us waiting to come alive, so it was just a matter of time and circumstances before I started mine, which inadvertently led to Vegetation Studio.”
Johansen将他来之不易的工作经验带入了他的第一个Unity项目-虚拟现实作品。 “我坚信我们每个人都有一个活着的游戏,所以我开始采矿只是时间和环境的问题,这无意间导致了Vegetation Studio的出现 。”
But how did he get started with Unity?
但是他是如何开始使用Unity的呢?
“When I began that VR game project a few years back I chose Unity for a number of reasons, including that it supports new hardware quickly.”
“几年前我开始进行VR游戏项目时,出于多种原因选择了Unity,其中包括它可以快速支持新硬件。”
Johansen’s primary motivation for using Unity, however, was actually people not technology. “My main reason was the strength of the Unity communities and the well-stocked Asset Store. When you’re a small team with limited resources, these things can really help kickstart a project.”
Johansen使用Unity的主要动机实际上是人而不是技术。 “我的主要原因是Unity社区和储备丰富的Asset Store的实力。 当您是一个资源有限的小型团队时,这些事情确实可以帮助启动一个项目。”
![](https://i-blog.csdnimg.cn/blog_migrate/fa1a3192349801994aaadb891c021fb6.png)
A flat-shaded, stylized scene created with Vegetation Studio
由Vegetation Studio创建的平面阴影风格化场景
将游戏开发者变成资产 (Turning game dev into an asset)
So what gave Johansen the idea for Vegetation Studio, his first asset?
那么,什么让Johansen想到了他的第一笔资产Vegetation Studio的想法呢?
“When we were working on our VR game we wanted to let players use a level editor with complex outdoor scenes and vegetation on large areas. After prototyping the functionality, it occurred to us that we had created something that other developers could leverage for their own games. So with the idea of filling a niche in the Asset Store, we decided to spin it off into a product.”
“当我们从事VR游戏时,我们希望让玩家使用关卡编辑器来处理复杂的户外场景和大面积的植被。 在对功能进行原型设计后,我们发现我们已经创建了其他开发人员可以将其用于自己的游戏的东西。 因此,出于在Asset Store中填补细分市场的想法,我们决定将其拆分为产品。”
For further inspiration, Johansen went back to the source: nature itself.
为了获得进一步的启发,约翰森回到源头:自然本身。
“When evaluating the different tools available, I realized that while they let you place objects individually or using brushes, real vegetation actually grows everywhere it possibly can. That made us want to use a different approach with rule-based procedural vegetation everywhere and a run-time masking system for roads and structures. For example, our idea was that a house prefab could contain the masking info you need to control the vegetation as you drag and drop it on your terrain.”
“在评估可用的不同工具时,我意识到,虽然它们使您可以单独放置对象或使用画笔放置,但实际植被实际上会尽可能地生长。 这就使我们想在各地使用基于规则的程序植被以及针对道路和结构的运行时遮罩系统的不同方法。 例如,我们的想法是,房屋预制件可以包含在您将其拖放到地形上时控制植被所需的遮罩信息。”
![](https://i-blog.csdnimg.cn/blog_migrate/af6c1ea1fab0ec6a6aafa864089f4c37.png)
Masking a house for rule-based vegetation
为基于规则的植被遮盖房屋
The users apply rule-based vegetation throughout a scene or game, using their existing trees, plants, grass, etc., then they can do manual editing to add the artist’s final touch. And that was a large part of Johansen’s impulse for helping developers build great-looking environments for fun games, as well as making their lives simpler.
用户使用他们现有的树木,植物,草等在整个场景或游戏中应用基于规则的植被,然后他们可以进行手动编辑以添加艺术家的最终触感。 这是Johansen推动开发人员为娱乐游戏构建美观的环境并简化生活的一大部分。
“I would like users to spend their time on game content and functionality, not solving the hard problems of creating an optimized render loop, for example, because I’d like to think we’ve already done that for them.”
“例如,我希望用户将时间花在游戏内容和功能上,而不是解决创建优化渲染循环的难题,因为我想我们已经为他们做到了。”
路上的颠簸 (Bumps on the road)
As a neophyte asset publisher, however, Awesome Technologies had a lot to learn about users and use cases. “One of our biggest challenges has been understanding user workflow for tools and how developers use and combine different systems. A surprise for us was that they never seem to use it as we imagined when we started development.”
但是,作为新手资产发布者, Awesome Technologies有很多关于用户和用例的知识。 “我们面临的最大挑战之一是了解工具的用户工作流程以及开发人员如何使用和组合不同的系统。 让我们感到惊讶的是,他们似乎从未像我们开始开发时所想象的那样使用它。”
And another thing he did not expect was how many developers out there work with large world projects with hundreds if not thousands of terrains streaming in as players move around. So, due to the multitude of different workflows and use cases, one of Johansen’s big challenges has been to develop and support a flexible toolkit that can work well in any kind of workflow, letting users enable just the parts they need for their project.
他没有想到的另一件事是,有多少开发人员在大型世界项目中工作,随着玩家的到来,有数百个甚至数千个地形流入。 因此,由于工作流程和用例的多样性,Johansen面临的一大挑战是开发和支持一个灵活的工具包,该工具包可以在任何类型的工作流程中正常工作,让用户仅启用其项目所需的零件。
A further challenge for him was low-level access in Unity itself. “Earlier, the game engine was more like a black box and many times we wanted to have better control on the API level. Happily, things are looking much better now with the Package Manager and more code moving to C#. It’s easier now for us to see what’s going on ‘under the hood’ and to extend our modules.”
他面临的另一个挑战是Unity本身的低级访问权限。 “以前,游戏引擎更像是一个黑匣子,很多时候我们想更好地控制API级别。 令人欣慰的是,现在有了Package Manager ,事情变得更好了,更多的代码移到了C#中。 现在,我们可以更轻松地了解“幕后”的情况并扩展我们的模块。”
![](https://i-blog.csdnimg.cn/blog_migrate/b29d433a7304f3fda18e3685a73b7d17.png)
Deep in a primordial boreal forest
在原始的原始森林深处
并非总是艰难的战斗 (Not always an uphill battle)
As Johansen hoped when he started using Unity, the passionate user community was quite helpful. “Their feedback from the beta to official release was great. There have been many friendly developers of all experience levels giving invaluable comments, info and advice. We really appreciate it.”
正如Johansen希望在开始使用Unity时所希望的那样,热情的用户社区非常有帮助。 “从测试版到正式发布,他们的反馈非常好。 有许多经验丰富的友好开发人员,他们提供了宝贵的意见,信息和建议。 我们非常感谢。”
And so far, Vegetation Studio is being used in everything from indie games to large simulations by a wide range of studios. While the majority of games filling their landscapes with Awesome’s procedural vegetation are still in development, some games will be entering early access and release soon.
到目前为止,从独立游戏到大型工作室的大型模拟,Vegetation Studio都在使用。 尽管大多数使用Awesome程序性植被填充游戏的游戏仍在开发中,但有些游戏将进入早期访问并很快发布。
Regarding the Asset Store, Johansen appreciates the help and feedback he’s received, which allowed the burgeoning publisher “to reach a much larger market than they could with direct sales.”
关于Asset Store,Johansen非常感谢他所提供的帮助和反馈,这使蓬勃发展的发行商“可以达到比直接销售更大的市场”。
![](https://i-blog.csdnimg.cn/blog_migrate/3ab1eb10fb61ee2ef75f3ca7bea0e452.png)
A snow-covered slope descending to a lush mountain valley
冰雪覆盖的山坡下降到郁郁葱葱的山谷
植被是一个成长行业 (Vegetation is a growth industry)
As well as supporting and adding features to the base asset, which takes up approximately 20% of his time, Johansen has many vegetation-related projects on the go, including a terrain-shadow system and Vegetation Studio Professional, which is available in beta for current users of the asset.
除了支持和添加基本资产(约占他20%的时间)的功能外,Johansen还在旅途中进行了许多与植被有关的项目,包括terrain-shadow系统和Vegetation Studio Professional ( 可在Beta版中获得)资产的当前用户。
With the introduction of Unity’s C# Job System and Burst Compiler, Johansen saw the possibilities for run-time procedural vegetation. Consequently, for their upcoming Pro version, Awesome completely rewrote Vegetation Studio from the core up using the C# Job System to multi-thread vegetation instance-generation and preparation for rendering.
随着Unity C#Job System和Burst Compiler的引入,Johansen看到了运行时程序化植被的可能性。 因此,对于即将发布的Pro版本,Awesome使用C#Job System从核心彻底重写了Vegetation Studio,以多线程生成植被实例并准备渲染。
Later this year, in another blog post, Awesome will be sharing their experience adapting Vegetation Studio for the C# Job System and Burst Compiler.
今年晚些时候,Awesome将在另一篇博客文章中分享他们将Vegetation Studio用于C#Job System和Burst Compiler的经验。
贯穿生物群落 (Running through the biomes)
Finally, in terms of new features, Johansen and crew at Awesome are also adding mesh terrain support and biomes (i.e., distinct regions/environments like deserts, grasslands, rainforests and tundra).
最后,就新功能而言,Johansen和Awesome的工作人员还增加了网状地形的支持和生物群落(即沙漠,草原,雨林和苔原等不同的区域/环境)。
“This will let developers create multiple rulesets for both vegetation and terrain splat-maps, and apply them on user-defined areas. That will make it easy to create, for example, an oasis in a desert or a green forest at the base of a snow-covered mountain. Users will be able to combine and blend between many environments across multiple terrains and meshes.”
“这将使开发人员可以为植被和地形splat-map创建多个规则集,并将其应用于用户定义的区域。 这将使在沙漠中或在白雪覆盖的山基上的绿色森林中创建绿洲变得容易。 用户将能够在跨多个地形和网格的许多环境之间进行合并和融合。”
With fine-tuned controls in assets like this, the grass is always greener . . . exactly where you want it to be.
通过对此类资产进行微调的控制,草丛总是更绿。 。 。 正是您想要的位置。
免费获取Vegetation Studio之类的资产和一件T恤 (Get assets like Vegetation Studio and a T-shirt for FREE)
Spend between $50 and $250 in the Unity Asset Store during August and get up to 6 free assets – including Vegetation Studio – worth over $250, plus an Asset Store T-shirt. Just be sure to activate the promotion using your Unity ID first.
8月在Unity资产商店中花费$ 50到$ 250,并获得多达6件免费资产-包括价值超过$ 250的Vegetation Studio-以及资产商店T恤。 只要确保首先使用您的Unity ID激活促销即可。
虚幻4 程序化 植被