So... let me start off a little differently by saying: I'm not really all that thrilled with how this came out.
The basic idea was to model plants, flowers, as vertlet-based segments using distances constraints for each segment. In order to keep the plants upright, I added a new a "height constraint" to keep each vertlet a certain amount above the ground.
Additionally I rooted each plant's base point so it wouldn't wander off.
Next, I added rain by modeling each drop as a vertlet and testing it's previous and current coordinates again each segment (see below)
Here are the results:
You can click to toggle the rain. I think it might be improved using a better design for the plants (eg: that branching tree algorithm).
This partially scratched the itch I had to model dynamic plants, but not quite... Hopefully I'll turn up some more information on how to do properly at some point.
I think angular constraints might work...
Anyway, if you are interested, the code is available for whatever you like.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment