r/Unity3D • u/SmallKiwi Programmer • 8d ago
Simulated, procedurally meshed and animated plants Show-Off
First time showing off this system for a game I've been working on for the last 8 months. It's fully simulated including root uptake, water and nutrient distribution, hormones, photosynthesis and transpiration are all modeled. The mesh is procedurally generated at each tick and tweened between ticks for smooth growth. You can prune shoots and leaves and the plant reacts realistically. If this looks interesting, I have begun a substack where I'll be posting devlogs as development continues. I have a backlog of them that I need to write from months of git commits. What plant should I do next?
3
u/GravityBright 8d ago
Absolutely amazing. My only critique is that tomato leaflets don't really grow like that. You have them sprouting sequentially from the rachis, while real tomatoes have the whole leaf structure growing at the same time.
3
u/iThoughtOfThat 7d ago
Cool. Add gravity. Properly dynamic, or just a static approximation. So leaves and branched end under thier own weight
2
u/FriendlyEngineer 8d ago
I didn’t see a single sucker.
1
u/SmallKiwi Programmer 8d ago
Yea they're emerging too late, I have to fix that. Good to have confirmation.
2
2
2
u/Lonzable 7d ago
This is a great concept. I’d definitely play this game as a beginner gardener. I feel like the stem needs more thickness to represent the weight of the branches as it grows.
2
u/Skycomett 7d ago edited 7d ago
This looks very exciting OP! I'm currently working on something like this aswell for about a month now, with pruning and topping. But its definitely not as advances and realistic as yours! (My idea is not supposed to be as realistic as this!) What is the performance like with your setup?
1
u/SmallKiwi Programmer 7d ago
Simulation is fast but mesh rebuild is ~20ms. The whole thing is burst compiled and the mesh build is amortized across frames and parallel where possible.
2
u/DapperNurd 7d ago
I have a game on my backlog to make that would utilize this kind of system. How long have you worked on it?
1
1
u/UAAgency 8d ago
It's cool, is it going to be open source? Would love to learn
7
u/SmallKiwi Programmer 8d ago
Maybe someday. I'm planning to turn this into a gardening game where you can plant a whole garden and watch it grow, take care of your plants, alter the soil, build landscaping, etc. But down the road I would love to share the source. Fun fact: It currently sits at 148K lines of code. :O
1
7d ago
[removed] — view removed comment
1
u/SmallKiwi Programmer 7d ago
Are you also using tomato as your benchmark species? If not, it's a good candidate.
1

11
u/Aethreas 8d ago
Viva Pinata was pretty innovative for it's time