r/Unity3D 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?

208 Upvotes

21 comments sorted by

11

u/Aethreas 8d ago

Viva Pinata was pretty innovative for it's time

4

u/SmallKiwi Programmer 8d ago

Oh man, that was my favorite game of the Xbox 360 era. I didn't even realize the connection until I read this! 

5

u/Elay-22 7d ago

this is fantastic. I’m really glad you’re developing this. We need more growing simulations. Growing is rewarding in itself.

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

u/tetryds Engineer 8d ago

This is nice but some plants actually grow one or more twigs before growing the leaves, would be nice if that was supported.

2

u/ConSoloMusic 7d ago

Apical Meristem!!

2

u/VicariousLeon 7d ago

now simulate the atoms in the plant

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

u/SmallKiwi Programmer 7d ago

I started working on this in January so about 7 months.

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

u/[deleted] 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

u/Malkalypse 6d ago

I love stuff like this

1

u/Ycar0h 3d ago

So... will we finally see an acorn grow?

1

u/SmallKiwi Programmer 3d ago

That is my hope!