Code Monkey home page Code Monkey logo

Comments (9)

spoutn1k avatar spoutn1k commented on May 26, 2024 1

This commit added the ability to tile the output. The results are sorted in a machine parseable way and I got great results with leaflet.js. I plan to add the HTML/JS scripts in a future commit, once I nail down how to transfer execution info into the webpage.

from mcmap.

srett avatar srett commented on May 26, 2024 1

On the subject of tiles, I've been thinking about the artifacts in the water on the boundaries between those isometric slices, and I'm pretty sure that could be resolved by using premultiplied alpha for all your rendering as well as combining the tiles, and only converting to conventional alpha when outputting the final images.

FWIW while pre-multiplied alpha might help, I think those seams were the result of rounding errors since you only have 8 bits per channel, but in case of an ocean, you have multiple transparent setpixel operations per output pixel, so you are off by quite a bit in the end. I planned on hacking up a simple 16bpc version to test if that theory is correct, but then never got around to it.

from mcmap.

spoutn1k avatar spoutn1k commented on May 26, 2024

Well, I was waiting for such an issue to re-implement the feature. Generating tiles from a PNG is trivial; mcmap can go further and generate isometric slices of the world. The problem would be to know if a map viewer could display those slices by overlaying them, or if it would be better off displaying square tiles.

I thought nobody was interested, and did not take the time to look at this feature. A year ago, while going through the project, I think I remember asserting that the openlayers script was outdated; if that is interesting to you, please let me know what displaying backend you have in mind, and I'll make mcmap output the right images.

from mcmap.

M3t0r avatar M3t0r commented on May 26, 2024

That functionality never worked for me, but because the old mcmap was so memory efficient I was able to render it all out into a ~250MB PNG file and slice it up with a small tool myself https://github.com/M3t0r/png-tile (imagemagick needed 15+GB for the same task).

Back then I used https://leafletjs.com/ to build the interface, and it required square tiles that can't overlap. I doubt that changed. At least not when you want a performant solution.

from mcmap.

spoutn1k avatar spoutn1k commented on May 26, 2024

Are you not able to anymore ? I tried making the new version as efficient as possible. Or is it that this world is pre-1.13 and not compatible anymore ?

from mcmap.

M3t0r avatar M3t0r commented on May 26, 2024

@spoutn1k I didn't have large worlds on a small server in over 4 years. And I haven't rendered any map since. I just thought I'd share my experience from back then. But the numbers I remember was limiting mcmap to 500mb, and the output PNG was 250MB big. It took a lot of iterations to generate the map!

from mcmap.

retep998 avatar retep998 commented on May 26, 2024

Definitely should be square tiles as that is what everything is designed for. I don't personally have any opinions on which display backend to use. I just want some sort of web map that is easy to view.

On the subject of tiles, I've been thinking about the artifacts in the water on the boundaries between those isometric slices, and I'm pretty sure that could be resolved by using premultiplied alpha for all your rendering as well as combining the tiles, and only converting to conventional alpha when outputting the final images.

from mcmap.

spoutn1k avatar spoutn1k commented on May 26, 2024

Tiling support has been merged in the master branch.

About premultiplied alpha, from http://www.libpng.org/pub/png/spec/1.1/PNG-Rationale.html:

PNG uses "unassociated" or "non-premultiplied" alpha so that images with separate transparency masks can be stored losslessly

I am skeptical about if it can be done using the PNGs as they are used today.

from mcmap.

spoutn1k avatar spoutn1k commented on May 26, 2024

I will definitely test this theory.

My head cannon was we need the 'depth' of each layer to accurately merge the layers as if they were made by multiple setpixel operations, which is a task and a half.

Hopefully switching to 16bpc fixes that, and I am pretty sure I kept most of the groundwork you laid for it (with the BYTESPP macro or something)

from mcmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.