Home Technical Talk

Animating lowpoly grass clusters

polycounter lvl 3
Offline / Send Message
KeirKieran polycounter lvl 3
I have a lowpoly scene with clusters of grass that I want to put a little sway into. How do I do this so that I can just duplicate the grass and offset the animation here and there?

Or am I doing this completely wrong? Suggestions?

Replies

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    What software? What engine?
  • KeirKieran
    Offline / Send Message
    KeirKieran polycounter lvl 3
    Yeah, I'm dumb. This is why you don't post questions at 1 in the morning. This is just in Maya for exporting to Stetchfab.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Do just that: keyframe animate/clone/offset the keys. This is basic animation. Do you have any experience animating?

    Export to sketchfab as .fbx and bake the keys. The sketchfab site has a set of simple guidelines to follow.
  • KeirKieran
    Offline / Send Message
    KeirKieran polycounter lvl 3
    Duplicating the object doesn't bring over the animation because I'm animating a cluster of vertices at the top of the grass. If I make the duplicate an instance I get the animation, but then I can't offset the animation because its all driven by the first cluster (unless I'm missing something there).

    Now, I can Duplicate Special>Duplicate Input Graph the cluster itself and that gets me a copy of the grass as well, but I can't move the cluster node itself, because of course that warps the grass. 

    The best answer I could come up with was duplicating the clusters, moving the new grass about, and then using outliner to select each one of the clusters at the central location (they all pile up in the exact same spot) and offset the animation randomly. It works, but its not very user friendly and if someone was doing a large scene, it would get unmanageable. 

    So, my concern is that I'm missing an easier path to this. Can I bake the animation of the cluster to the base mesh and then offset that? Is clusters the right way to go at all?
  • Eric Chadwick
    The right way to go is with a vertex shader. But I suspect Sketchfab doesn't let you import your own shaders. For example 
    https://www.youtube.com/watch?v=B4j5tzAIflU
  • KeirKieran
    Offline / Send Message
    KeirKieran polycounter lvl 3
    No, that won't work for Sketchfab, but I'm just using Sketchfab as an easy export/display. This video is really great and I'll definitely work through it. Thanks a lot.
  • throttlekitty
    It looks like they might support instances, have you tried that? Another solution is to combine all your grass meshes into a single one, and then either bone or cluster animation for the whole set. You'd only need one cluster/bone (well, two bones), but you can't rotate them. Or blend shapes.
  • KeirKieran
    Offline / Send Message
    KeirKieran polycounter lvl 3
    The issue with both of those ideas (and I think instances will work once it's saved out for Sketchfab), is that all the grass would be waving at the same time. I need to be able to offset the animations.
  • Eric Chadwick
    Can you place a bone at the top of each grass clump, then drive those bones with an animated noise pattern?
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Can you place a bone at the top of each grass clump, then drive those bones with an animated noise pattern?


    The trouble is that Sketchfab animation is limited like most game engines in that you can't import constraints/custom attributes/controllers/etc. It only accepts baked vert anim from bone hierarchies.  
  • Eric Chadwick
    But can't you drive the bones with a meta-controller, and bake that down? I'm not a Maya guy, but I know in 3ds Max I can have a control rig which is not exported, driving a game-rig which is the one exported, which in turn drives the vertices. I keep hearing Maya has deeper rigging access than Max, so a control rig has got to be possible.
  • throttlekitty
    I apparently wasn't very clear-headed in my previous reply, sorry about that.

    @KeirKieran SouP has a TimeOffset node, but it connects to a shape node, which you're not going to be able to do with instancing. Gonna agree with musashidan that all the grass meshes will need to be unique anyway. So this TimeOffset node would be a simple solution for you. If there's a lot of them already in place, it could be scripted, instead of inserting the node by hand.

    @Eric Chadwick The rig you describe is also easily doable in Maya and baked down to standard animation channels, pretty standard practice. (unless you're a dummy like me, and trying to drive a shader...)
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    But can't you drive the bones with a meta-controller, and bake that down? I'm not a Maya guy, but I know in 3ds Max I can have a control rig which is not exported, driving a game-rig which is the one exported, which in turn drives the vertices. I keep hearing Maya has deeper rigging access than Max, so a control rig has got to be possible.
    Yes, Eric, I'm on Max aswell but I know that Maya/Max .fbx process is pretty much identical for SF. So any controllers driving bones, and ultimately verts through skin mod, will bake.
  • KeirKieran
    Offline / Send Message
    KeirKieran polycounter lvl 3
    Thanks a lot for all the suggestions. For this project, I'll keep it on the simple side. It's not a very large scene (SketchFab has limits). My real concern was what to do if I was working on a large scene (away from SketchFab) and I've got some solid options here.
Sign In or Register to comment.