-
Notifications
You must be signed in to change notification settings - Fork 14
01. Overview and Concepts
At its core, all that MiEx does is allow you to open up a Minecraft or Hytale world and export out a region to USD (Universal Scene Description), which can then be imported into animation software (like Blender, Autodesk Maya, Side Effects Houdini, etc.). But, in order for MiEx to be able to do this, it does need to know how to export out the contents of the worlds. It needs information about what blocks exists, the models for blocks, textures, what biomes exists, and so on. It does this by using a system similar to the resource pack system found in Minecraft.
MiEx has a folder (called resources by default) that contains "resource packs". Each resource pack is itself another folder which contains a bunch of files that MiEx can use to figure out how to export out worlds. When launching MiEx, these resource packs are shown as "available resource packs". You can then enable the specific resource packs that you want. You can enable as many as you want, turning them into "active resource packs". MiEx will then look in the active resource packs for the data that it needs. The order of active resource packs can also be changed. Active resource packs higher up on the list will override resource packs lower on the list. This system works the exact same as resource packs in Minecraft. By enabling or disabling different resource packs or changing their order, you can change how MiEx exports out worlds.
This means that you can use the same resource packs that you use in Minecraft, in MiEx as well. MiEx doesn't support resource packs in the form of zip files, though, so you would need to unzip them into a folder in that case. MiEx supports Minecraft Java Edition resource packs, Minecraft Bedrock Edition resource packs, and Hytale resource packs / mods. They all work interchangeably.
These resource packs can do simple things like providing textures, to more complicated things like specifying block state and block model files. MiEx also has its own set of files found in resource packs, next to what is normally found in Minecraft and Hytale resource packs. These extra files provide MiEx with extra information on how to export out worlds, giving you more control over MiEx rather than that information being hard-coded into the source code of MiEx. One such file, for example, is miex_config.json which contains a bunch of settings for exporting. Different resource packs can specify this file in order to change specific settings, and enabling or disabling those resource packs will let you control the specific export settings.
Resource packs don't need to provide all files all of the time. Because multiple resource packs can be enabled at the same time, they are effectively composed together. So, each resource pack only needs to provide the files that it wants to change. There is one special resource pack called base_resource_pack. This resource pack is always enabled and cannot be disabled. It contains the base files, like the default miex_config.json file and also the built-in Minecraft Java Edition resource pack. When you first launch MiEx, it'll look for Minecraft Java Edition installed on your computer and extract the built-in resource pack from the Minecraft jar file. This contains all of the files needed for MiEx to be able to export out vanilla Minecraft worlds. There is a tool in MiEx to be able to update this base resource pack to newer versions of Minecraft. If you were to open up a Hytale world, then it'll generate an equivalent base_resource_pack_hytale from the Hytale installation on your computer.
Minecraft and Hytale worlds can be modded and so contain blocks not found in the base game. MiEx can read in these worlds and see that these modded blocks are there, but by default would not know how to export out those modded blocks, because it is missing the files that provide that information. So, those files need to be extracted from the mods and placed into a resource pack. When that resource pack is enabled, MiEx will have the files needed to export out those modded blocks. MiEx tries to do this automatically when you open up a world, but sometimes mods might implement certain blocks in a way that MiEx can't understand. In those cases, you would need to manually edit the resource pack with new definitions for block states and block models that MiEx can understand.
MiEx can open up Minecraft Java Edition worlds, Minecraft Bedrock Edition worlds, and Hytale worlds. Internally, it all gets converted into the same data. This allows for worlds and resource packs from different editions / games to be mixed and matched. However, Minecraft Java Edition and Bedrock Edition do call some blocks different names, so in order for this to all work together, MiEx has a translation system built in. The base_resource_pack comes with default translation files for Bedrock Edition and older versions of Java Edition (like converting old block ids into block names) which translates the blocks and biomes so that they all use the same names. These translation files can be overridden in other resource packs for more control over how worlds are loaded in. Such translation files can also be provided for Hytale worlds.
When you open up a world, MiEx will try to detect all mods, resource packs, data packs, and behavior packs used in that world and give you an option to automatically enable the resource packs installed in MiEx to match what was used in the world. If MiEx can't find the right resource packs installed, it provides you with a dialog that you can use to automatically install these mods, resource packs, data packs, and behavior packs into a resource pack in MiEx.
When you want to export out a world, you select an "export region". That is the part of the world that MiEx will export out. You can have multiple export regions in your export. Each region is cut up into "export chunks" (different from Minecraft or Hytale chunks), the size of which is configurable. Cutting up the world into chunks makes it more manageable. MiEx also allows you to tag export chunks as FG (foreground) or not, which is mainly used to help organise the export chunks.
MiEx exports out into the file format USD (Universal Scene Description). It doesn't export everything out into one big file, but rather into multiple smaller files, which makes large world exports more manageable. The main USD file can then be imported into your animation software, which will then import in your entire export. USD allows you to represent entire scenes, including the materials of objects, so MiEx also exports out materials for you. These materials are generated using material templates found in the active resource packs.
Unfortunately, most animation software don't fully support importing in USD materials. Preferably you would be able to specify the same shading nodes, that you'd normally use in your animation software, in the USD file and that your animation software imports them in like normal. This doesn't really happen, so to work around this we provide addons and scripts for a few different animation software that adds in this support.
MiEx also exports out the materials for objects, so that you don't have to set them up manually after importing in the world into your animation software. It generates these materials from material templates. These templates can be specified by resource packs and so can easily be modified to create the specific look that you want. MiEx also provides some example resource packs, some of which provide material templates for different animation software and render engines. You can download these example resource packs using a tool found in MiEx.
MiEx also comes with a few additional tools, like a PBR Generator and Atlas Creator. These tools can be found under the "Tools" button in the lower right corner of the main MiEx window. These tools are not part of the main exporting workflow, but rather are more of a "standalone tool" embedded into MiEx.