Guide: Cuttable and Procedurally Placed Trees in UE4
Subscribe:  iCal  |  Google Calendar
7, Mar — 12, Jun
San Francisco US   19, Mar — 24, Mar
San Francisco US   19, Mar — 21, Mar
Anaheim US   23, Mar — 26, Mar
San Jose US   26, Mar — 30, Mar
Latest comments
by Poussasin
1 hours ago

Thank you so much, now I am confident to say that I know how to bake.

by Poussasin
2 hours ago

Very nice, thx for sharing!

by Tomer Feiner
3 hours ago

So there's still what to hope for from Gaben...

Guide: Cuttable and Procedurally Placed Trees in UE4
11 October, 2017

Christian Sparks (read our exclusive interview with the artist) has shared a thorough tutorial on working with trees inside Unreal Engine 4. The artist has recently conceptualized and tested different ideas to find out what works in UE4. The experiments were successful, so the artist implemented the results in Woodbound and then decided to show how you can add the system to your game. Here are the source files.

Here’s the beginning of the guide to get you excited:

The first thing that you’ll need is your tree mesh. In the image above, I’ve just used the Sapling plugin in Blender to generate a basic fir tree mesh, which I’ve added a crude set of trunk roots to. (This tutorial is more about the scripting and less about the modeling, lol.) Once you have your tree mesh, there are a few steps we’ll need to follow in order to get the pieces we need: 

After you’ve exported your tree mesh, duplicate it and set your duplicate aside, just as a quick backup. Locate a section along the base of the tree, just above where the trunk would begin, and add a 3x loop subdivide, squashing the loops down and placing them at around stomach height for your character on the Z axis. Once you’ve scaled and straightened out your loops, select the middle loop, and delete the vertices. From there, grab the remaining loop vertices, one loop set at a time, and fill in the empty space left using the F key. From there, you can select the top of the mesh in edit mode, and press P to separate the top from the bottom into separate objects, which you can then export as your trunk and tree top, which will serve as your visual objects after your tree has been, “cut.”

Okay cool, we have our meshes. Now let’s get to the fun part; the scripting. I created this project in UE4 4.16. The first step is to create a new project using the First Person Character template. In your project folder, create a folder and name it TreeTutorial. In that folder, make three more folders; Blueprints, Materials, and Meshes. Your meshes and their materials should go in the appropriate folders. In your Blueprints folder, create a Blueprint Actor, and name it something like BP_InteractiveTrees. The editor tree generation and the run-time generation are set up a bit different from each other, but since this is intended for runtime use in a packaged project, let’s start with the event graph.

Christian Sparks 

Make sure to read the full guide here

Leave a Reply

Be the First to Comment!