An addon for the Replay Mod that allows you to export your replays into Blender.
This mod is designed for experienced Blender users! It is designed to export your Minecraft scene, and nothing more.
Example:
Usage
Exporting
To begin, open Minecraft and record the replay you wish to export. If you don't know how to do that, this mod is not for you. Then, open the replay editor and add at least two time and camera keyframes. These will determine the start and end points of your animation.
Warning: nether portals and other forms of cross-dimension travel are not supported. Use multiple exports you intend on doing that.
Once you're happy with your replay, open the render screen and click "Export Replay File":
This will open a screen for you to select an output file and configure some replay settings. Adjust your bounds to be as tight as possible. Raise the lower depth as high as it will go before it cuts off the visible landscape, and reduce the perimeter depending on your planned shot.
The "Block Updates" and "Entities" regions add significantly more overhead than the "World" region, so it's recommended to tighten those even further.
Once you're ready, click the "Export" button at the bottom left and wait for it to complete. It is common for the window to appear frozen while the initial block world is captured.
Importing
After exporting from Minecraft, you should be left with a .replay file, which can be imported into Blender using the provided addon.
Once you've ensured the addon is installed, create a new project and go to File > Import > Minecraft Replay File (.replay). Navigate to your file, but before you import it, note the settings on the right:
The main two you need to worry about are World and Entities. While you usually want to import both, they each can take quite a bit of time, so it may be useful to disable one or the other.
Everything else can be left as default.
Once you're ready, click "Import Minecraft Replay" at the bottom. Blender will appear to hang for a few minutes. Don't worry; this is because the contents of a Minecraft world is quite large, and Blender provides no (reliable) way to update the UI while it is processing. (It might do to enable the system console to monitor progress.)
Once it is finished importing, you should have a Minecraft world and most of its entities in your scene! If something goes wrong, make sure to submit a bug report!
All Versions
+ Add Version(no changes have been made to the Blender addon)
There isn't really any new content, but now that Replay Mod has been updated to support 26.3, Replay Exporter has been updated accordingly. You shouldn't need to update the Blender addon for this.
Hopefully it's not as much of a disaster as 1.3.0.
### Changes
- Dynamic Block Entity Support!** Currently implemented:
- Bell
- Chest
- Enchantment Table (book)
- Shulker Box
- Skull
- Animated texture interpolation shader** - This should make blocks like Prismarine look much better.
- Added warning for known-incompatible mods during export
- Optimized exporter to only remesh adjacent blocks when culling has changed
- Fixed entity root rotations being imported improperly in Blender
- Added mod list to exported replay files for debugging (should not affect importer semantics)
### Changes:
- Made material properties use raw json instead of property struct in compiler
- Material property definition for animated texture data.
- Fixed slim skins not exporting properly
> Note: although it's defined in the spec and exported, interpolated animated textures (prismarine, etc) are not yet supported in Blender.
- Blender can now recover from failed entity import
- Entity filenames are sanitized in case servers (*cough hypixel cough*) create really weird entity names
### General
- Automatic enchantment glint shader
- Wrote official "specification" for replay files (doc/ReplayFormat.md)
- Certain materials (water, stained glass, etc) now use a "blended" alpha mode rather than "dithered"
### Minecraft
- Player skins now export properly**
- Options to selectively disable exporting blocks, block updates, and entities
- Optimized block tessellator when it comes to blocks with multiple materials
- Added "saving to disk" stage label to export screen
### Blender
- Warning when attempting to import a replay version greater than what the addon supports
In recent months my interest has swung back in the direction of Replay Exporter. Now, it's no secret that the original codebase was a complete mess. The export format was terrible and hard to maintain; entities always came in broken, and it was unnecessarily slow. Therefore, with 26.2, comes a *complete rewrite!* The replay format has been revamped to properly store meshed terrain, entity exporting has been generalized to support more entities by default, and the importer better relies on Blender's internal systems to improve performance.
Due to this, replays exported from older versions of the mod are *not* compatible with the latest addon, and new replays are not compatible with old versions of the addon. Make sure to download the new version in the release page. It requires Blender 4.4 or newer.
Happy animating!
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](https://github.com/Igrium/CraftMesh).
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
AnimalModelAdapterandSinglePartModelAdapterinto 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.
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
toStringmethod, which uses the object's internal location in memory. - Properly marked incompatibility with Sodium.
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
ChunkViewabstract class which represents a block view that declares which chunks are loaded.
- All Vcap capture classes now use this
ChunkViewabstraction, allowing them to be used on things other thanWorldinstances.
- Created
WorldSnapshotclass, 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 ofVideoRendererdesigned specifically for exporting replays.
- Removed all the janky workarounds that were in use to get
VideoRendererto 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.
- Fixed an issue where updates to the player's crouch state would not get exported.
- Made the exporter encode the mod version into the replay metadata.
- Added model adapter for arrow entities (model by TheDuckCow)
- Added a cache in the vcap context for fluid meshes. In practice, this means that the 1x1 lava pockets in the nether won't spam the file with thousands of identical meshes.
- Added model adapters for Wither Skeleton and Stray.
- Bandaid fix on an issue where entities with single part models would appear 1.5 blocks too low.
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
BlockModelEntryis 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
TextureSerializerutility class that unifies the code of writing textures to Vcap and Replay zip files.
NativeImageextractor now uses a byte array rather than saving and reading from disk.
- Added support for emission in the Unified Material System.
emissionandemission_strengthfields.- Emissive blocks are properly exported.
- Exporter now supports animated textures**
- Unified Material System now includes a [specification for animated textures](https://github.com/Sam54123/mc-world-export/blob/main/doc/materials.md#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.
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
TimelineUpdateEventthat'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
RenderUtilsandFutureUtilsutility classes.
- Fixed
XMLUtils.
- Created
ReplayModHooksclass.
onReplayModInitallows 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.
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.