Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8ff2b7f
Bring back support for the render service.
leMaik Oct 4, 2020
1631246
Remove render jobs after they are done.
leMaik Oct 7, 2020
88b11a8
Fix memory/thread leak when creating scenes for the remote renderer.
leMaik Oct 7, 2020
862f7a0
Implement submitting region files to the render service instead of cr…
leMaik Oct 19, 2020
cc3cc96
Re-use region files that were already uploaded to the render service.
leMaik Oct 20, 2020
e0277af
Add api keys for the render service.
leMaik Oct 23, 2020
18d89a5
Fix okio response body leaking warning.
leMaik Nov 19, 2020
2979239
Update okhttp to fix proxy issues.
leMaik Nov 19, 2020
b4733e0
Cancel jobs that failed rendering (e.g. timed out).
leMaik Nov 22, 2020
69fd6af
Drop duplicate method declaration.
leMaik Nov 22, 2020
2cefb07
Ensure that chunks only get added once to a scene.
leMaik Nov 22, 2020
4bce69e
Make local rendering work again.
leMaik Nov 22, 2020
7327d61
Fix texturepacks.
leMaik Dec 17, 2020
0febfef
Put failed tiles back into the tile queue by default.
leMaik Dec 17, 2020
45894db
Redirect Chunky log output to the plugin logger, suppress chunky conf…
leMaik Jan 16, 2021
4d361fd
Fix dependency warning when loading the plugin.
leMaik Jan 16, 2021
8e45f8d
Reduce ChunkyCloud timeouts, ensure that all response bodies are closed.
leMaik Jan 16, 2021
9cbcb19
Fix typo in the readme, explain nested options.
leMaik May 5, 2021
abcef42
Add a ChunkyCloud example configuration.
leMaik May 5, 2021
50f25bd
Fix concurrent modification exception when getting the world path.
leMaik Oct 10, 2021
5d61884
Use Greenfield image in the readme.
leMaik Oct 10, 2021
60bf195
Refactor chunky map and tile implementations to more closely map dynm…
leMaik Oct 10, 2021
e00206b
Update to dynmap 3.2 or later.
leMaik Oct 10, 2021
f2d5c36
Migrate to chunky 2.4 and chunky-denoiser 0.5.0.
leMaik Aug 28, 2022
26017a9
Get default texturepack version from the server version.
leMaik Aug 28, 2022
90b8889
Update to Chunky 2.4.4.
leMaik Oct 9, 2022
8638fba
Bump version.
leMaik Oct 9, 2022
6340ba9
Remove local-libs repo from pom file.
leMaik Oct 23, 2022
9dc8068
Mute unknown biome warnings.
leMaik Oct 23, 2022
c2579d9
Add support for multiple resourcepacks per map instead of only one te…
leMaik Oct 23, 2022
8845ef4
Fix default resourcepack not being used if no resourcepacks are confi…
leMaik Oct 23, 2022
0c9407d
Update to latest Chunky 2.5 snapshot and latest dynmap for Minecraft …
leMaik Feb 17, 2025
b4545f3
Fix the denoiser, get rendered image without reflection.
leMaik Mar 1, 2025
7db9ff2
Use 1.21.4 textures by default.
leMaik Mar 2, 2025
b53d8f7
Fix applying the template scene.
leMaik Mar 2, 2025
8ec93de
Bump version and add a compatibility matrix to the readme.
leMaik Mar 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .gitmodules

This file was deleted.

58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ ChunkyMap is a map renderer for [Dynmap][dynmap] that uses [Chunky][chunky] to r

![banner](banner.png)

## Compatibility matrix

| ChunkyMap | Minecraft | Dynmap | Chunky | Branch |
| ---------- | --------------- | ------------ | ------ | ---------- |
| 2.7.0-pre1 | 1.21.4 or older | 3.7 | 2.5.0 | chunky-2.5 |
| 2.6.0-pre4 | 1.19 or older | 3.2 or later | 2.4.4 | chunky-2.4 |
| 2.5.2 | 1.16 or older | 2.3-3.0 | 2.3.0 | master |

## Installation

1. Download the latest jar from [the releases page][latest-release] and put it in your plugins directory.
Expand Down Expand Up @@ -32,18 +40,25 @@ ChunkyMap is a map renderer for [Dynmap][dynmap] that uses [Chunky][chunky] to r

