Mekanism Additions

Mekanism Additions

21M Downloads

Prevent Heat Generator Overlay from 'render' folder from being used

BentoGambin opened this issue ยท 12 comments

commented

Hi, I'm developing a resource pack that supports some mods, obviously mekanism is one of them, when making textures for the heat generator I encountered some issues that I think are caused by the overlays for it at the 'render' folder (these:
image)

I already tried:

Customizing the heat_generator.json and heat_generator_active.json block models;

Editing the heat_generator.json blockstate to use differently named models,

To set the overlays textures from the 'render' folder to be 100%transparent (and used proper exporting in gimp to keep image data on transparent pixels)

and none of the above worked, so I figured I'd need some help

Issue description:

image
^ how the heat generator looks (normal mapping kinda works, parallax occlusion mapping does not (which makes me think it's caused by some sort of overlay) and specular mapping does not work at all).
image
^This picture is of the resitive heater, in which all the custom PBR maps work (they are basically the same: same reflection, smoothness, same POM depth, etc)

Steps to reproduce:

  1. Use my rp, or any thing that customizes the heat generator's textures (my rp is at https://github.com/BentoGambin/FaithForge-64x)
  2. Use a shader (in screenshots I used loop, (https://github.com/espen96/Loop/tree/loop2) but also happens with other shaders (i.e. Chocapic13's))
  3. Confirm issue/problem?

To note: On some shaders the texture works as expected (that's how I know it's not an error on my part), but since I want broad shader support, I'd love a way to disable the overlay, thanks in advance!

Version (make sure you are on the latest version before reporting):

Forge: 36.0.41
Mekanism: 1.16.5-10.0.20.447
Other relevant version: MekanismGenerators-1.16.5-10.0.20.447

commented

Those textures in the render folder aren't used (for the heat gen), it's just the block model.

commented

As thiakil mentioned, those textures are no longer used.
The new heat generator model uses three textures found in assets\mekanismgenerators\textures\block\model:

  • heat_generator.png
  • heat_generator_led.png
  • heat_generator_led_overlay.png

It also references these textures:

  • ports.png
  • ports_led.png
  • bottom.png
commented

Okay, first of all very sorry to comment on a closed thread but I did further investigation and now I'm VERY intrigued:
I copied the contents from the resistive heater block model to the heat generator .json.
If it was something texture/resource related, both models would look indistinguishable. BUT they are somehow not:
2021-02-23_17 27 29

Left: Resistive heater loding the resistive heater model.
Right: Heat generator loading the resistive heater model.
No additional change, same models, same textures used. etc.
As you can see, both are using the same model as they should, although the problems with shading regarded in the first post are somehow still there.

commented

Okay,Thank you all for the response! I will mess around a bit more, now that I have every info I may need I should find a fix.
And thank you for the awesome mod!
(Issue may be closed now)

commented

Does it still happen with the active/on state?

commented

Yes same behaviour

commented

Best guess is either it is because the shape of the blocks is different and is being used somewhere or some weird optifine/shader bug which I don't think there is really anything we can do to fix on our end.

commented

Well, I hoped it could be something fixable (preferably by me) but already expected it would be optifine/shader related. I will go bother the shader dev and see if he can do something. Thanks and have a nice one!

commented

Ok, so looked into this a bit further after discussing it with Cyanide, and the theory of what is causing it is that the heat generator renders in both the solid and translucent block layers using forge's multilayer model loader. Best guess is that optifine is ignoring the fact that only parts of it should render in specific layers and thus acting as if it is all one type and massively screwing up how lighting among other things happen. So ya seems like it is probably just an optifine bug that should be reported to them that they don't properly handle forge's multilayer models.

commented

Oh yeah, multilayer models. You will find that the Isotopic Centrifuge most likely has the same issue.

commented

@ CyanideX Actually, the isotropic centrifuge works perfectly (maybe because since it has a translucent window in the texture optifine see it as being mainly another render layer?)
@ pupnewfster That sounds very likely, I will report it to opfine's GH. Thanks!

commented

I would have tried another shader as the first step in troubleshooting. ๐Ÿ˜