MoreMcmeta/core

Emissive Textures

Neuron67 opened this issue · 8 comments

As you requested so that I may keep up with the progress on anything emissive related.
RR

I've had some more time to look into this since MoreMcmeta is now up to date with 1.18. There's a couple things that need to be implemented for a complete solution:

  1. Emissive textures themselves (likely the easiest part)
  2. Overlay textures
  3. Plugins

(3) is something I've had planned for a while now as MoreMcmeta v4. The plan is to use .moremcmeta files as the common format, but turn all of MoreMcmeta's features into plugins for the MoreMcmeta loader. The current features would simply be default plugins. I see a few benefits to these changes:

  • I've already set up the code with plugins in mind, and decoupling things further makes maintenance easier.
  • Other modders can use the MoreMcmeta loader to add texture features specific to their mod that would not fit in as a default feature.
  • It's easier for other modders to develop features for the loader; what features can be added would be less limited by the time I have to work on them or approve them.
  • It's easier to remove or stop updating plugins if they become irrelevant in a newer Minecraft version.

Specifically, my current plan is to make emissive textures a separate, non-default plugin for MoreMcmeta. There's a few reasons for this:

  • Emissive textures are already possible in vanilla 1.18 Minecraft with custom shaders, though I'm not 100% sure where the limits to that are right now. I think it's a superior solution to mods. Hence, it may no longer make sense to update the plugin at some point if vanilla progresses enough.
  • Making emissive textures work on Fabric may require a custom renderer; I'm not sure if the default Fabric API renderer supports them. A custom render isn't really what MoreMcmeta is about, and there are already existing solutions... so this could require an extra dependency not needed by any of the other plugins.
  • I'm not sure how invasive implementing overlay textures will be. I have some concerns about this. I want people to be able to remove the plugin if it causes problems.

Simple initial technical test for emissive blocks and items on Fabric (w/ Canvas renderer--confirmed that Fabric API does not support emissivity by default)

Note that plugins and overlay textures are not present here.
2022-03-10_17 18 50

any updates on this?

I've been meaning to provide more updates on this, though so far progress has been mostly API design decisions and technical work.

There's been significant progress on an API for plugins--it's near completion, though I still need to reimplement animation and texture metadata plugins as a final check. Unit testing for all new code is completed. There is also some documentation and setup for a new GitHub organization that I need to finish.

There will be some continuous integration work being merged within the next few days that will allow me to automatically publish development builds to GitHub's Maven repository for other modders and stable builds to CurseForge and Modrinth.

Besides the screenshot posted above, there hasn't been further progress on emissive textures specifically. However, it should be fairly easy to implement with what I've already demonstrated and with the new API.

I have not started on overlay textures.

I've finished re-implementing MoreMcmeta animations with the plugins API, and there is now a @MoreMcmeta GitHub organization set up for official repositories. At some point, this repository will be moved under the MoreMcmeta organization as well (should automatically redirect and move all issues, etc.). There is still some more work to do to make the Maven packages publicly available, as well as documentation work. The API now includes functionality that will allow me to implement the OptiFine animation format alongside the .moremcmeta format.

I've also begun doing some technical tests with emissive textures. (There is an overlay here, though it covers the base boat model.)
2022-12-23_02 16 57

I currently have a working implementation of overlay/emissive block, item, entity, and block entity textures on both Fabric and Forge using the .moremcmeta format. My implementation of emissive textures is a bit different from others because I render the overlays as translucent. This enables you to create partially transparent emissive textures. For example, you could animate the emissive overlay so that it periodically changes from full to zero transparency, creating a blinking light effect.

This is a list of the remaining work required before a 4.0.0 release:

  • Overlay/emissive textures testing and code cleanup
  • OptiFine format compatibility for emissive textures
  • OptiFine format compatibility for animated textures
  • A new animated textures feature that allows smooth alpha/transparency blending when a texture is interpolated
  • Porting the plugins API and emissive plugin to 1.16.5, 1.17.1, and 1.19.3
  • Moving this repository into the MoreMcmeta GitHub organization (moving is easy but some Gradle/Maven config changes needed)
  • GitHub packages setup to make Maven packages publicly downloadable
  • Basic documentation for developing with the plugins API--more documentation will come after the release

None of these things are large projects. I'm hoping to get this released within the next few weeks, but I don't want to promise that yet.

Final preparations are being made for a release. Unless something major comes up, 4.0.0 should be out this week.

The emissive textures plugin and update 4.0.0 have been released. Please update to 4.0.0 before using the plugin.

(The emissive plugin is still awaiting approval on Modrinth.)