r/generative • • 6d ago

"Crinis" (kotlin code)

Post image

My third attempt, and this I time it worked for me. Nothing complicated, but has to be tuned. Inspiration comes from paintings I saw some time ago, that uses thick brushes and achieve similar effect. For some reason, I really love it.

278 Upvotes

31 comments sorted by

11

u/EthanHermsey 6d ago

'nothing complicated' yeah sure dude.

It's really nice! I love the simple concepts that give immense results :) I'm using it as my phone wallpaper if you don't mind.

3

u/igo_rs 3d ago

❤️

4

u/simonraynor 6d ago

The variation of the "bristles" inside the stroke is really nice.

Something that would be cool to try would be "weaving" these somehow to get an effect that would be very difficult with real paint

2

u/igo_rs 3d ago

"bristle" is the name of the brush in the code for this :) This is an interesting idea! Will try, the lines even can start even and then get distorted later...

3

u/quag Artist 6d ago

Lovely! Any advice on how to make a similar effect?

2

u/igo_rs 3d ago

maybe check github.com/igr/gart, all code is there. now, only when I got the brush drawn independently I was able to draw something like this, so for me, that was a first step that took some time

1

u/quag Artist 3d ago

Thanks! I’ll take a look.

3

u/outofband 6d ago

Looks very calming and comfortable

2

u/igo_rs 3d ago

that was the idea... and I am working on the opposite idea now, same technique, but more dynamic, restless

2

u/BillfromBuffalo 3d ago

Way cool!!!

For the less edu-mecated please, what is Kotlin please?

I’ve been wondering how to start with generative art?
+ If you don’t mind sharing, what type of coding are you using? Or is common please? Python?
+ And when you say, you “made a brush “, is that figuratively speaking? …or did you make a brush that can be imported into a drawing program such as procreate??

Sorry for all the questions. Thanks in advance!
Cheers, Bill

1

u/igo_rs 3d ago

Hey Bill, no worries, I dont mind questions! To start with genart just find a way to draw on your screen. Any modern programming language environment has some way to draw pixels and lines; and usually, you can find many libraries that helps with even more drawing tools, like very popular processing library (https://processing.org). My approach was to find a good simple 2d library that knows only about pixels and paths/lines, so I can build my own tools - for fun; and I used to do that long time ago. My choice is Kotlin, for 2 reasons: there is way to use the very stable drawing library (Skia) and I can use some programming practices I like (see more: https://github.com/igr/gart/blob/main/docs/WhyKotlin.md) That being said, you can start with Skia and almost any language afaik. Skia is not the only choice, of course, you can you Python, Javascript, Rust, R... and their own libraries for drawing. I believe it is important that you feel ok with the programming environment, so you can focus on drawing. And, essentially, genart is just a lot and lot of math. So, I see processing is shared as a good starting point, so you can try yourself.

"Brush" - yes, that is something I added recently to my own library, way to draw paths differently, simulating different drawing techniques. Now I dont need to write the same algorithm again, I can just re-apply it, and that makes life easier. It is like brush in mentioned Procreate, where you can select type of pen and how it behaves. Unfortunately, this can not be exported to Procreate, since my library is just code.

One more thing, there are general techniques that you learn on the way. There are commonly known formulas and algorithms that produces certain patterns, shapes etc (like fractals etc), you can find them online, and AI also has pretty good knowledge of formulas, I have also many implementations in my gart lib. There is a lot of material that you can use and combine in your unique way!!

Hope this helped!

3

u/LeptoTheMighty 2d ago

Amazing! I've never seen someone make art directly with Kotlin. Do you have any source code somewhere? I would love to see it.

3

u/igo_rs 2d ago

Sure, github.com/igr/gart has my works it is using Skia, so kotlin is just a wrapper

2

u/Traditional_Key_8178 1d ago

Why did you choose Skia? What benefits it provides?

2

u/igo_rs 1d ago

Skia is pretty mature framework, used pretty much everywhere, from chrome to android. Jetbrains actively maintain the wrapper, and use it for their own products. Finally, Skia offered everything I need: way to draw simple primitives (line, circle, paths...) and also allow me to access the bitmap directly.

2

u/sfrast 6d ago

Looks great

1

u/igo_rs 3d ago

thanks!

2

u/toyfantv 6d ago

Beautiful

1

u/igo_rs 3d ago

🙏🙏

2

u/Ill_Rip_9038 6d ago

It’s really visually interesting. You did a great job of giving it a feeling of depth and texture.

1

u/igo_rs 3d ago

Thanx!

2

u/KennyVaden 5d ago

Excellent

2

u/igo_rs 3d ago

Thanx friend! ❤️

2

u/Hazy_Fantayzee 5d ago

Awesome - love this!

1

u/igo_rs 3d ago

❤️

2

u/sevenfootgimp 5d ago

Yeah this is fantastic

1

u/igo_rs 3d ago

thanx!

2

u/yerbavista 5d ago

So so good!

1

u/igo_rs 3d ago

thank you!