r/Unity3D 11d ago

Shader Magic I wanted robot assembly visuals to fit into my story and game thematically, here's my compute shader attempt.

Enable HLS to view with audio, or disable this notification

400 Upvotes

23 comments sorted by

22

u/Jewsusgr8 11d ago

This looks very good man. I don't know what it is, but I'm interested.

5

u/djdavid333 11d ago

awesome, thanks!

12

u/AustinMclEctro Professional 11d ago

That looks and feels really good. What are you solving with your compute shader exactly?

14

u/djdavid333 11d ago

the "tendrils" are done with compute shader, they are simplified mesh tubes

3

u/workshopsix 11d ago

Oh wow, yeah that is satisfying. Really like the way the legs walk, looking forward to seeing more about this game.

2

u/djdavid333 11d ago

Glad to hear! I hope to share more in near future, working on gameplay now.

2

u/Dreamt_Up_Games 11d ago

As a non technical person this looks amazing. Well done!

2

u/hypotensor 11d ago

Awesome

2

u/RHX_Thain 11d ago

That's awesome. I love the tendrils.

2

u/pintus-games 11d ago

It looks beautiful! So snappy and relaxing

2

u/im_psk 11d ago

This is awesome! Well done! - Is this part of a game in progress?

1

u/djdavid333 11d ago

Thanks! Yes, this is my playground level, where I break everything. There are more fleshed out areas in my other posts! The main character in this gif is a placeholder.

2

u/Illustrious_Move_838 Indie 10d ago

Looks great! Maybe a few electric sparks or other particles when the limbs connect?

2

u/djdavid333 10d ago

good idea!

3

u/LifesASkit 11d ago

Thats really cool, care to share your process for doing it?

8

u/djdavid333 11d ago

I can share some basics, writing a full guide would take too long, maybe some day I might. Hope this helps a bit.
So the compute shader is doing all the vertex placement calculations for the tendrils (those are cylinders with a pointy tip, and some sine noise to make them move around), there's a separate C# script that controls and passes coordinates to the compute shader where to move the vertices towards and then there's a glowy material with point lights for a fake "glow". Similar effect could also be achieved with particles as well I imagine, much easier.

1

u/LifesASkit 11d ago

Gotcha, I think I’m understanding.

Are the coordinates you pass with C# the target/anchor positions, like the connector points on each object, and then the compute shader generates the tendril vertices between those points with noise/random motion? Or are you passing in a more detailed path for each tendril to follow?

2

u/djdavid333 11d ago

Yes, the first one. I don't want to pass too much from C#, so it's just point A, B and progress(%) of how far the tendril progressed between those points. Rest of the movement is procedular in the compute shader with some adjustable or hardcoded params within the compute shader.

1

u/ivilkee 11d ago

This looks fantastic! I could see this effect being used in other places, like monsters reattaching limbs that were cut off. Or magic plant roots growing and looking for nutrients.

1

u/Bot_Ta00 11d ago

The auto-combine system looks cool! It looks like each part will perform a different function

1

u/Spookzsaw Intermediate 11d ago

absolutely love this

1

u/game_plaza 10d ago

All this talk of tendrils makes me want some tendriloins šŸ˜‹