You can “spawn” mobs, players, and specific block types with ease using the MCprep Spawner panel. This page shows you how.
Video Tutorial on Mob Spawning
Note: while some interface elements may be re-arranged, the functionality has stayed the same or expanded between versions.
How to use the Spawner panel
At this time, MCprep includes both Mob and Meshswap block spawning.
Click a section below
View how to use this feature by clicking one of the sections below
Mob Spawner - how to use
Mob Spawner
The Mob Spawner provides ready to use Minecraft rigs out of the box. How awesome is that? These built in rigs are great to get started with animation quickly. It has both a couple different Player-type rigs, as well as several mob rigs.
- Step 0: By default this is already done for you; make sure the mob spawner path is a directory with valid blend files setup for linking (addon preferences > MCprep). When installed, this path will already be setup and valid pointing to the included rigs with this release, as defined in the credits section above. This rigs are place in the addon’s local directory provided by blender and will not be placed anywhere else on the user’s machine.
- Step 1: Either press the “mob spawner” button in the MCprep panel, or go to the shift-a menu: armature > mob spawner > [mob name] to instantly append or link in a rig.
- If you are using the side panel, you can even search for specific rigs by pressing the little + button in the bottom corner of the list panel, this will reveal a search box to filter for rig names matching the text.
- Step 2: Check the redo last menu for additional settings, such as relocation of the rig, library linking, and even changing which rig to spawn. These are the following options:
- mcmob_type: Change the mob spawned, e.g. from a creeper to a wolf
- Relocation: Change where the spawned rig appears.
- Cursor (default): Place the rig at the cursor’s location
- Origin: Move the rig to the origin
- Offset root: Move the rig to the origin, but offset the root bone to the cursor’s location (note: doesn’t work with all rigs correctly right now, will be improved in the future)
- Library Link mob: If disabled, the group is appended (the groups is not kept so it can be appended multiple times), if enabled, the rig will be linked in and armatures auto-proxied.
- Be careful! If the blend file moves, the libraries will likely get broken unless a custom rigs folder is used with a local-relative path.
- Clear pose: clear to pose to rest. If false, the initial pose will be that found in the rig’s source blend file. Note: some rigs have animations already setup, clear pose in the future will also automatically clear an action and remove the pre-animated figures.
Mob Spawner - add your own rigs
It is very easy, and very powerful, to add your own rigs to the Mob Spawner. These can be from online, or custom ones you have made yourself. See the steps below on how to use this feature:
- Step 1: Make your rig, or download one you want to use! More of my own rigs are on my blendswap page.
- Step 2: Make sure all elements of the rig, ie all armatures, body parts, and extra objects, are added to a single group inside your rig file. The name of this group is what will appear under the shift-a menu, and typically matches the name of the file if there is just one rig per blend file.
- Step 3: Optional but useful, rename the root bone of the rig to one of [MAIN, root, base], used for relocation. Additionally, make the armature for animation named [name].arma where [name] exactly matches the name of the group. This is used for auto-proxying of the armature and relocation methods.
- Step 4: Optional, if you have a custom script for the rig, save it as an external file whose name matches the blend file exactly, but with .py instead of .blend, place this in the same folder as the blend file.
- Step 5: Either from Blender Preferences > Addon > MCprep preferences panel > “Select/Install Mobs” or from the MCprep tab mob spawner menu “install [name]”” buttons, click to select the blend file and install it!
- Alternative: To specify a different, custom folder in a location of your choosing for mob spawning, simply change the “Rig Folder” path in the MCprep spawning tab (saved to blend file), or save a new default in the addon’s preferences (becomes the default for all new blend scenes)
- Note: all groups inside installed blend files will appear for mob spawning. A large number of rigs will currently slow down the shift-A menu displaying the spawnable rigs (will be improved in the future). Note that after installing a blend file, you do not need to save user preferences to use it in future blender sessions.
Sometimes you may need to reload a rig cache, click this refresh button if the correct rigs aren’t appearing.
Meshswap Spawner - how to use
Meshswap Spawner
The meshswap spawner provides a quick way to easily place meshswap assets in your file. These can be both 3D assets or groups, found in the meshswap blend file. See below for usage
- Step 0: By default this is already done for you: make sure the meshswap file path is a directory with valid blend files setup for appending (addon preferences > MCprep). When installed, this path will already be setup and valid pointing to the included blocks with this release.
- Step 1: Navigate to the spawner panel and select meshswap
- Step 2: Highlight the desired block
- Step 3: Press meshswap, and see the block placed in the scene
- Step 4: Modify redo last settings as needed (also accesible by pressing F6 after spawning). Options include:
- Meshswap block: You can change here which block you wanted to add
- Location: Set the location where the block is placed
- Append layer: layer to append contents of the group to; default is layer 20, setting to 0 will use the currently active layer(s) as the layers for the group
- Prep materials: run prep materials on the imported objects, particuarly useful if using cycles and it was not already setup with cycles materials
- Snapping dropdown: Snap the placed block to a rounded coordinate. Optional offset by 0.5 as well
- Make real: Instance the groups so they are made real, thus allowing you to individually modify the objects within the group. Note: this may clear any pre-applied animation.
Meshswap Spawner - add your own assets
It is possible to add your own assets for quick spawning via the meshswap spawner. You have two ways of doing this:
- Method 1 (Recommended): Make a custom blend file, then change the meshswap path to point to this file.
- Note that this setting is saved per blend file, so different projects can keep a different meshswap path saved
- You can also change the global default path for the meshswap file by going into user preferences > Addons > MCprep > Settings, and changing the filepath for “Meshswap assets” and then saving user settings (button below).
- Method 2 (Less recommended): Directly modify the meshswap file that comes with MCprep. This works fine and is technically even easier than making your own blend file, but! if you update MCprep, you risk losing your custom work as the file is overwritten.
- To edit, simply copy the link tot he meshswap file and open that blend file like you would any other blender file (You can copy the path, press control+open, and then paste in this path in the blender native filebrowser, and then hit enter).
Additional details on creating your own assets for use with the Meshswap spawner
- Step 1: (Only relevant if you also want to be able to use the meshswapping feature with this asset). Check your imported world object and see the name of the material for the object you want to setup. You might think it is “glass plane”, but if the importer names the material “glass_plane”, you need to note this name down for step 3.
- Step 2: Model you object in the mcprep_meshSwap.blend file, or append it.
- Step 3: Rename your object to exactly match the previously noted material name. If you want to have a group swappable, then name the group to match the name above.
- So the MATERIAL name found in the 3D imported world should match the OBJECT name of the model in the meshswap file to work
- Note if both a group and an object have matching names, the script will prefer the group and meswap that over the object.
- Step 4: Add necessary properties to special blocks as needed. See the meshSwap file included for examples, but the properties to add are:
- “variance”: Objects with this property when meshswapped will have some x/y variance added. If the property is set to 1, it will also have (only negative) z variance. If it is set to 0, it will only have xy variance. For instance, tall_grass is given a value of 1 so some grass is shorter than others, but flowers are given a value of 0 so they always have the same height but still have some variance in placement.
- “edgeFloat”: objects like vines, ladders, and lillypads which float off the edge of other blocks.
- “torchlike”: objects that can have rotations like a torch on a wall. Objects with this property will be determined to be either on top of a block or placed on the side of another block according to the mesh.
- Note: there is no UI for adding properties to a group, so if you want to add a property to a group (say a torch which has a pre-animated light and particle system, as the included blend file does) you must go into the python consol and add the property like so:
bpy.data.groups['groupName']['propertyName'] = 1
(the value only matters for the variance property) - Example:
bpy.data.groups['torch']['torchlike'] = 1
will add the torchlike property to the torch group, allowing it to have correct rotaitons when meshSwapped in.