Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Irregular Lighting on Chiseled Blocks.

oitsjustjose opened this issue ยท 38 comments

commented

Prerequisite Info:

The Issue

An odd GL Lighting error occurs, and I can't pinpoint it. The issue occurs randomly, but it's new and quite a jarring appearance. I've noticed that on my server, the issue happens 100% of the time. When I download the server map locally and play it in the same modpack, the issue only happens ~80% of the time.

Expected:

2017-10-15_00 14 31

Actual:

2017-10-14_23 45 54

When the issue occurs, it is persistent. I have tried removing a couple of culprit mods, but I'm not sure what might be causing it for certain.

commented

So I've been too swamped to play lately, but I wanted to drop in and update this issue a bit.

I've made a completely new world with a few different mods, and I continue to have issues. I'm on the latest version of CTM, Chisel and CnB with this issue still.
I tried disabling the dynamic renderer and cranking dynamicModelFaceCount up absurdly, and the issue still persists... and I'm not sure how this problem isn't noticed by more people.

commented

if you disabled the dynamic renderer, it makes me wonder what is going on, since without the dynamic renderer C&B is basically just using static block models.

I'm probably more confused now then I was before. I was almost certain it was because C&B's uses TESRs for complicated models ( dynamic renderer )

I'll see if I can fire up some instances with C&B and chisel and see if I can re-create the issue.

commented

I've put together a basic instance and tried this, I've had no luck reproducing the issue itself however.

My Instance:
Chisel-MC1.12-0.1.0.23
chiselsandbits-14.11.jar
CTM-MC1.12-0.2.3.9.jar
flatcoloredblocks-mc1.12-6.6.jar
forge 1.12.2-14.23.1.2556

I created a bunch of complicated renders, and some simple ones, then changed the time to and from dark and back a few times, tried loading and reloading about 5 times.

But no luck so far, I figured since you said 80% chance that it seems like that should be within that.

I had a random idea, and made a build based on that, https://www.dropbox.com/s/bgz270zkbivdapi/chiselsandbits-14.0-enabletex.jar?dl=1

So you can try that and let me know if you see any improvement, any other instruction on how to reproduce it would help as well this is unfortunately one of those things where i'm sort of just flailing about hoping to hit a button in the dark unless I can reproduce it myself.

commented

Unfortunately this isn't working either.

I honestly have no idea what it is. I'll test some more in the morning and get back to you with some results. Thanks for all the effort!

commented

have the same problem i'm on 1.12.2 ATM3 mod pack

image

commented

Through systematic disabling of mods, I found in my case, the mod that is causing the lighting conflict is Immersive Engineering. Can anyone else confirm if this is the case for them?

commented

So, after continued investigations I found a fix/workaround, that should work regardless of what mods you have installed. Go into the forge.cfg file, find the setting "B:forgeLightPipelineEnabled=", and set it to "false". Ironically that setting is there to fix lighting on custom models, if it is set to "true".

Hopefully this discovery helps any players that are having this lighting issue, and give @AlgorithmX2 an idea of what might be going on.

commented

Can anyone duplicate this issue with Forge 14.23.1.2582? Because I don't wanna call this too early, but it SEEMS to have fixed the problem for me... I'll update if it resurfaces, but a few reloads have shown it to not be coming back so far.

commented

I have this issue as well. Very difficult to pin down a mod conflict causing the issue because it doesn't happen all of the time. Removing CTM didn't seem to do the trick. I tried ShicKla's suggestion but I got a "java.lang.NullPointerException: Tesselating block model" crash I think caused by other mods (possibly Better Foliage and/or Architecturecraft). I have removed Immersive Engineering to test and it seems to be working for now, but I am not sure until I play a little with it. That isn't a great solution because our server pack is IE focused.

EDIT: Well, of course I tried one more thing and that seems to have worked (at least for now). Changed the following line in IE's config to true.
B:disableFancyTESR=false

EDIT: Wow, spoke too soon. Still happening with that setting change.

commented

@AlgorithmX2 I downloaded the build you linked and set the configs accordingly, and can confirm at least in my case, that it did correct the lighting.
By the way I am using Forge 1.12.2-14.23.1.2555
If you need more info from me just let me know.

commented

