Download

Place foliage at run-time tutorial

I’ve already made my tutorial on how to interact with foliage at run-time (remove foliage, convert foliage into actor), but I feel that this deserves it’s own thread because I have a different video, and the other thread’s title is for interacting. This tutorial will show you how to place foliage at run-time. Note: This does work if you are using procedural foliage, but after you simulate the procedural foliage, you still need to use the foliage meshes that appear in the foliage tab as your reference for component indexes.

Edit: Have you not seen my 1st tutorial? Check it out here: Interact with foliage at run-time (Cut down trees, remove foliage, etc...) - Community Content, Tools and Tutorials - Unreal Engine Forums

I am currently working on a more visually appealing way to place foliage, if you have played CoD, it is a system similar to the way you place Sentry Guns & IMS’ in CoD, it will only let you place under certain conditions, and the foliage will change colors depending on certain factors. I will post that tutorial here once it is done.

Here is a quick demo of a more visual foliage placement BP that I have been working on, as you can see in the GIF, the foliage is green when it can be placed, and red when it cannot be placed due to it colliding with something. I will also be adding a factor where if the slope is above or below a user defined angle, it cannot be placed.

http://i1285.photobucket.com/albums/a586/jamendx3/Visual%20Foliage%20Placement_zpsxeefuciv.gif

This is very awesome, great job!

I’m glad you like it, I am working on a BP that will improve what happens when you want to place a mesh. It will show a ghosted green mesh, and you can walk around, and it will preview what the mesh will look like at that location, and it will align itself to the slope, so that trees can be tilted on a hill. I will also look into having the preview mesh turn red if you can’t place it in a location due to it being too steep or colliding with something else.

Nice work :slight_smile:

I’m aiming to apply it in C++, but this explained the system very well and so it’s going smoothly in code so far!

Many thanks for sharing!

Glad I could be of help, all I ask is that you subscribe to my YouTube channel to help me out.

Sure thing, I’m glad to subscribe to helpful content, keep up the good work!

I tried the cut down tutorial and I have to say it was easy to follow and worked very well. Will be trying this once next.

Using the foliage layer wasn’t something you could do in UDK I don’t think and so this opens up a lot of options so a massive
thank you for posting it.

Thanks for the support, let me know if you have any ideas for more tutorials.

hello, congratulations on a job, I would have just one question.

This blueprint also works in a multiplayer?

It does not, you’d need to make minor adjustments to have it work with multiplayer, which includes performing most of the actions on the server.