In trying to replace Sapling 2D leaves with custom ones, I struggle to orient them properly. Setting the Tangent value to 1 in the particle system doesn't have any effect (bug ?).

Leaf replacement orientation problem

The new leaves in this blend are in the right plane and their bases touch the branches. It must remain like that, but the new leaves should grow in the same direction as the old one (at the moment it's random). If you select one of the old leaves's face and choose "normal" for the orientation, you can notice that the x and y axis follow the sides of the old leaf, so the orientation information is in the mesh. But how can I get it to influence the particles?

  • The base of the new leaf must touch the branches because the tree will be in the foreground.
  • The orientation must follow the original leaf's one.
  • The whole foliage must be easily editable and form one mesh (to be able to make instances of it). For that, the current solution is to use a particle instance modifier. The answer can use something else, but it must have the same convenience (fast because having each leaf in one object makes blender slow at 2000+ leaves and easy to modify : modifying one leaf mesh modifies the whole foliage)

You could use Duplifaces. When the sapling addon creates leaves, each rectangular leaf is a single face (hex leaves are two faced).

Create your custom leaf and then make the leaves object a parent of your leaf. In the object properties for leaves turn on Duplifaces.

enter image description here

Now your custom leaf will be duplicated at the location of each original leaf. The object centre of your leaf will be at the centre of the original face and will be rotated to match the rotation of the original single poly leaf. Modifying the original leaf will adjust every leaf to match. The original poly leaves won't render, just your custom leaf.

enter image description here

To speed up the viewport you can add a decimate modifier to the leaves object to reduce the amount of visible leaves.

| improve this answer | |
  • $\begingroup$ Nearly perfect answer, however I can't instantiate the tree (that's why the "form one mesh" in the 3rd point). I tried to create a group and add groups instances, but only the original tree without the new leaves is visible. Copying the original tree + new leaf for every tree takes too much ram and time with scenes containing lot of trees like gardens, etc... I gave a vote, but it doesn't completely solves the problem yet. Maybe I should clearly write that the result must be "instanciable" in place of "form one mesh". $\endgroup$ – matali Aug 25 '13 at 10:30
  • $\begingroup$ Once you have the leaves setup, you can Make duplicates real (Object->Apply->Make Duplicates Real). This will allow you to join the leaves mesh with the trunk mesh (Convert the original trunk curves into a mesh). That will give you a single mesh that can be used for particle instances. $\endgroup$ – sambler Aug 25 '13 at 15:47
  • $\begingroup$ Tried it 3 times with different trees and blender Versions, every time it just freezes. The last one I let compute for 12 Hours before killing the process, no success. It works on test trees with less than 1000 leaves. $\endgroup$ – matali Aug 27 '13 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.