chunky-dev / chunky

A path tracer to create realistic images of your Minecraft worlds.
https://chunky-dev.github.io/docs
GNU General Public License v3.0
633 stars 76 forks source link
hacktoberfest java minecraft path-tracer

Chunky logo

Chunky

Chunky is a Minecraft rendering tool that uses Path Tracing to create realistic images of your Minecraft worlds. [Discord server][chunky-discord] · [Documentation][chunky-dev] · [Troubleshooting][chunky-dev-troubleshooting] · [Subreddit][chunky-reddit]

Quick start guide

Prerequisites: Chunky requires Java 17. It is recommended to have the 64-bit version if you have a 64-bit operating system (you most likely do). If you haven't installed Java, you can download it from here, selecting Temurin 17 LTS. You also need (Open) JavaFX 17 LTS, which you can download from here and extract it; We cover valid extraction locations and manually adding the JavaFX module under the Troubleshooting article.

  1. Download the Chunky Launcher and open it
  2. Install the latest version of Chunky by clicking on Check for Updates
  3. Click on Launch Chunky start rendering your beautiful buildings

For guides and more information please checkout the Documentation. If you have any questions, please don't hesitate to reach out via Reddit, Discord, or GitHub.

Frequently Asked Questions

Why is there noise/grain/random bright dots in the render? > This is not a bug, but an unfortunate effect of [the rendering algorithm][chunky-dev-rendering] used in Chunky. Torches and other small light sources cause a very random illumination and it takes a long time to render such light nicely. > > You can disable emitters under the Lighting tab in the Render Controls dialog to remove most of the random bright dots. Note that rendering for a longer time will eventually remove the noise, though it may take a very long time. > > Another way of removing the noise is using the [Denoiser Plugin][chunky-denoiser]. While this can yield good results in most cases, it may distort the image in some cases.
How long does it take to render an image? > This depends on your CPU, the size of the image and the lighting conditions of the scene you are rendering. You can use the tips from the previous answer to get away with shorter render times.
Why do I see blue question marks or red crosses instead of blocks? > Chunky renders blue question marks for unsupported blocks. Maybe your Chunky version is outdated or the block is not yet supported. If the latter is the case, please file a bug report. > > Red crosses are caused by missing textures. Please ensure that you're using a texturepack for the Minecraft version for the world you are rendering.
Which Minecraft versions are supported? > Chunky 2.4.4 supports Minecraft 1.2-1.19.2 worlds and Cubic Chunks for Minecraft 1.10-1.12 worlds. > > We typically add new blocks shortly after a new Minecraft snapshot is released. Use the latest Chunky snapshot to render them until a new Chunky version is released.
Is GPU rendering supported? > There is a work-in-progress [OpenCL plugin for Chunky][chunky-opencl]. If you'd like to help with this, PRs are welcome!
Why are mobs not rendered? > Chunky currently can't render all entities. Future support for rendering more entities is planned, so stay tuned!
Can Chunky render mod blocks? > No. Due to the vast number of mods, this is not feasible at the moment. However support for JSON-defined block models is being worked on.
Where can I find good skymaps? > The [skymaps page][chunky-dev-skymaps] has some good links. Another good place is the #skymaps channel on our [Discord server][chunky-discord].
Chunky keeps freezing or crashing > Chunky uses a lot of memory. If Chunky has too little memory to work with it may slow down to a crawl or crash. The memory limit can be increased in the Chunky Launcher.
Rendering using the command line (Headless Mode) > It is possible to render a scene from the command line. First set up a scene > using the GUI. Don't forget to save the scene. Then run the following on the > command line: > > java -jar chunky.jar -render SceneName > > Where SceneName is the name of the scene to render. You can read more about [headless rendering here.][chunky-dev-headless]
Shutdown when render completes on Unix-like Systems (Mac OS X, Linux, BSD) > In the Advanced tab of the Render Controls window, you can check the checkbox > that says "Shutdown when render completes" to shut down your computer when the > set SPP target is reached. (This can be toggled while rendering.) > > On Unix-like systems, the `shutdown` terminal command has to be run as root > using `sudo`. For various reasons, Chunky cannot prompt for the password to > `sudo`, so you must configure your system to allow the command to run without a > password. > > Open a terminal (such as bash) and run `sudo visudo`, providing your password. > > Add the following line at the end of the file: (press Insert to type) > > %user_name ALL=(ALL) NOPASSWD: /sbin/shutdown > > Replace `user_name` with your username. > > Press Escape, then type `:wq`. > > You may need to restart or log out and in for this to take effect. > > This will only allow `sudo shutdown` to run without a password; no other > commands run with `sudo` will be affected.
What about the Chunky SpigotMC plugin? > The [Chunky SpigotMC plugin](https://www.spigotmc.org/resources/chunky.81534/) is an unfortunate name collision and is unrelated to this project. Chunky (SpigotMC plugin) is a handy plugin to quickly pre-generate server chunks should you need that functionality. You can also find [Chunky (SpigotMC Plugin) on GitHub](https://github.com/pop4959/Chunky).

More information about Chunky, including a short getting started guide and rendering tips are available at the Chunky Documentation page. For more insights into Chunky's development, keep an eye on the Discord; messages from contributors can sometimes give you insight into what everyone is working on.

Hacking on Chunky

It is recommended to use IntelliJ. Install the Java17 JDK (Temurin is the recomended distribution). Then, clone the Chunky repository and let IntelliJ index the project. Navigate to chunky/src/java/se/llbit/chunky/main/Chunky.java and click on the green play button next to public class Chunky { to build and run Chunky.

To build Chunky externally, run the gradlew script in the project root directory. Gradle is setup with a few main tasks:

A custom version can be specified with -PnewVersion="<version>". A custom prerelease tag can be specified with -PprereleaseTag="<tag>". The default version is in the format: {major}.{minor}.{patch}-{tag (DEV)}.{commits since last tag}.g{git hash of commit}

Chunky is split into four subprojects:

If you want to hack on Chunky itself you will need to load the chunky and lib directories in your favorite editor. If available, use a Gradle project import option.

Code Style

The Google Java style guide should be followed for new code (2 spaces for indentation, no tabs). If you want to contribute code to Chunky please make your code look similar to the rest of the code, and refer to the style guide when in doubt.

Copyright & License

Chunky is Copyright (c) 2010-2023, Jesper Öqvist jesper@llbit.se and Chunky Contributors.

Permission to modify and redistribute is granted under the terms of the GPLv3 license. See the file LICENSE for the full license.

Chunky uses the following 3rd party libraries:

Special Thanks

YourKit
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of Java Profiler, .NET Profiler, and YouMonitor.


JetBrains supports core contributors of non-commercial open source projects by providing them with professional coding tools free of charge. Find out more.