MCprep
MCprep copied to clipboard
Support "Installing" and layering multiple resource packs
Current setup:
The concept of a resource pack is simply a single folder selection. It can either be a "real" resource pack, or a flattened folder of textures (not recommended though). When a user wants to swap texture pack, it assumes this whole folder is one pack and just greedy replaces textures as it finds it (with a preferences for textures in the "blocks" folder, since there are some name clashes in other folders like items).
Proposed change
Function more like Minecraft itself, by having an awareness of the "installed resource packs" and being able to select multiple (ticked as active), layering and applying textures in the order of the first resource pack found that supports a given texture. Then, when prepping materials (and option is ticked) or when pressing Swap Texture Pack, the process is adjusted to iteratively go through all the resource packs until either all selected objects' materials have been applied, or we finished going through the last resource pack.
Mechanics
This would require changing the concept of the "active resource pack", which right now is just a folder path for a specific resource pack (defaulted to the MCprep addon). We would need to change this to instead be
Considerations
- The default experience should be nice and not too confusing if only using a single resource pack. Make sure always at least one pack is selected.
- Consider forcing the MCprep texture pack to ALWAYS be selected, but potentially at the bottom of the "stack".
- Consider creating custom UI that is itself not a list view, but more embedded.
- Do we list all texture packs in this, and just tick the box for the ones we want active? Or should it be a button to select from an initially hidden list of texture packs, and then added as a "slot"
- Want to make sure it is convenient to experiment and try different packs, something like a gallery view selector would be useful for this (either in the panel or as a popup).
- Do we want to encourage users to install resource packs into the addons directory? Probably not, much better would be to prompt users to place the resource packs they use next to their actual or existing world export, or next to their blend file.
- But in practice, users will want to be lazy and just have it be conveniently where they want. Maybe offer to have a list of multiple paths to search for packs? Gets messy though.
- What is the experience of "installing" a resource pack?
- This would allow installing a .zip file, but then this abstracts the folder structure from the user. ie they won't necessarily know where it was installed to.
- May create confusion, as users may assume it's connected to the resource packs installed in Minecraft itself. We don't want to mess with that, as we need to unzip folders and such to use with blender.
- For big projects, best practice is to always have local resource packs (ie placed within the project folder, and not addons folder). Make sure this workflow is easy and maybe even encouraged visually with options.
- Should not assume the resource pack always goes directly adjacent to the blend file, it could be better up a level and down into an 'assets' folder for instance.
Annoying around-looker here, I honestly think a global system would be better overall, but there could be a system for multiple resource-packs folders (like with Asset Pack folders). I think that'd work for most users. But as a "sync the projects and render on multiple machines" person, I would also advocate for an option, more or less hidden (dependent on UX), that would locally pack the resources. Maybe even do it as a default. Say, I install my 5 texture packs I often use and have a list of available packs. Normally, choosing a texture pack links to the blender addons folder/whatever folder was configured (shared folder, cloud folder, ...), but enabling The Option™ would copy the resource packs next to the blend file and set the file paths to relative
Just an idea obviously, but that's what I'd use for for example packaging up a project to render on other machines, while at the same time satisfying my, as you called it "want to be lazy"
Another note I want to add, where I'm not sure how it's being dealt with right now, is mods. I know jmc2obj deals with mods reasonably well, I'd leave that as a consideration for implementation
I want to add on to the install part with another thing: download from Modrinth
Modrinth is an open source platform for mods, modpacks, and resource packs, and has gotten extremely popular over the years for being creator. They have a very open API, so implementing wouldn't be too difficult, and it would enhance the user experience for resource pack installation
So design wise, I think we could do the following:
- Have a menu for selecting resource packs that resembles the Minecraft resource pack menu and acts the same way with stacking
- Within that menu, have a "Search for resource packs online" option that uses Modrinth as a source for resource packs and lists them based on the user's suggestions
- When a resource pack is installed, parse the contents and generate some JSON that we
- In prep materials, give a notice if the user selects SEUS or Specular but doesn't have a PBR resource pack select telling them there will be no difference in materials without a PBR resource pack
What do you think @TheDuckCow?