Moo-Ack-Productions / MCprep

Blender python addon to increase workflow for creating minecraft renders and animations
https://theduckcow.com/MCprep
GNU General Public License v3.0
268 stars 25 forks source link

MCprep Addon

Discord MCprep License MCprep Stars contributions welcome

MCprep is an addon dedicated to speeding up the workflow of Minecraft animators in Blender by automatically fixing up materials and providing other tools such as mob spawing, effects spawning, etc.

Installing MCprep

Click the link below and download the .zip file (re-zip if auto-unzipped into a folder necessary), install into blender (2.80 through 4.0 supported)

Note: To use MCprep with assets, you must have a valid, legal copy of Minecraft to comply with Mojang's terms of service. No support is provided for anyone using MCprep without a valid Minecraft license Versions of MCprep without the assets are not bound to this requirement

Install MCprep

By downloading and installing, you agree to the following privacy policy. Watch this video on how to install if running into troubles.

It should remain a zip folder. In blender, go to preferences, then the addons tab, and at the bottom of the window install from file. Select the .zip file. NOTE: Blender may not automatically enable the addon. If the MCprep addon is not already shown in the window after installing, search for it at left and then ensure the check box is enabled. Save user preferences to keep it enabled next time blender opens.

Again, please download from the link above or the releases page, not by clicking download zip button above.

Installed MCprep 2.8

If you like the addon, please consider donating for the continued quality development! Share this addon so others can benefit from it! Or help by taking this quick survey!

Learn how to use MCprep

Short, 1-minute videos showcasing how to use Blender+MCprep features

Tutorial playlist

Additional Playlist of MCprep videos/demos

About MCprep

This is a blender python addon to improve and automate many aspects of creating Minecraft renders and animations. It can help you improt world's exported from Minecraft, set up better materials, importing mobs and items, and set up proxy characters for animation, and even includes default animations for common blocks/mobs like tall grass, torches, and mobs like the bat or blaze. This addon assumes you have already exported a Minecraft world to an OBJ file. While the script should work for any world importer, it has been tested and developed based on the jmc2obj and Mineways tools for exporting Minecraft worlds to obj files.

This addon is made to work with an asset library directory, from which models and groups are linked or imported from. This library blend file is included, but does not have all types of blocks generated yet. This will be improved in the future.

This addon is compatible officially down to 2.72 official builds, and up to blender 3.00. Not all features are available in all versions, try to use the latest available blender. Run into any problems? Submit bugs/issues here.

Feature list

World Imports Description
Prep Materials Improves materials from world imports, and allows one-click switching from cycles & blender internal materials. Note, this does not create materials, only modifies existing ones.
Swap Texture Pack Initial support only for jmc2obj world exports. Using a valid Minecraft resource pack, you can now completely replace the textures of the imported world with another pack - you can even changed individual blocks at a time.
Animate textures Initial support only for jmc2obj world exports. With a valid (or the MCprep default) resource pack selected, you can replace still images with their animated versions. Works great to put motion back into lava, water, portals and other blocks for any kind of resource pack.
Combine materials/images Consolidates duplicate materials and images down to the smallest number of unique datablocks. Note: combine images is only available on blender 2.78+
Improve UI A shortcut to quickly improve viewport settings for Minecraft sets. Sets textured solid mode & turns off mipmaps
Mesh Swap Allows you to replace simple models from 3D exported worlds with more intricate 3D models
Scale UV Faces Allows you to scale all UV faces of a mesh about their origin. Must be in edit mode of a mesh.
Select Alpha Faces Allows you to select or delete mesh faces that are transparent in the applied image texture. Must be in edit mode of a mesh.
Sync Materials Search for the materials.blend file within the active texture pack, and for any matching materials found in this file, import and overwrite the current file's version of that same material. Found under the World Exporter > Advanced section or in prep materials popup.
World Tools Description
Create MC World Operator which allows user to create either a static or dynamic sky. Options exist to also add clouds, remove existing sun lamps, and define how the Sun/Moon is imported (either as a shader, mesh, or neither). If a dynamic sky is created, a time-control slider will also be displayed below.
Prep World This operator makes several updates to either Blender Internal, Cycles, or Eevee scenes that are optimal and in most cases will notably improve render times (particularly for cycles) and increase overall aesthetic.
Skin Swapper Description
Apply [skin] Applies the currently list-selected skin to the actively selected rigs.
Skin from file Loads in a skin texture from file and applies to the actively selected rigs. Note: Also gets added to skin list
Skin from username Downloads a skin based on a play name and applies to the actively selected rigs. Note: Also gets added to skin list
+ sign Install a custom skin into the list without applying to a rig

Note: only 1.8 skin layouts are supported at this time, in the future an auto-conversion feature will likely be implemented

