Feb
06

Precise distribution of trees using particles

By

Since I started using 3d trees in my work it also became clear I must use instances as much as possible and for large numbers distribute them using the particle system. I have already written about distributing objects using particles and I think settings in that post still apply to the current Blender version (v. 2.65). This method can be applied to areas of random growing vegetation. You can take this one step further by placing the trees in a precise pattern, something I often use in architectural renderings, for trees in parking lots or rows along a road, but still keeping the random scale and rotation features that come with particles and improve the repetition issues.

Shown above in my “wavy road” test scene, I just wanted one row of trees aligned to the side of the path. I used the same distributing mesh with a second particle system to add some tree grates. Either object or group distribution can be used.

The idea is to use the “verts” setting in the Emitter panel of the particle system, with “random” unchecked. This means the distributed objects will be placed only on the vertices of the emitter mesh (aligned with the object origin exactly on the vertex and the x axis pointing up). So you’ll be able to place the trees exactly where you want them by adjusting the emitter’s vertices.

"Verts" setting

There are a couple more things to getting this right:

1. the number of particles must match the number of vertices in the emitter, or else you get missing trees – or worse, several trees overlaid (and like me puzzle about the tree density and long render time). The number of vertices in a mesh is displayed in the Info header bar at the top of the standard Blender layout.

vertices = trees

2. the emitter mesh has to have faces not just vertices. This statement might be a bit unclear, but at first I thought I could just extrude a vertex along a path, or just place unconnected vertices where I needed them, but this doesen’t work, as the vertices normals start pointing in unexpected ways when there are no faces between them. You need them all pointing up as your tree should grow so your row of vertices must have faces, mine is a row of elongated triangles. If you are making two parallel rows, you can make your mesh from rectangles, or for a parking lot a larger grid mesh. It makes no difference as long as you uncheck “emitter” in the render panel of the particles tab. Also check normals in the the properties shelf (N) Mesh Display panel to see where your normals are pointing.

Check emitter normals

Two rows

 

Some work examples of this:

The only issue left is finding that elusive perfect tree 🙂

Have a nice Blender day, hope this was useful!

 

 

 

  • It all makes sense to me. I love the idea of using the triangles. such a simple idea , but I am sure I would have struggled with it if I had tried to figure it out myself. Thanks for another useful tutorial.

  • Pedro

    And is it possible to tell blender to pick randomly between a set of different trees?

  • rudolf

    Nice idea however it’s not that much work to make instanced copys of that tree manually^^

    The tree itself is not bad, sapling?, But the leaf distribution is not perfect, i have seen a tutuarial on youtube… he created a tree with sapling but used weight paint for better distribution…

    Aaand give the tree an arbitary rotation!, should be posible with a particle emitter.
    The light looks odd, because the shadows don’t match the background.

  • rudolf

    *… but used weight paint for better _leaf_ distribution

  • Oana

    Hi! Glad to receive your feedback 🙂

    The tree and scene were not really the object of the post and I didn’t spend too much time on that, but you are right, background looks really cloudy so I softened the shadows as for sun filtered through a break in the clouds.. well…busted
    And although I love Sapling I confess I had to buy Onyx to get the results I need and I’m still working on that one too. My trouble is I don’t have enough time to spend on editing trees myself. The weight paint distribution sounds like a very good idea, I’ll look up the tut.

    As for the technical part:

    @pedro, yes you can use the “Group” option in particles with a group of different trees, and you’ll find there useful settings for randomness and occurrence of a certain tree in the total number. (with “use count” you can make them random but have one tree appear the most). I’ve written more on the subject here.

    @rudolf: Yes this can be done by instancing too, and I agree I would’t bother with some 5-6 trees in the scene. But it’s not effective at all with something like 20-30 trees or even more throughout a large scene, believe me I tried. You have to scale and rotate each by hand to get a random look, and there you are, later changes to the whole set are more difficult to make. With particles it’s very easy to try out more tree models, more or less randomness, change scale without getting too much into editing the tree itself. If you have to change the tree positions (like when you get a different parking lot layout right before deadline!) it’s easier to hide the particles and adjust the emitters vertices than move the tree instances themselves. You could put the trees in bounding box mode so your 3dview doesen’t get stuck, but I feel it’s too cumbersome. With particles you can also do multiple random tree types like Pedro pointed out. The trees in the test scene are randomly rotated too. Maybe you don’t notice it because I picked a rather symmetrical shaped tree, but it would show badly if I removed the rotation thing even on this type of tree.

    Actually the requests I usually get from clients on the issue of trees are not about the realism or it’s species or randomness, but more on the lines of size and density as to hide or show parts of their project! so I have to be able to change the tree in a hurry if my own preference turns out too much or too less. Trees in architectural projects are often supporting prop rather than the main character.. though it’s true good trees can upgrade an image beyond hope! 🙂

  • Pingback: Precise distribution of trees using particles for architecture | Blender 3D Architect()

  • Alain

    If once the “Advanced Array Modifier” for Blender would be finished we had those possibilities like in Multiscatter von 3DS Studio Max.

    So let’s push Fabio Russo to finish his works 😉
    See here: http://ruesp83.com/2012/02/01/ama-0-5-beta4/

    Kind regards
    Alain

  • Warcos

    WOW … excellent trick …
    with this technique I can finish faster

    gracias y saludos

  • Oana

    Hi Alain! Yes, the Advanced Array would be of great use, much easier to set up, hope it will make it in future official releases.
    Thanks for linking to my post in your excelent blog 🙂

    Saludos Warcos 🙂

  • why not use dupliverts instead? I think it has an easier setup, it will always fill 100% without overlapping and no faces needed

  • Hi, of courae this paragraph is truly good and I have
    learned lot of things froom it on the topic of blogging.
    thanks.

  • Pingback: Menongue International Rowing Centre : AZVAvisuals()

  • I would have used Empties with DupliGroup instead. Empties give you complete control of orientation and position (you could have vertical trees even if the street had an incline.

    http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Objects/Duplication/DupliGroup

  • The rooms and balconies of hotels in Fort Wayne Indiana are modern and fully-equipped so that the visitors enjoy to the fullest.
    On the website, we will get hundreds of products and interesting
    collection. Copper kitchenware has all of the features essential that you could possibly need in an amazing cookware set, and are available all kinds of designs,
    shapes, sizes, and prices.

  • Jo Hirsute

    Very usefull and simple. Thank you very much 🙂

  • does this work with animations or single frames only?

  • Sorin Vinatoru

    Will work with animations too