@AnnaMayBelle I looked though the forge change log but I didn't see anything that sounded relevant, but let us know if it comes back or not.

In the mean time, anyone still having problems can try https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1 I added a new setting to the client settings. disableCustomVertexFormats; If you could set this to true and see if the issue persists, please not that make sure that forgeLightPipelineEnabled=true is set when doing this test.

Thanks to everyone for helping try and track this down too, These sorts of issues are quite difficult, and even if this setting does solve the problem it only narrows the scope of the problem, rather then outright defining the cause.

commented

Alright, I've got another test together, https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1

I've separated out C&B's model compression to be a separate setting, can we try reproducing the issue with enableModelCompression=false, and disableCustomVertexFormats=false, and with enableModelCompression=true and disableCustomVertexFormats=true

Hopefully this might shed some light on the root cause.

In the config menu enableModelCompression is ( Compress Vertex Data In Memory )
and disableCustomVertexFormats is now ( Disable Using Custom Vertex Formats )

commented

@AlgorithmX2
Here is the chunk of the log file containing what you are looking for. If you need a full log file let me know.
https://gist.github.com/ShicKla/73b74788407a69ab58456c6c8a679979

commented

That was prefect, at least on your part, I on the other hand goofed a little, But regardless, I've had an idea based on what I saw, and have tightened up detection.

https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1

So this will either fix the issue, or will fix my logging to be a little better and let me see the real values for the data. So hoping that it just fixes it and we can wrap this up, other wise maybe something in the improved log will help me out.

commented

@AlgorithmX2
Here are the results from the testing using the recent build you linked. Just to note forgeLightPipelineEnabled=true for all tests.

enableModelCompression=false
disableCustomVertexFormats=false
Result: Lighting Glitch

enableModelCompression=true
disableCustomVertexFormats=true
Result: No Lighting Glitch

Even though you didn't ask for it, I did the following setting combinations as well.

enableModelCompression=true
disableCustomVertexFormats=false
Result: Lighting Glitch

enableModelCompression=false
disableCustomVertexFormats=true
Result: No Lighting Glitch

Also, I am still using Forge 1.12.2-14.23.1.2555

commented

Thanks for the effort, it definitely seems that the issue is tied to the custom vertex formats, and not the model compression. Its progress, though I'll admit not much.

For the next round we'll set enableModelCompresson=true, disableCustomerVertexFormats=false
I've added two new settings, useGetLightValue, and enableFaceLightmapExtraction

both which default to true, We'll want to see if disabling either of these or both of them fix the problem.

new test version:
https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1

commented

@AlgorithmX2
Here are the setups and results.

useGetLightValue=true
enableFaceLightmapExtraction=true
Result: Lighting Glitch

useGetLightValue=false
enableFaceLightmapExtraction=true
Result: Lighting Glitch

useGetLightValue=true
enableFaceLightmapExtraction=false
Result: No Lighting Glitch

useGetLightValue=false
enableFaceLightmapExtraction=false
Result: No Lighting Glitch

Hope this helps, and I am game to continue testing if need be.

commented

So based on the results you've gathered so far, the issue seemed to be in the other models, they appear to contain lightmap data. Which makes no sense...

New Test, https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1

This is going to be a bit more messy, we'll want to set
useGetLightValue=true
enableFaceLightmapExtraction=true

This time I don't have any new settings to flip around, but instead the mod will print out lightmap data as its captured, in my test environment it looks like this in the log file,
[INFO] minecraft:dirt[snowy=false,variant=dirt] piped data = 0
[INFO] minecraft:dirt[snowy=false,variant=dirt] piped data = 0
[INFO] minecraft:dirt[snowy=false,variant=dirt] piped data = 0
[INFO] minecraft:dirt[snowy=false,variant=dirt] piped data = 0
[INFO] minecraft:dirt[snowy=false,variant=dirt] piped data = 0

Since based on our tests your has data it should print that data and show different things. Its probably going to be a little on the large size, and will only happen when the mod goes to render models so once you can see the lighting glitch in world we should have some data in your logs.

Let me know what you find I guess upload a log or pastebin or some such, or let me know if theres an issue. I'm pretty perplexed and hoping that this goes some where new...

commented

