Fabric API

Fabric API

106M Downloads

Lighting issues with fabric-api-0.3.0+build.175

Pzkane opened this issue ยท 7 comments

commented

Come on, Mojang. That's a hack if I've ever seen one.

commented

This is actually a correct lighting outcome for the enhanced AO calculator. If someone made a modded block with that geometry they would probably never want/expect it to be lit that way.

Unfortunately Mojang and pack makers are exploiting the terrible lighting to achieve such effect because, well, they don't have any other options.

I see at least two ways to handle this, maybe we do both:

  1. Make HYBRID the default lighting mode. (Prevents this specific problem at least).

  2. Support a JSON listing, maybe via resource pack, of blocks/block states that should always receive a specific lighting treatment. Provides ultimate flexibility for pack makers who are dealing with a mix of models/modded content with different heritage. We could ship with defaults for known trouble makers.

Thoughts?

commented

Is it possible to switch to hybrid lighting mode in latest builds?

commented

I think it should render the weird vanilla way by default and any block that wants otherwise should change it

commented

You can change the lighting mode in the current build by updating indigo-renderer.properties in the config/fabric folder. Change it so ambient-occlusion-mode=hybrid

commented

@Prospector Currently there's no way to know what the mod author intended unless we assume models that uses Meshes (which have to be created by the API) want enhanced lighting and models that are "vanilla" want vanilla lighting. That's what hybrid mode does.

Update: That wasn't quite accurate. There's a model method that can be overridden (isVanilla() or something like that, I forget the exact name) so it doesn't have to be a meshed-based model but it does need to be a custom model. That's probably fine.

You are then missing out on some visual improvements and bug fixes that come with enhanced lighting, but that will probably give the fewest bug reports.

commented

Here's an example of the problems with the vanilla AO for blocks that aren't paths. Intention is to enable modded blocks to have lighting that is decent.

https://imgur.com/a/eRpNmoB