Announcement

Collapse
No announcement yet.

Wind and grass: problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wind and grass: problem

    Hi

    I've been following other tutorials and threads on this site. My aim is to set up tree branches gets blown in the wind. Now, I've had a bit of success setting up the complicated wind material that takes account of world position to vary the sway but I've two big problems left:

    1. Branches move in unison
    How do I get the branches of a tree to exhibit slightly varied rates of sway? At present all my branches sway in unison. So, they ALL blow left...then they ALL blow right

    2. Everything happens on the same plane
    The tips of the branches SHOULD wobble and sway about all their axes. I'd like the branch tips to trace out little figure-eights and wobbly paths. How do I achieve this? At present they're confined to move only in one plane

    My tree is a single object and I've got vertex colouring to restrict the wind effect to the branch tips.

    I'm stumped, cheers.

    Barry

    #2
    you have the answer already - use another vertex color channel (the red channel for example) to add randomised data to each branch

    alternatively i believe there is Object World Position and World Position available , as well as something called PerInstanceRandom that ive not managed to get to work yet.

    Comment


      #3
      Here's a screen-capture of the problem. It's an mp4 file:

      http://upload.yomego.com/files.php?f...e35949ed95dcd3

      Barry

      Comment


        #4
        strangelet...

        ah, you'll need to go slower than that for me. I don't really understand how to use another vertex colour channel. Can you point me to an example of what you're talking about?

        Barry

        Comment


          #5
          its simpler than you think. when i say *channel* , bear in mind that *color* is 3 channels, red green and blue.

          so if you limit yourself to painting in one color channel at a time (mesh paint supports isolating channels like this) , you can have up to 4 *data channels* out of the RGBA (Alpha) that vertex color gives you.

          if you convert your mat so that instead of using all 3 channels of the RGB output at the same time, use just one color channel of it. that will free up the other channels of the RGBA vertex color input for other use.

          THEN you can use another color channel to paint a value that could represent timing offset for your wobble setup.
          you can get seperated R G B and A channels out of the vertex color node i think.

          hope this helps.

          PS, just to clarify, i think UDK only supports 1 set of vertex color data per mesh, so there are no more vertex color *channels* like uv channels.

          Comment

          Working...
          X