Kingdom-of-The-Moon / FiguraRewriteRewrite

rewrite of the rewrite of figura
GNU Lesser General Public License v2.1
1 stars 1 forks source link

[Bug] Emissive textures do not seem to respect ModelPart:setVisibility #90

Closed Ulhar closed 1 year ago

Ulhar commented 1 year ago

If a part is marked as visible within Blockbench, and it has emissive textures on it, then those emissive textures will always be visible on the model, even if the part in question is marked invisible by the script (although setting the part's secondary render type to NONE might relieve this); likewise, if a part is marked invisible, then emissive textures will not render on it even if scripts make it visible (and changing secondary render type won't help) (edit: there was no bug, I just made a rather silly error)

KitCat962 commented 1 year ago

Do you have any other mods installed? Or is the only difference from normal install the Quilt loader?

KitCat962 commented 1 year ago

I cannot replicate this behavior with the setup you provided. Its probably a mod incompatibility

vanilla_model.ALL:setVisible(false)
models.model.root.Head:setVisible(false)

image image

Ulhar commented 1 year ago

Perhaps it may have some effect that I was toggling not the Head group, but individual items within that group? (i.e. specific cubes, with a setup like shown below, where each cube has a different facial expression) image

Testing on my own, it does seem at least to respect visibility rules when a parent group is hidden (i.e. models:setVisible(false) to hide all custom models)

As for mods, I have these installed: Continuity, Enhanced Attack Indicator, Figura, Indium, Inspecio, Krypton, LambdaBetterGrass, Language Reloade, LazyDFU, Lithium, Mod Menu, Phosphor, Presence Footsteps, Screenshot to Clipboard, Sodium (all on latest version on Modrinth)

KitCat962 commented 1 year ago

I've tested on cubes, but I did not get any other outcome. I'm pretty sure models has some unique code with it that blocks all rendering for performance reasons. Can you try with the Head group? Also, can you show how you are doing emissives?

I'll test with the other mods shortly

KitCat962 commented 1 year ago

Even with your modlist I have yet to have the bug occur. Can you provide screenshots depicting the bug? Also, I really want to see how you are doing emissives.

Ulhar commented 1 year ago

...I just realized I renamed my model file, but kept saving to the old one, so I was referring to the new name in code (which hadn't gotten emissives attached yet) but only the old one had emissives, so this is completely a mixup on my part 😅 Once I fixed the naming error though, everything worked out as it should have, so there isn't actually a bug here 👍