Moving UE4's Foliage System in Unity
Events
Subscribe:  iCal  |  Google Calendar
NY 11222 US   18, Jun — 21, Jun
Utrecht NL   29, Jun — 30, Jun
Brighton GB   10, Jul — 13, Jul
Brighton GB   10, Jul — 13, Jul
Cambridge GB   13, Jul — 17, Jul
Latest comments
by jhon perker
3 hours ago

The new features facial expression is very unique and the first launch in apple. I have used this expression, and I love to use this. this is very funny and look like the original. but sometimes it refuses to express then i prefer to go Apple Support Australia.

by Matthew
5 hours ago

You may want to credit Critical Role and Sam Riegel for the character creation.

by Admin
9 hours ago

hahaha, oh sorry, man we'll fix. is there a way we can actually contact him???

Moving UE4's Foliage System in Unity
25 October, 2017
Interview

A little talk from Ioan Lazu about his amazing new foliage system for Unity, which was inspired by some of the Unreal’s tech.

Introduction

My name is Ioan Lazu and I am a 24-year-old programmer from Timisoara, Romania. My first brief encounter with the game development industry was more than 10 years ago, with an old version the ‘GameMaker’ game creation software, and much earlier than that by using some game’s map editing possibilities. Since then I’ve developed my own small engine and used the very limited existing solutions, but I haven’t got seriously into game production until Unity and Unreal became free to use.

System

Developing an open world game, called ‘The Unwritten Critias’, we faced the problem of low-quality foliage and poor performance while using the standard Unity solution. Therefore we developed our own solution, the ‘Critias Foliage System’ that is, as the name implies, a vegetation panting and rendering mechanism. I’ve tried to make the workflow as close to Unreal’s foliage system, in order to help people that already had that technical background.

At the system’s core lies a spatial hash space partitioning method that is very good at rendering only the visible and close instances and skipping the far away or invisible batches. The system’s main functions are hand-painting, extracting, in case that you already have a populated terrain, and most important, the rendering of millions of foliage instances in a very optimal way, that your game’s FPS is kept withing good limits. 

Using this space partitioning method instead of a terrain grid is also beneficial for other uses where you do not want to use a terrain. Maybe you want to paint the foliage on a floating island or maybe you want to add vines to a building…

Editor

While the first version was developed for SpeedTree mostly, now you can throw in it any terrain detail that you might require, including but not limited to: trees, grass, small rocks, large rocks, metal scraps, objects with LOD’s etc… Your custom shaders are also supported, however you will have to tweak them a little if you want your instances to fade out nicely in the distance. And of course, keep everything within the limits that other engines or systems might expect, I really would not recommend adding mountains or huge cliffs.

Another very important part of the system is the tweaking of the settings for each individual foliage type, like if that type can cast shadows or what would it’s maximum draw distance be. It is an absolutely vital part if you want dense looking and optimized forests. Global density settings are also available.

FPS

The first part is the smartly batching of close instances in a single draw call using the ‘DrawMeshInstanced’ API, through the mentioned spatial hashing space partitioning method. The second part is the batching of distant tree billboards, in a single mesh and passing the rotation, scale and position as UV’s, with the setup taking place in the vertex shader. 

So you have a distant mountain and want to flood it with trees? No problem! You can have thousands of instances that when are billboards will probably get translated into 4 or 5 draw calls.

Ioan Lazu, Programmer 

Interview conducted by Kirill Tokarev

Follow 80.lv on FacebookTwitter and Instagram

Comments

Leave a Reply

2 Comments on "Moving UE4’s Foliage System in Unity"

avatar
Robytla
Guest
Robytla

It is available in the Unity Asset Store: https://www.assetstore.unity3d.com/en/#!/content/99233

rayen
Guest
rayen

where we can buy his asset

wpDiscuz