Spawner Description
Spawn: [rig] Based on the actively selected rig, from an according spawning rig category, add the mob/character into the scene. These are fully rigged characters. Using the plus sign, you can even install your own rigs (rig must be part of a group). For quicker mapping, you can even set an entire folder and it will auto-create subcategories of rigs based on folders.
Spawn: meshswap block Place a block from the meshswap file into the 3D scene. Currently is limited to only having meshswap groups (e.g. torches and fire) and not objects (e.g. not supporting grass and flowers yet).
Spawn: items Convert any image icon into a 3D mesh, with faces per each pixel and transparent faces already removed. Defaults to loading Minecraft items.
Material Library Description
Load material Generate the selected material and apply it to the selected material slot of the active object. Follows convention of the active resource pack and general Prep Materials operator.

Spawner mobs included in the current version of MCprep

included-mobs

CREDIT

While this addon is released as open source software, the assets are being released as Creative Commons Attributions, CC-BY. If you use MeshSwap, please credit the creators by linking to this page wherever your project may appear: http://github.com/TheDuckCow/MCprep

Meshswap Block models developed by Patrick W. Crawford, SilverC16, and Nils Söderman (rymdnisse).

Player Rigs Creator
Fancy Feet Player Patrick W. Crawford (Rig link)
Fancy Feet Slim Player Modified by Jeremy Putnam (MCprep exclusive)
Fancy Feet Armor Player Modified by zNightlord (MCprep exclusive)
Simple Player (modified) BoxScape Studios (Pack link)
Simple Slim Player (modified) BoxScape Studios + TheDuckCow (MCprep exclusive)
Shapekey Player Derived from BoxScape Studios, shapekeys and animation by Patrick W. Crawford (MCprep exclusive)
Story Mode Rig Trainguy9512 (No direct link yet)
VMcomix Steve (rounded) VMcomix (Rig link)
Passive Rigs Creator
Allay zNightlord
Axolotl Breadcrumb
Bat Patrick W. Crawford (MCprep exclusive)
Cat TRPHB Animation
Cod fish BoxScape Studios (Pack link)
Chicken Trainguy9512 (No direct link yet)
Cow Nils Söderman (rymdnisse) (Rig link)
Dolphin BoxScape Studios (Pack link)
Fox BoxScape Studios (Pack link)
Frog zNightlord
Glow squid TRPHB Animation
Goat TRPHB Animation
Mooshroom (red/brown) BoxScape Studios (Pack link)
Parrot BoxScape Studios (Pack link)
Pig Trainguy9512 (No direct link yet)
Panda BoxScape Studios (Pack link)
Pufferfish BoxScape Studios (Pack link)
Rabbit HissingCreeper (No direct link yet)
Salmon BoxScape Studios (Pack link)
Sheep HissingCreeper (No direct link yet)
Squid Nils Söderman (rymdnisse) (Rig link)
Tropical Fish BoxScape Studios (Pack link)
Cod fish BoxScape Studios (Pack link)
Turtle BoxScape Studios (Pack link)
Hostile Rigs Creator
Bee BoxScape Studios (Pack link)
Blaze Trainguy9512 (No direct link yet)
Cave Spider Austin Prescott
Creeper Patrick W. Crawford (MCprep exclusive)
Drowned thefunnypie2 + HissingCreeper
Eldar Guardian BoxScape Studios (Pack link)
Ender Dragon BoxScape Studios (Pack link)
Enderman Trainguy9512 (Rig link)
Endermite Nils Söderman (rymdnisse) (Rig link)
Evoker BoxScape Studios (Pack link)
Ghast Trainguy9512 (No direct link yet)
Guardian Trainguy9512 (Rig link)
Hoglin BoxScape Studios (Pack link)
Husk BoxScape Studios (Pack link)
Magma Cube BoxScape Studios (Pack link)
Piglin BoxScape Studios (Pack link)
Pillager BoxScape Studios (Pack link)
Polar bear PixelFrosty (Demo/download)
Phantom BoxScape Studios (Pack link)
Ravager BoxScape Studios (Pack link)
Shulker Trainguy9512 (Rig link)
Silverfish Nils Söderman (rymdnisse) (Rig link)
Skeleton Trainguy9512 (Rig link, outdated)
Slime BoxScape Studios (Pack link)
Spider Nils Söderman (rymdnisse) (Rig link)
Stray thefunnypie2 + Trainguy9512
Strider BoxScape Studios (Pack link)
Vindicator BoxScape Studios (Pack link)
Warden DigDanAnimates
Witch BoxScape Studios (Pack link)
Wither BoxScape Studios (Pack link)
Wither Skeleton BoxScape Studios (Pack link)
Vindicator BoxScape Studios (Pack link)
Zoglin BoxScape Studios (Pack link)
Zombie HissingCreeper (No direct link yet)
Zombie Pigman BoxScape Studios (Pack link)
Zombie Villager thefunnypie2 + HissingCreeper
Zombified Piglin BoxScape Studios (Pack link)
Friendly/Utility Rigs Creator
Horse Patrick W. Crawford (Rig link)
Iron Golem Trainguy9512 (Rig link)
Llama BoxScape Studios (Pack link)
Ocelot HissingCreeper (No direct link yet)
Simple Villager (Dynamic skin) Th3pooka
Snow Golem Nils Söderman (rymdnisse) (Rig link)
Villager BoxScape Studios (Pack link)
Wandering Trader BoxScape Studios (Pack link)
Wolf Trainguy9512 (Rig link, outdated)
Entities Creator
Arrow TRPHB Animation
Boat TRPHB Animation
Bow TRPHB Animation
Crossbow TRPHB Animation
Minecart BoxScape Studios (Pack link)
Shield Ageofherosmedia
Spyglass Banana-Blu
Effects Creator
Geo node effects Th3pooka
TNT effects (both) TheDuckCow
Rain + Snow particles TheDuckCow
Meshswap Blocks Creator
Campfire BoxScape Studios (Pack link)
All others TheDuckCow