The maps can be configured by adding options to the map's section in the `world.txt` file.

| Option | Description | Default |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `samplesPerPixel` | Samples per pixel that Chunky should render. More SPP improves the render quality but also increases render time. | 100 |
| `chunkyThreads` | Number of threads per Chunky instance. More threads will decrease render time but increase the CPU load of your server. | 2 |
| `chunkyCpuLoad` | Percentage of CPU time to use, per Chunky thread. Note that this only throttles the CPU usage during rendering, not during scene loading or post processing. | 100 |
| `texturepack` | Texturepack path, relative to `plugins/dynmap`. Use this option to specify a texturepack for a map. The texturepack in Dynmap's `configuration.txt` is ignored by ChunkyMap. | _None_ |
| `chunkPadding` | Radius of additional chunks to be loaded around each chunk that is required to render a tile of the map. This can be used to reduce artifacts caused by shadows and reflections. | 0 |
| `templateScene` | Path to a Chunky scene file (JSON), relative to `plugins/dynmap`. Use this option to customize the scene that is used for rendering the tiles, e.g. to change the water color. | _None_ |
| `texturepackVersion` | The Minecraft version that should be used as fallback textures | 1.16.2 |
| `denoiser.enabled` | Enable denoising using [Intel Open Image Denoise](https://openimagedenoise.github.io/). Only works on Linux | false |
| `denoiser.albedoSamplesPerPixel` | Samples per pixel for the albedo map. Setting this to 0 will disable the albedo and normal map. | 4 |
| `denoiser.normalSamplesPerPixel` | Samples per pixel for the normal map. Setting this to 0 will disable the normal map. | 4 |
| Option | Description | Default |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `samplesPerPixel` | Samples per pixel that Chunky should render. More SPP improves the render quality but also increases render time. | 100 |
| `chunkyThreads` | Number of threads per Chunky instance. More threads will decrease render time but increase the CPU load of your server. | 2 |
| `chunkyCpuLoad` | Percentage of CPU time to use, per Chunky thread. Note that this only throttles the CPU usage during rendering, not during scene loading or post processing. | 100 |
| ~~`texturepack`~~ (deprecated) | Texturepack path, relative to `plugins/dynmap`. Use this option to specify a texturepack for a map. The texturepack in Dynmap's `configuration.txt` is ignored by ChunkyMap. | _None_ |
| `resourcepacks` | List of resourcepack paths, relative to `plugins/dynmap`. This also supports data packs for custom biomes. Use this option to specify resourcepacks for a map. The texturepack in Dynmap's `configuration.txt` is ignored by ChunkyMap. | _None_ |
| `chunkPadding` | Radius of additional chunks to be loaded around each chunk that is required to render a tile of the map. This can be used to reduce artifacts caused by shadows and reflections. | 0 |
| `requeueFailedTiles` | Put tiles that failed to render back into the tile queue. | true |
| `templateScene` | Path to a Chunky scene file (JSON), relative to `plugins/dynmap`. Use this option to customize the scene that is used for rendering the tiles, e.g. to change the water color. | _None_ |
| `texturepackVersion` | The Minecraft version that should be used as fallback textures | 1.21.4 |
| `denoiser/enabled` | Enable denoising using [Intel Open Image Denoise](https://openimagedenoise.github.io/). Only works on Linux | false |
| `denoiser/albedoSamplesPerPixel` | Samples per pixel for the albedo map. Setting this to 0 will disable the albedo and normal map. | 4 |
| `denoiser/normalSamplesPerPixel` | Samples per pixel for the normal map. Setting this to 0 will disable the normal map. | 4 |
| `chunkycloud/enabled` | Render tiles using the Chunky Cloud render service | false |
| `chunkycloud/apiKey` | API Key for the Chunky Cloud render service | |
| `chunkycloud/initializeLocally` | Generate the octree locally. Less data to upload, faster render times but will use a lot of CPU locally. | true |

:warning: A forward slash (`/`) in the option name means that the right part is a nested option and needs to be put into the next line and indented properly. Take a look at the examples below.

## Example configurations

Expand Down Expand Up @@ -99,6 +114,25 @@ perspectives:
maximumheight: 100 # the bedrock layer is at 127
```

### Rendering ChunkyMap on ChunkyCloud

`plugins/dynmap/worlds.txt`:

```yml
worlds:
- name: world
maps:
- class: de.lemaik.chunkymap.dynmap.ChunkyMap
name: chunky
title: Chunky
perspective: iso_SE_30_hires
samplesPerPixel: 20
chunkycloud:
enabled: true
initializeLocally: false
apiKey: your-secret-api-key
```

### Customizing the look of a map with template scenes

You can change how the map looks by providing a template scene. That can be any Chunky scene (`.json`) file or a partial scene file (i.e. a `.json` file that only contains the values that should be changed). ChunkyMap will import many scene options from the template scene, including the sun position, fog and water configuration.
Expand Down
Binary file modified banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 29 additions & 67 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>de.lemaik.chunkymap</groupId>
<artifactId>ChunkyMap</artifactId>
<version>2.5.2</version>
<version>2.7.0-pre1</version>

<licenses>
<license>
Expand All @@ -16,10 +14,9 @@
</licenses>

<properties>
<jdk.version>1.8</jdk.version>
<jdk.version>21</jdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<chunky.version>2.3.0-30-g82f6ab17</chunky.version>
</properties>

<repositories>
Expand All @@ -31,31 +28,23 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>dynmap-repo</id>
<url>http://repo.mikeprimm.com/</url>
</repository>
<repository>
<id>wertarbyte-repo</id>
<url>https://repo.wertarbyte.com</url>
</repository>
<repository>
<id>local-libs</id>
<url>file://${basedir}/lib</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>se.llbit</groupId>
<artifactId>chunky-core</artifactId>
<version>${chunky.version}</version>
<version>2.5.0-DEV.381.gf277ba6</version>
</dependency>
<dependency>
<!-- dependency of chunky -->
Expand All @@ -64,26 +53,38 @@
<version>3.2</version>
</dependency>
<dependency>
<!-- this is an older version, but 3.0-SNAPSHOT can't be installed and this works, too -->
<groupId>us.dynmap</groupId>
<artifactId>DynmapCore</artifactId>
<version>2.3</version>
<version>3.7-beta-8</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<!-- downloading fails -->
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>us.dynmap</groupId>
<artifactId>DynmapCoreAPI</artifactId>
<version>3.7-beta-8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.4.1</version>
<version>3.14.9</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>net.time4tea</groupId>
<artifactId>oidnjni</artifactId>
<version>0.1.04</version>
<version>0.1.13</version>
</dependency>
<dependency>
<!-- dependency of oidnjni -->
Expand All @@ -94,7 +95,7 @@
<dependency>
<groupId>de.lemaik</groupId>
<artifactId>chunky-denoiser</artifactId>
<version>0.1.3-SNAPSHOT</version>
<version>0.5.0-pre3</version>
</dependency>
</dependencies>

Expand All @@ -103,10 +104,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
Expand All @@ -127,45 +128,6 @@
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>install-chunky</id>
<phase>clean</phase>
<configuration>
<file>${basedir}/vendor/chunky/build/chunky-core-${chunky.version}.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>se.llbit</groupId>
<artifactId>chunky-core</artifactId>
<version>${chunky.version}</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
<execution>
<id>install-chunky-denoiser</id>
<phase>clean</phase>
<configuration>
<file>${basedir}/vendor/chunky-denoiser/build/libs/chunky-denoiser-chunky2.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>de.lemaik</groupId>
<artifactId>chunky-denoiser</artifactId>
<version>0.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
Expand All @@ -174,4 +136,4 @@
</resource>
</resources>
</build>
</project>
</project>
8 changes: 8 additions & 0 deletions src/main/java/de/lemaik/chunkymap/ChunkyMapPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package de.lemaik.chunkymap;

import de.lemaik.chunkymap.rendering.local.ChunkyLogAdapter;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
Expand All @@ -27,12 +28,19 @@
import java.util.logging.Level;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import se.llbit.log.Log;

/**
* The main class.
*/
public class ChunkyMapPlugin extends JavaPlugin {

@Override
public void onLoad() {
Log.setReceiver(new ChunkyLogAdapter(getLogger()), se.llbit.log.Level.ERROR,
se.llbit.log.Level.WARNING, se.llbit.log.Level.INFO);
}

@Override
public void onEnable() {
Plugin dynmap = getServer().getPluginManager().getPlugin("dynmap");
Expand Down
Loading