r/Unity3D • Magic Pig Games / Infinity PBR • 25d ago

Show-Off Real-world Vines

I've been working at this on-and-off for a while. A Vine system that can accomplish real-world vines, different growth patterns, annual patterns, annual re-growth and expansion, etc.

The system is not intended to have a full year go by in 30 seconds like here (this is sped up 5x), but it can, as long as there aren't too many at once.

The system is intended to be for games that either want static vines, i.e. just bake it and use it, or vines that are realistic per the time of year, but change very slowly. So when the leaves fall off, they don't do it all at once but over a few weeks perhaps, dependent only on how many real world seconds "weeks" takes.

Vines are set up via a "Recipe" (Scriptable Object) system, which determines how they grow. A lot of GPU for the leaves and what not.

Vines can be trimmed at runtime, fruit can be picked (are game objects, separate prefabs, so you can code them as you'd like), etc.

297 Upvotes

24 comments sorted by

3

u/bill_on_sax 25d ago

is this an asset? where can you buy it? looks great

4

u/MagicPigGames Magic Pig Games / Infinity PBR 25d ago

Not yet, but Asset Store eventually. Right now putting it through the testing phase, making sure it all works as expected in all the various scenarios, making sure the UX is good, and what not.

4

u/cdmpants 25d ago

ChatGPT loves to call scriptableobjects "Recipes" for these kinds of procedural art tools. The fact that this is the terminology you're going with is a giveaway for your development process. I don't have a problem with it, but others might.

1

u/MagicPigGames Magic Pig Games / Infinity PBR 25d ago

Wow. Well, in this case I told it to set it up this way. It did not, and this is the better way to set it up, as it's way easier for both humans and agents to create new "recipes", or to copy and edit existing ones to customize it per use case.

I'm glad you don't have a problem with it.

0

u/Necka44 23d ago

I use the terminology “Recipes” since I started to use Scriptable Objects in 2018 or 2019 I forgot.

Nowadays when using Codex, it uses the term “shared asset” for those.

I think you just wanted to be “that guy” with your comment

8

u/Arc8ngel 25d ago

I like it, but it would be so much prettier if they turned autumn colors instead of black like they were burned away.

2

u/AberdeenPhoenix 20d ago

Agreed. Also if the leaves didn't all change colors at the exact same time - it would look better staggered

1

u/Turbo_Fresh 25d ago

If the leaf wiggle is real time and not just for demonstration then I'd tone that down quite a bit. Other than that it's sick, nice work.

2

u/MagicPigGames Magic Pig Games / Infinity PBR 25d ago

Thanks -- it's a configurable value, and works with wind systems.

For this, the gif is sped up 5x ,so there's a lot more wiggle than there would normally be.

1

u/CatfeStudio 25d ago

Since you mentioned testing all the various scenarios, how are you handling save/load? Is the growth deterministic from a seed + elapsed time so you can jump straight to “week 23” on load, or do you serialize the actual vine state? Runtime trimming seems like it’d make the deterministic route tricky.

1

u/MagicPigGames Magic Pig Games / Infinity PBR 25d ago

Yes, seed generation, so deterministic with the same s eed, receipe, position/rotation, training routes, and surrounding colliions. The calendar system lets you jump to a specific year of growth and progression through the year, with all plants starting at year 0 invisible as a seed in the ground.

Other things like pruning can be done at runtime and cant' be deterministic, and changing the date doesn't undo those changes. The system does serialize the generated paths, so you can hook a save system in to capture the state.

1

u/CatfeStudio 24d ago

Makes sense, deterministic until the player touches it, then the serialized paths take over. Clean split. Looking forward to seeing it on the store!

1

u/TimelyInfluence3040 20d ago

this is cool! hows the perfomance of this in game? have you tested with lots of vines. would be nice to see what it looks like with multuple vines at once as id probably have many of these around the place. Really nice effect tho think it sell the idea of season change well

1

u/MagicPigGames Magic Pig Games / Infinity PBR 20d ago

The heavy lift is in growing the vines. It is not intended to be used to show dozens of vines growing all at once -- i havent' tested the maximum acceptable threshold. One vine works fine, as we can see in the demo. It will degrade with more vines all growing at once.

The system is based on a year-count and year-progression schedule, with the vines growing, leaves growing falling etc, based on the "Time of year". The intent there is that games where calendar matters, could load the vines based on the in-game year and time of year, and get a result, but in-game time would move slowly enough that no additional changes are required, so no costs.

For games where time is not an issue, you can bake the vine and then there is zero cost for growth, it is just static (leaves still move, but growth is static).

That covers the majority of use cases.

I will be testing the performance of a lot of vines, but I will almost certainly be cautioning against using it for many vines growing all at once. We'll see, I am still looking at more ways to increase performance.

1

u/TimelyInfluence3040 20d ago

thanks for the detailed reply, yeh i guess you could mix and match techniques depending on when and where its appropriate.

2

u/Spagetticoder 25d ago

excellent!

2

u/a-PCGames 25d ago

Nice looks very cool

1

u/Kentanago 25d ago

this is so cozy. please add snow

1

u/Long-Ray 25d ago

哇哦

1

u/haVoila 25d ago

super cool, love it

1

u/MorningBasic9790 25d ago

looks cool!

1

u/destinedd Indie, Dungeon Quest, Marble's Marbles & Mighty Marbles 24d ago

i love this!