2011-09-20

Blow Trees Blow!




This is a post I've been wanting to do in a while, and am just now getting to it. I've tried all sorts of things with trees: rpcs, proxies, billboards, high poly trees. None of them really made me happy until I got them moving in the wind. There are several ways to do this, but here I will show you one way that I think works that is simple but gives fairly good results.





For this example, I just opened up one of my trees from my library of foliage. Select it, go to the modifier tab, and select vertex mode.






Now scroll down, open the soft selection roll out, and turn it on where it says "Use Soft Selection".  For this example I set my Falloff to 8'.  This will vary depending on the size of your tree.  Now when you click on one vertex, you will notice the colors around your vertex.  This is creating a soft selection from your selected vertex out 8' in all directions.





Now select various vertices on the outside edges of your tree until it looks like the image on the left.  Be sure to rotate your tree around to select all sides.  Be sure that the soft selection stays in the leaves and branches and doesn't creep into the trunk.




Now for the unconventional part:  With your vertices still selected and still in vertex mode, add a Noise modifier.  Under "Strength" for this example I set it to 8" in x,y, and z.  Also, check "Animate Noise", to change the noise over time.  You will notice that in your time-slider below there are keyframes at the begining and your first and last frame.

I think this step is unconventional because it is only applying the noise modifier to the selected vertices.  I often use this practice, where I will apply another modifier while the lower stack is open in face or vertex mode.  I'm not sure if Max was designed to do this...but it works.  That's it!  Now your tree is animated to blow in the wind very naturally.

You may notice that this can be very computationally heavy for your scene.  There are a couple of workarounds:

-Un-select your tree when navigating.  Having your tree selected when tumbling/orbiting around can be brutal.  Especially when you have the modifier tab selected!

-Set the view of your trees in your viewport as a bounding box.

-Proxies in this example won't work.  MR proxies will not respect the modifier applied at the vertex level.  So you can use x-ref objects instead.

-Lastly, you can render your tree out as an image sequence, and use the footage as a texture map onto a plane for your scenes.  I used this technique in the example above.

11 comments:

  1. Yeah I got it , It`s great experience I think. I try to test it for huge grass area!

    ReplyDelete
  2. Good stuff, easy to make and very usefull. Thanks.

    ReplyDelete
  3. That's actually a really good trick... I am looking forward to using it for some stuff I have coming up in the future.

    ReplyDelete
  4. The trees look flat for some reasons. The animation of the leaves looks great through.The over all presentation is not as awesome as Alex Romans work.

    ReplyDelete
    Replies
    1. The trees may look flat, because they are in my final animation. When I posted this, this was simply because at the time I could not save proxies with animated keys. Now days you can do many different things now with vrays alembic mesh support. I don't consider any of my work to be halfway close to alex's pieces, but thank you for the comparison ;)

      Delete
  5. Hey there, i have a problem when i use this method. When i use the animated noise, my leafs all move in the same direction uniformly. They don't 'wiggle' like in your demo video. Any suggestion as to how i can fix this? Thanks.

    ReplyDelete
    Replies
    1. Is your noise set to all 3 x,y,z directions?

      Delete
    2. Fixed it :) Yes, the noise was set in XYZ directions, but it turned out that I had to set my scale in the noise modifier very low for the correct effect. I guess my tree is much smaller then your example.

      Delete