1.20.4 Update
This patch is pretty straightforward -- a simple update to 1.20.4 MrNavaStar. I've also cleaned up some of the base build code.
Not much has changed in the main repo for this update because I've been focused on re-writing the world exporter in a separate repository.
Bugfixes and Stability
There aren't many user-facing features in this update, but it contains numerous critical fixes and backend improvements. The most prominent is the major rewrite of some of the base model adapters, greatly improving entity renderer compatibility.
Changes
-
Update to 1.20.1
Special shoutout to MrNavaStar for pulling the heavy lifting for this update! As with most Minecraft updates, there were a variety of underlying changes to address, and he did a superb job.
-
Base model adapters were improved, leading to much better compatibility with complex models.
-
Moved shared logic from
AnimalModelAdapter
andSinglePartModelAdapter
into single parent class. -
Fixed mathematical mistakes regarding the coordinate space of child model parts. As a result, many previously broken entities (such as horses) are now fixed.
-
Exporter now respects model part visibility.
-
Proper fix for y-offset issue.
-
Re-organized model adapter files in the repo.
-
-
Fixed a critical issue where block colors would appear black when imported into Blender 3.5+.
A Critical Bug
There is currently an issue in some versions of Blender where updated blocks will appear in the wrong place. As far as I can tell, this is an issue with Blender itself, and I'm still unable to determine how to fix it.
If this happens, simply save your file and re-open it. This is a problem with the render cache, therefore reloading the file is a reliable resolution.
The Anti-Jank Update (Part 2)
This update builds on the groundwork released in 0.7.0 to make a better overall user experience. This includes a complete re-write of the export UI, and various quality of life improvements. The exporter is no-longer reliant on single "radius" and "lower depth" sliders. Instead, a new Bounds Editor allows the user to customize their export region with chunk-level precision.
Additionally, the replay export screen now saves the export settings to disk for re-use, just like the video export screen.
Changes
- UI Overhaul
- Re-wrote the export settings screen from scratch.
- Added new Bounds Editor for easy export region selection.
- Export screen is now an actual screen rather than a popup.
- Export settings now get saved to file.
- Re-organized all UI code.
- Bug Fixes
- Fixed crash when exporting replays containing shulkers.
- Bullshit workaround for issue regarding player skin loading.
- Fixed incorrect shield texture in export.
- Fixed crash when previous replay export directory is no longer valid.
- Misc
- Updated world exporter to use bounding box rather than radius/lower depth internally.
- Replaced (broken) fluid exporter with a prototype one that works with multithreading.
- Made vcap exporter use section coordinates all the way through the export pipeline.
- Living model adapters can now write custom material behavior.
- Naming scheme for unknown bones in animal model adapter is now somewhat deterministic. It no longer calls Java's native
toString
method, which uses the object's internal location in memory. - Properly marked incompatibility with Sodium.
The Anti-Jank Update (Part 1)
This update is quite ambitious, so I had to pull a Caves and Cliffs and split it into two. 0.7.0 lays the technical groundwork for 0.8.0, which will be focused on the UI and making a better user experience.
In this update, the world exporter has been almost completely re-written. If you've been following the GitHub repo, this is what's been happening in the async_world_capture
branch.
The new exporter is written in a way such that it can be executed off of the main thread, with all block updates during the export being properly accounted for. This works using a proxy, "snapshot" object, which uses a client-side block update detector to create a thread-safe view of the world at a given time, without any overhead upon creation. This means that, along with some internal optimizations, the initial world exporter can now operate concurrently with the frame exporter to improve export times and make the UI more responsive.
Additionally, the export pipeline has been re-written as to not piggyback off of the Replay Mod's render pipeline. A custom pipeline that's built for the unique needs of the replay exporter rather than a video exporter significantly improves code cleanliness and paves the way for better UI clarity (some of which is already implemented.)
I also updated the mod to 1.19.3 because some people were asking for that.
Changes
-
Updated to 1.19.3
-
Removed Joml as a jar-in-jar dependency as that's now provided by Minecraft.
-
Updated model adapters to use Joml types where relevant.
-
-
Overhauled world exporter
-
Wrote
ChunkView
abstract class which represents a block view that declares which chunks are loaded. -
All Vcap capture classes now use this
ChunkView
abstraction, allowing them to be used on things other thanWorld
instances. -
Created
WorldSnapshot
class, a thread-safe view of a world at a specific point in time. -
World exporter works asynchronously, exporting chunks in parallel to drastically improve export time.
-
-
Re-wrote replay export pipeline
-
Created new
ReplayExporter
, an adaption ofVideoRenderer
designed specifically for exporting replays. -
Removed all the janky workarounds that were in use to get
VideoRenderer
to export replays. -
Implemented backend for better UI feedback about export "phases." This replaces the prints to console that were in use before.
-
Fixed an issue where entities wouldn't export properly if the export region started at the very beginning of the replay.
-
Fixed an issue where player skins wouldn't export if the playhead was in the middle of the export region.
-
Moved replay finalization and serialization off of the main thread.
-
-
Small UI update
-
New export progress screen displays world export progress as well as replay export progress.
-
Added warning about the fluid exporter's memory issues to export screen.
-
-
Misc.
- Made the Blender addon camera export start at frame zero, regardless of the starting frame.
The Material Update
The primary focus of this update is to improve the world texture/material pipeline. This not only includes animated textures and better-looking materials by default, but a complete overhaul to the internal asset management system to make it more versatile overall.
Warning: This release updated the Vcap and Replay specifications. Older versions of the Blender addon may not be able to import files from newer versions of the mod!
Changes
-
Re-organized Vcap export context
-
Instead of being hard-coded to save world materials and textures, export context now contains a "material provider" system which can save an arbitrary amount of materials and textures.
-
The same goes for models. Model entries have been replaced by model providers (which
BlockModelEntry
is a subclass of) that supply their own mesh writing function.
-
-
Updated
ReplayTexture
-
Replay textures may now specify "dependency" textures, which are written to disk alongside the primary texture.
- Used for animated textures.
-
Added
prepare()
method to execute pre-serialization functions (such as GPU texture extraction) asynchronously. -
Wrote
TextureSerializer
utility class that unifies the code of writing textures to Vcap and Replay zip files. -
NativeImage
extractor now uses a byte array rather than saving and reading from disk.
-
-
Added support for emission in the Unified Material System.
emission
andemission_strength
fields.- Emissive blocks are properly exported.
-
Exporter now supports animated textures
-
Unified Material System now includes a specification for animated textures.
-
Blocks with animated textures are given their own materials rather than using the atlas.
- Detection and extraction of spritesheet.
-
Implemented spritesheet decoding in Blender
-
-
Fixed an issue in the Blender addon where materials in subdirectories of a Vcap would not be imported properly.
Advanced Camera Animations
This update focuses less on what gets exported from Minecraft, and more on what gets imported into Minecraft. In particular, camera animations can now be exported from Blender and imported back into the game.
It's no secret that the exporter is not perfect. And while it's had major improvements as of late, there will always be edge-cases where it just fails, and rendering in-engine is the only option. Importing external camera animations into your replays provides the ability to use Blender's advanced animation toolset with Minecraft's native renderer, giving you the best of both worlds.
Usage
In Blender, select your animated camera and go to File > Export > Camera Animation (.xml)
. In the window that opens, choose your output file and click "Export Camera XML".
Note: If your camera has constraints, it might be a good idea to bake the action first. Exporting animations with constraints can lead to unexpected results.
Next, launch Minecraft and open your replay file. Open the Hotkey GUI using the hamburger button in the bottom left corner and select "Import Camera".
This will open the Camera Manager, where you will see a list of all animated cameras in the file. To import a new camera, click the large "Import Camera" button at the bottom. This will open a file browser, where you should select the xml file you exported from Blender. Once the camera is in your file, the game sees it as an entity. Just like in the Player Overview, click the name in the Camera Manager and add a spectator keyframe so your camera can be rendered.
It's important to note however, that although they present as entities, animated cameras are not entities. They are evaluated based on the replay timeline instead of the game timeline, so time keyframes have no effect on them. If the timing of a camera needs to be adjusted, it must be done in Blender.
Warning: Once an animated camera is used, your replay is no longer compatible with the vanilla Replay Mod. It will still open without this extension, but all your animated cameras will be gone.
Changes
-
Camera animation exporting in Blender.
- Re-wrote the half-written exporter from the previous version.
-
Camera animation importing.
-
Wrote animated camera module to handle imported cameras.
-
Created
TimelineUpdateEvent
that's fired whenever the replay timeline is updated. -
Added the relevant framework for custom camera path rendering.
-
Created Camera Manager and Camera Editor UI.
-
Wrote various jGUI utility classes used in the Camera Manager and Camera Editor.
-
-
Internal code changes.
-
Created
RenderUtils
andFutureUtils
utility classes. -
Fixed
XMLUtils
. -
Created
ReplayModHooks
class.onReplayModInit
allows for mod initialization code that requires the Replay Mod to have been initialized already.
-
-
Vcap test commands are now disabled unless game is in a development environment.
The Fluid Update (almost)
This update brings a long-requested feature: fluid support. Or, at least part of it. Mid-replay fluid updates are still not working and have been disabled. They also don't use animated textures yet.
To export fluids, simply ensure "Fluid Mode" is set to Static
on the export screen.
Changes
-
Wrote fluid system.
-
Flood fill algorithm for generating fluid domains.
-
Mesh comparison algorithm to support fluid system.
-
-
Cleaned up block updating code.
-
Created mod icon.
-
Blender: Fixed an issue arising when a block was modified twice during a replay.