aeva,
@aeva@mastodon.gamedev.place avatar

I made a voronoi diagram :3

RedGlow,
@RedGlow@mastodon.gamedev.place avatar

@aeva voronoes.

aeva,
@aeva@mastodon.gamedev.place avatar

can you guess why my voronoi diagram looks weird :3

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva it's not a L2 metric i can tell that much

aeva,
@aeva@mastodon.gamedev.place avatar

here's another version :D

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva did you squeeze the aspect ratio?

aeva,
@aeva@mastodon.gamedev.place avatar

@lritter seems to be the case, but it would still look weird without

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva i have two attempts.

is it based on abs(dx) + abs(dy)?

aeva,
@aeva@mastodon.gamedev.place avatar

@lritter doubtful

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva it can either only be this or max(abs(dx),abs(dy)). and if you think it's neither, then i'd say it still is, just hidden within whatever it is you did.

aeva,
@aeva@mastodon.gamedev.place avatar

@lritter it's possible! I'm doing very little here

aeva,
@aeva@mastodon.gamedev.place avatar

@lritter I posted the ans did you get it right?

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva my closest thought was "she's probably just spamming objects. naah can't be that easy."

aeva,
@aeva@mastodon.gamedev.place avatar
18+ aeva,
@aeva@mastodon.gamedev.place avatar

The rendering is orthographic, and I'm drawing a cone per seed point. If the base of each cone were to be round, it would look like a regular voronoi diagram, but you can change the distance metric by dropping the vertex count of the cones. These have just 3 verts in the base :3

aeva,
@aeva@mastodon.gamedev.place avatar

I think I like this one best so far.

aeva,
@aeva@mastodon.gamedev.place avatar

so idk what this is worth, but I realized that you can also just give every voronoi cell a different metric if you want and it'll just work lol. I'll have to try that out some other time.

ruojake,
@ruojake@mastodon.gamedev.place avatar
aeva,
@aeva@mastodon.gamedev.place avatar

@ruojake woah cool :O

jon_valdes,
@jon_valdes@mastodon.gamedev.place avatar

@aeva @ruojake a nice trick you can use for drawing voronoi diagrams is to use the depth buffer. You draw a shape around the cell, and give each pixel a depth value based on distance to the center of the cell. Then let the depth buffer figure out which cell is closest. And you can have each cell compute distance however it wants 🙃

aeva,
@aeva@mastodon.gamedev.place avatar

@jon_valdes @ruojake that's the technique I used above

jon_valdes,
@jon_valdes@mastodon.gamedev.place avatar

@aeva @ruojake and here I thought I was carrying some secret knowledge...

aeva,
@aeva@mastodon.gamedev.place avatar

@jon_valdes @ruojake I don't think it's well known

aeva,
@aeva@mastodon.gamedev.place avatar

@jon_valdes @ruojake or at least, raster techniques seem to be generally less popular than compute techniques these days

aeva,
@aeva@mastodon.gamedev.place avatar

@jon_valdes @ruojake apparently the technique was first published at SIGGRAPH '99

ruojake,
@ruojake@mastodon.gamedev.place avatar

@aeva Another go at it, this time adding noise to the metric. I like this one a lot! https://www.shadertoy.com/view/lcGSD3

aeva,
@aeva@mastodon.gamedev.place avatar

@ruojake kinda reminds me of splatoon

ruojake,
@ruojake@mastodon.gamedev.place avatar

@aeva It's splashy for sure

18+ lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@aeva Aww, smart :3

18+ aeva,
@aeva@mastodon.gamedev.place avatar

@lisyarus ty ^_^

lritter,
@lritter@mastodon.gamedev.place avatar

@aeva could be quite efficient as long as overdraw is low

aeva,
@aeva@mastodon.gamedev.place avatar

@lritter lots of overdraw in this case because I'm erring towards very large cone bases but I think it still comes out ok because of early z elimination

18+ peacememories,
@peacememories@chaos.social avatar

@aeva wow, I never thought of doing voronoi that way. Is that an established optimization? something you came up with just now? also it makes for some really cool looking isometric cityscapes apparently (at least that's what my brain sees)

18+ aeva,
@aeva@mastodon.gamedev.place avatar

@peacememories I have no idea if this is an established method. I just sat down to implement JFA with point drawing and then realized that was way overkill.

kaynSD,
@kaynSD@peoplemaking.games avatar

@aeva this is like nerd sniping catered entirely for me... I want to guess it's a distance calculation being wrong somewhere given the diagonal angles?

kaynSD,
@kaynSD@peoplemaking.games avatar

(It kinda looks like it's doing Manhattan Distance but I don't see any horizontal lines so that confuses me a little)

aeva,
@aeva@mastodon.gamedev.place avatar

@kaynSD it's like manhattan distance if manhattan was on a triangle grid instead of a square grid

kly,
@kly@fosstodon.org avatar

@aeva I WAS supposed to doing some relatively boring routine api-database coding today, but instead I seem to be reading up on voroni diagrams and taxicab geometry and ... well... I obviously have no idea of why yours look wonky, but this is still way more fun than yet an other rest api.

aud,

@aeva ​:black_sparkling_heart:​ a Voronoi diagram. What does John Snow know, does he know things? Let's find out.

(can be computationally demanding and oh so fun!)

aeva,
@aeva@mastodon.gamedev.place avatar

@aud oh this one is extremely cheap to render. mirth inducingly cheap. mind bogglingly affordable

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • InstantRegret
  • thenastyranch
  • mdbf
  • osvaldo12
  • tacticalgear
  • rosin
  • Durango
  • DreamBathrooms
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • cubers
  • kavyap
  • megavids
  • cisconetworking
  • ethstaker
  • normalnudes
  • GTA5RPClips
  • khanakhh
  • everett
  • tester
  • modclub
  • Leos
  • anitta
  • provamag3
  • JUstTest
  • lostlight
  • All magazines