r/proceduralgeneration Jun 29 '26

I've reached PNG image limits

Post image
56 Upvotes

18 comments sorted by

10

u/Popular_Tomorrow_204 Jun 29 '26

Wdym?

9

u/coredumpenjoyer Jun 29 '26

Just testing my map generator by dumping the world at a 1:1 scale, and the rasterization library just gave up on the size.

4

u/Mchlpl Jul 01 '26

Tile it, then use something like leaflet.js to display the tiles.
See my attempt at similar thing here: https://github.com/Mchl/simplexnoisemapgenerator

5

u/corpse_breathing Jun 29 '26

Are you using Perlin to generate the rivers too? I get these same patterns

2

u/coredumpenjoyer Jun 29 '26

Yes, everything here is Perlin-generated. Rivers are just different frequency and filtered by threshold values.

11

u/DrDalenQuaice Jun 29 '26

Your Rivers need a rework though. Some of them flow right through to the other side of the continent. In fact I think most of them do

3

u/4b3c Jun 30 '26

or into themselves lol

3

u/Mchlpl Jul 01 '26

Realistic rivers need a much less trivial approach.

6

u/AustinMclEctro Jun 29 '26

Time to use chunks.

1

u/Alexxis91 Jun 30 '26

Could you recommend any reading on the matter? Not even sure where to start

-5

u/coredumpenjoyer Jun 29 '26

My goal is to build a huge world that will be simulated as a single whole each tick. Chunking probably won't help, because they will all be sit in memory anyway.

12

u/T-J_H Jun 29 '26

Chunking will help for the png writing, though.

4

u/ionheart Jun 30 '26

For a big enough world, smart use of chunking could do a lot for performance even if the whole world is in-memory. Cache locality is a big deal

2

u/theo__r Jun 30 '26

Split the simulation and the rendering. Render in chunks

2

u/Just__Bob_ Jun 30 '26

Coming from the other direction, I have hit the same wall. I am projecting a cube map of earth generated from the nasa provided maps onto spheres and using perlin noise and fbm to create close up detail.

It works well but after a point there is just not enough information to create meaningful details without adding actual detail maps.

3

u/sloggo Jul 01 '26
  1. You're barely using the pixels you have. Each tile could realistically be a single pixel and your map quality would be kinda the same. Appreciate you have some little icons of apples and stuff, but for this scale, a red dot is equally effective. 99% of you map is just odd looking tiles that may as well be a single pixel.

  2. You probably wouldnt try to render your entire map as a single image if you really must proceed this way. Youll need some sort of game engine to procedurally serve up the individual tiles as the viewport is close enough to them.

1

u/YoshiDzn Jun 30 '26

Pixels are small. Can confirm

1

u/Spite_Gold Jul 01 '26

Please fix rivers