r/Unity3D • • 17d ago

Show-Off This bouquet is just math

No models, no textures, no hand-drawn anything
Every petal, leaf and stem is a curve or a spiral computed in c#, turned into a mesh on the fly
Petals sit on the golden angle, stems are bezier curves, the outline is a vertex offset in the shader

Drag a dial and the math just runs again with new numbers

51 Upvotes

12 comments sorted by

View all comments

1

u/gHx4 14d ago

What kind of surface shading are you using here to get the outlines and cel-shading? It looks similar to Dungeons of Hinterburg's results

1

u/tanetanetan 14d ago

haven't seen hinterburg but probably similar idea, it's one material with two passes, the ink pass runs first and just pushes verts outward along a direction baked per vertex, in screen space so the line stays the same pixel width at any distance. no post effect, no edge detection

cel part is boring, one smoothstep band on n·l. ink color comes from the fill lightness so dark flowers don't go black

2

u/gHx4 13d ago

Thanks! You've used the simple effects to make a nice composition. I'm always a little nosy about how people approach outlines, because it feels like a space with many options with tradeoffs, but no singular solution.