Jump to content

[1.16.5] Multiblock Shadows Problem


Boy132

Recommended Posts

So I've made a multiblock structure (and basically followed this video: https://www.youtube.com/watch?v=GQRxeJSoUI4) and everything works fine but there are some lighting problems because the model of the controller is bigger than one block (it is 2x2 blocks):

image.png.845b4d8b99aa2b8d8c02816d4d50f29d.png

I know that you used to fix this by overriding isFullBlock and later getRenderLayer but both of these methods don't exist anymore. Using

RenderTypeLookup.setRenderLayer(block, RenderType.getCutout())

 didn't work either.

Edited by Boy132
Link to comment
Share on other sites

The darkness is associated with ambient occlusion, in your block class you can modify this with:

@Override
public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
	return (some float);
}

I've found that small values (usually around 0.1F) reduce the dark. Alternatively in your block model json you can disable or enable occlusion with:

"ambientocclusion": true/false

 

Edited by urbanxx001
Link to comment
Share on other sites

5 hours ago, urbanxx001 said:

The darkness is associated with ambient occlusion, in your block class you can modify this with:


@Override
public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
	return (some float);
}

I've found that small values (usually around 0.1F) reduce the dark. Alternatively in your block model json you can disable or enable occlusion with:


"ambientocclusion": true/false

 

Thank you for your answer! Sadly none of that worked for me, I tried it with 0f, 0.05f, 0.1f and 0.2f (and editing the model json) and the result were the same as before.

Link to comment
Share on other sites

2 hours ago, Boy132 said:

Thank you for your answer! Sadly none of that worked for me, I tried it with 0f, 0.05f, 0.1f and 0.2f (and editing the model json) and the result were the same as before.

Ah ok I'm sorry to hear that. I dug a little and it appears if occlusion doesn't solve it, then it might be an issue with Forge's lighting engine and/or model loading, according to this issue thread. To summarize, the engine is particular about vertex ordering in the model, which means certain sides are incorrectly taking the lighting values that should be applied to other sides. The only thing I can suggest is enabling an experimental feature in Forge's config called experimentalForgeLightingPipelineEnabled.

 

Edited by urbanxx001
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.