Home Technical Talk

Real Time Plant Growing

polycounter lvl 11
Offline / Send Message
jocose polycounter lvl 11
Hey everyone,

I have been working on getting a plant growing in a 3D engine for awhile now I originally started with unreal and have since tried out the idea in several other engines.

The plant needs to grow along a curve and branch out over time. I am accomplishing this by deforming the mesh by a curve in a 3D package and then exporting a vertex animation. When the plant gets to a certain point, where new limbs or features need to be added, I swap out the mesh and continue the process until it is fully grown. The effect is fantastic but of course I can't have any physics on the plant while its growing or have any reactive animation to damage or anything else for that matter.

I was just curious if anyone had any tips or ideas for accomplishing this.

Its not something I have seen in any game before, I realize that its an expensive process in terms of performance but its going to be the focal point of the projects so it doesn't really matter if it takes a bit of a hit.

Replies

  • Mechadus
    Options
    Offline / Send Message
    Ive never done it ingame before, but I have made plant growing animations for a few different types of plants. Sounds like your approach is probably the best one I can think of, but if you really want to go nuts you can research L-systems... its a type of math formula that can be used to describe fractal growth... Best of luck to you tho, that would be a very cool feature to have in a game.

    -N
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    Using fractals would be really cool, but it would have to be part of a full blown simulation because part of what I am doing is guiding the plants growth into artistic shapes as well as towards light sources or other objects. Also the process is reversed as the plant takes damage so it can "ungrow". I am also thinking about ways to make it wilt using separate reverse or wilting animations.

    Thanks for the idea though it could be part of the solution depending on how I end up doing the overall effect.
  • michi.be
    Options
    Offline / Send Message
    michi.be polycounter lvl 17
    Farcry2 got growing plants. how is it done there? ive seen it in some tech-demos.
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    you can wath plants growing in farcry 2? must be a pretty boring game o_O

    no real help on that topic, i guess it would take some custom code instead of using a premade toolset such as unreal
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    probably possible using particles,- but then again it really depends on what the engine offers you to design a motion for it.
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    michi.be wrote: »
    Farcry2 got growing plants. how is it done there? ive seen it in some tech-demos.


    Here is a Farcry 2 tech demo of growing:

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

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

    I wasn't aware that was a feature thanks for pointing that out. It seams like they may just have a parent child setup where smaller limbs are children of larger limbs which are ultimately parented to the trunk. Then they just scale the leaf cards and limbs.

    They might be using fractals to get random growth patterns or something.

    I would really like to get in close and see how seamless the limbs are where they attach. I might have to pick it up and take a look.

    Its really interesting if anyone has any ideas how they are doing it or know if they ever talked about how they did it please let me know.
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    renderhjs wrote: »
    probably possible using particles,- but then again it really depends on what the engine offers you to design a motion for it.

    This is really is something I am just trying to get working as a stand alone concept. I am more than willing to work with my programmer in an engine that offers full source to make something from scratch or use existing features of a modable engine. So it isn't stuck in anything specific right now.

    In fact it may determine which engine I wind up using.
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    there is plenty research on the topic, e.g
    http://www2.tech.purdue.edu/cgt/Facstaff/bbenes/private/papers/Benes09EGNat.zip
    google more on "interactive vegetation" and so on, you should find other research work

    but this is less of an artist issue than programming. If the game heavily depends on the concept, then it might really need a complex solution... and sounds more like a custom engine modification is needed.
  • FicWill
    Options
    Offline / Send Message
    FicWill polycounter lvl 17
    Morph targets may be of use as well.
  • Mechadus
    Options
    Offline / Send Message
    I was thinking more about this last night.. what if you developed a system where an invisible spline reaches toward the goal (light or whatever), while a visible mesh grows along the spline dynamically? Leaves and branches could be done seporately using the morph target idea, or vertex animation, and then spawned from the vertex locations, or percentage values of the guide spline. I know nothing of programming, so I might be spouting nonsense, but thats sort of how the old "Trees Designer" plugin for lightwave worked, so I assume it might be possible to make a realtime version.

    -N
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    Thanks for all the ideas everyone. I was thinking about this and was wondering if it would be possible to do with a bone rig.

    Maybe I am tackling this from the wrong angle since I want to artistic control over what's happening. The problem is that I would need many many bones in order to get this to work correctly possibly upwards of 50 or 80 on a 10,000 triangle mesh. Does anyone have an idea of how this would perform in real time or problems with using bones in this way. I would be scaling the bones like crazy and have to write a lot of scripts in my 3d package but maybe this is a better route.

    I know bones can be very expensive....

    Any thoughts would be appreciated.
Sign In or Register to comment.