If you use any of these rigs in your animation, give credit to the according creator or by directly referring back to this readme file which contains all the credits. Models have been slightly modified to function best and consistently with the MCprep addon.

Thank you to all the contributors to this project! It will continue to grow and cover more assets in the near future.

How to use this addon

Prep materials:

Settings popup for prep materials.

Prep material settings

Setting options:

Swap texture pack

Using Mineways? Use the following world export settings to use this feature: Mineways exporter settings

Note: Use tiles for exporting to create individual files per block instead of one combined texture file. This is what allows swap texturepack and animate textures to work.

Meshswap:

Setup your Mineways worlds in this fashion for best results.

Mineways exporter settings

Setup your jmc2obj worlds in this fashion for best results.

jmc2obj exporter settings

Note: You can now also directly add meshswap blocks into the scene from the shift-A menu or the spawner:meshswap panel.

To add your own objects to meshswap (or groupswap):

Animate textures:

Animate textures can be found under the World Imports - Advanced panel; or tick the box on prep materials. Animate textures button

Using Mineways? Use the following world export settings to use this feature (key: use tiles): Mineways exporter settings

Scale UV Faces:

Select Alpha Faces:

Create MC Sky:

Prep World:

Sync Materials

To edit the materials.blend file for syncing:

Skin Swapping:

Load Material:

Mob Spawner:

Mob Spawner Redo-last/F6 Options Meshswap options

To add your own rigs to the Mob Spawner:

Using multiple collections in your rig?

Be aware of this behavior to ensure only one collection appears in the rig spawner (use one or the other):

Sometimes you may need to reload a rig cache, click this button if the correct rigs aren't appearing - or if you've just added new rigs to the folder outside of blender

Reload rig cache

Block Spawning

Generate blocks from vanilla or other resource packs, or even from mods or other sources. NOTE! This is a newer part of MCprep, and because it is completely generalized, it's rather unstable. There are any known issues where blocks do not generate correctly, so bear this in mind (see here).

Spawn resource pack blocks

Spawn blocks from json

Item Spawner:

Effects Spawner:

Quickly bring effects into your scene.

Effects types

There are four different kinds of effects that MCprep supports:

Adding your own effects

Purpose: Learn how to add your own effects to extend MCprep for your case.

See the tutorial here for more details: https://www.youtube.com/watch?v=8xy4nZaneQU

Entity Spawner:

Under advanced settings, you can change your target entity file to point to another blend file, as well as force reload entities.

Meshswap block Spawner:

Cycles Optimizer

Warning: There is a section called unsafe features which contains options that may cause render issues. These features can being massive performance boosts but it's not recommended to use them unless you know what you're doing. Unsafe options include:

Optimizer panel

Cycles Optimizer Node Settings

NOTE: the Cycles Optimizer is deprecated and will be removed in MCprep 3.6

The Cycles optimizer also comes with it some special node names to control how it interprets certain nodes. They are the following:

To use these settings, simply click on the node you want to edit, press N, and then edit the Name of the node

Important: Make sure you edit the Name of the node, not the Label Using optimizer node settings

Known Bugs

See all known current bugs here

Future Plans

Future development plans are now recorded and updated as milestones and enhancement issues on GitHub. Check those out here

Additional Help

If you have troubles getting this addon to work, please contact me at support[at]TheDuckCow.com or on twitter, and I will do my best to respond promptly to your questions. This addon is always being updated, but there may be some time between releases, so check back for updates (you can reference the version number and take last modified). Your feedback helps stabilize the addon and make it work better for everyone else!

Moo-Ack!