Unfortunately the issue was not fixed, but the logging is showing the values now.
https://gist.github.com/ShicKla/41e6d6a6b30cfa0fe312be4989c4ccd6

commented

Drat... and based on the numbers all of these faces should be glowing in the dark...

I'm afraid nothing to do but to keep digging, I've added several more items to the log to help understand what VertexFormat and quad type the models are using, honestly I'm quite perplexed by the results thus far.

https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1 it occurs to me that this is the same URL over and over again... shrug

Thanks again for the help so far, I'm really hoping we manage to track this down.

commented

Two more fix attempts,
https://www.dropbox.com/s/68ycsiw5bmuudnd/chiselsandbits-14.0.jar?dl=1
https://www.dropbox.com/s/uzxzjgclbk3gp6e/chiselsandbits-14.0-b.jar?dl=1

Both are in the same vein, but if the first one doesn't work the second one is a bit more ridged. No need to worry about the logs this time, I haven't changed them.

commented

@AlgorithmX2
Good news, the first one seems to work. I was no longer able to duplicate the glitch with it. I also tried the second one and as expected it worked as well.

commented

Huzzah! Now I just need to clean up this logging and make a release.

commented

14.12 is on the way. https://minecraft.curseforge.com/projects/chisels-bits/files

Hopefully everyone will will have the same experience with this.

commented

First guess is that its probably another mod changing the GL State and not reverting it back to the original value, and yeah... that means that its not gonna be fun to track down. Because it could possibly be anything.

However a good first step would be to just try with just C&B, at a glance it looks like its all vanilla material, so you should beable to confirm that another mod is responsible with that one step, after that its either going to be me having to reproduce that, or doing a binary search to track down the mod causing the issue.

commented

Figured out that the culprit was either Chisel or CTM. Further testing underway.

commented

Hmm... Certainly couldn't have thought it was one of those... curious...

As a side note you could dial dynamicModelFaceCount up to some absurd number to disable the dynamic renderer, it will probably result in more "update lag" when updates happen around complicated C&B work, but it should prevent C&B from using TESRs which are affected. ( unless its not the TESRs that are affected.. that would be interesting too... )

commented

Having a similar block lighting issue myself, but related to Hardcore Darkness. With Hardcore Darkness turned off, blocks behave fine. With Hardcore Darkness turned on, a block goes full-bright as soon as I chisel into it, but returns to proper lighting after closing and fully reloading Minecraft.

commented

Im having the same problem except I don't know whats causing it
2018-06-29_15 11 31
2018-06-29_15 11 32

commented

@SteamDoge9000

I'm not really sure what blocks in this picture is chiseled, and incorrectly lit. You may have to provide more information if this is the case.

You seem to be looking at a block from Crafting Pillars Mod, and an armor stand from bibliocraft.

Based on the fact that your providing two pictures with slightly different lighting, you might be having an issue with a mod messing with GL State and not re-setting it correctly. The difference is probably caused by something only rendering based on where you are looking.

That said I'm not seeing fully lit chiseled blocks in a dark area, so it doesn't seem all that related to C&B and this original issue ( C&B blocks being fully lit ignoring surrounding light levels )

commented

THIS is not chissled
its the diamond chest juke pillar and the armor stand

commented

Reiterating from my previous post,

Based on the fact that your providing two pictures with slightly different lighting, you might be having an issue with a mod messing with GL State and not re-setting it correctly. The difference is probably caused by something only rendering based on where you are looking.

However from what I can tell your issue doesn't seem to have anything to do with C&B specifically.

commented

how do i reset the GL

commented

You need to find the block or entity that is causing the issue, and report it to that block's author.

commented

ok then
but its ocurring on multable blocks
could it just be a texture glitch or somthing?

commented

GL uses a system of states. If one mod changes a state, then forgets to change it back. It will affect any number of other blocks rendered after it.

Its just my personal experience that the issue is GL State related, however such issues can be difficult to track down, especially if you didn't just place down the problem block. it can also be caused by mobs, or gui mods.

You could back up your world and try removing mods to see if the issue fixes it self, possibly reducing the number of blocks you need to check.

However this is about all the advance I can offer.

commented

2019-09-14_04 16 56
Having this lighting issue whereas a wall made from C&B is letting light pass through it though its supposed to be a solid wall.