Home Technical Talk

small environment animations

polycounter lvl 7
Offline / Send Message
SanderDL polycounter lvl 7
Hey

For a while I've been wondering how one can achieve small animations like flags or foiliage waving in the wind. Speedtree has something like this I think but I don't want to use Speedtree for everything.

I'm using UDK alot but I'm also interested to hear how it works in other engines.

Replies

  • PixelGoat
    Offline / Send Message
    PixelGoat polycounter lvl 12
    Often for tree foliage animation you use vertex colour to determine how the foliage planes should move. The RGB channels then control different aspects of the movement.
    For example:
    Red: controls detail movement, the tiny rustling of the leaves
    Green: controls the up and down movement of the "branches"
    Blue: phase variation of the other 2 channels. so not all planes move in perfect sync with each other, that would look bad :)

    I have often applied the same system to flags aswell.
  • Ben Apuna
    Animated textures:

    IIRC a (Constant * Time) -> Sine -> Time input of a Rotator -> Texture Sample.

    The Constant controls the speed at which the texture will move, and the Sine makes it go back and forth rather than in a complete circle.

    The texture will rotate around it's center and should be painted to have branches or foliage radiate from that point.

    I think there was a way to move the point of rotation with a Panner but I can't quite remember where it went or how it connected to everything else.

    EDIT:

    lol, never mind about the Panner the rotation center is defined in the Rotator node's Center X and Center Y properties.
  • SanderDL
    Offline / Send Message
    SanderDL polycounter lvl 7
    Interesting. So you are not animating the geometry itself but only the textures?
  • Ben Apuna
    I suppose you could animate geometry, though I'm thinking that only animating textures would be cheaper for performance.

    Way back in early Unreal 3 times long before UDK I made a skeletal actor of a palm tree that reacted to a physics volume to simulate wind. It was kind of cool, but it wasn't very performance friendly.

    There are probably new and better ways to animate geometry with UDK but I haven't really looked into it yet. Things like this:

    [ame]http://www.youtube.com/watch?v=cfTzUwDeUbM[/ame]

    or this

    http://www.forecourse.com/unreal/BugPaint/BugPaint.html

    This type of technique might be a pretty good way to go about animating environment props.
  • SanderDL
    Offline / Send Message
    SanderDL polycounter lvl 7
    Cool thanks. I didn't know you could do all sorts of cool stuff this way. :)
Sign In or Register to comment.