Home Technical Talk

Animating swaying trees in Unreal 3

easterislandnick
polycounter lvl 17
Offline / Send Message
easterislandnick polycounter lvl 17
Hi, My next unreal level in unreal is going to be a forested canyon and I was wondering how I might go about animating the trees swaying in the wind. Are there any tutorials about adding animations to static meshes knocking around as I cant seem to find any. In the past I have animated branches with a panning texture but I want something slightly more realistic. I won't be animating them myself, a friend at work is going to be doing them in Max.

Any ideas?

Thanks, Nick

Replies

  • Kawe
    Offline / Send Message
    Kawe polycounter lvl 8
    well. as the name suggests. static meshes are static. you could animate them separately with kismet/matinee but uhm.. ya. maybe better to import an animated tree using bones and stuff instead. not entirely sure how you do that. gotta use the actorx exporter I believe.
  • easterislandnick
    Offline / Send Message
    easterislandnick polycounter lvl 17
    "Static meshes are static"!!!!!!!!!! I feel a bit stupid for not considering that! Any ideas what would be the best way of approaching it?
  • kamfriek
    can you have vertex shaders on static meshes in UE3?You could add some sine-controlled sway to geometry with that,increasing it along y-axis.Ben Cloward swayed grass quads like that,but it is essentialy the same thing:


    Out.position = In.position;

    if(In.texCoord.y < 0.9) {
    Out.position.x += sin(Out.position.x * frequency + (time/TimeScale)) * amplitude* 1-In.texCoord.y;
    }




    Look into UE3 documentation for the correct syntax,this one is copied from virtools.
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    you could use speedtree. It has automatic swaying.
Sign In or Register to comment.