BramStoutProductions / MiEx

A modern Minecraft Exporter
BSD 3-Clause "New" or "Revised" License
61 stars 9 forks source link

Wrong Resource Pack Layering #61

Closed Fyoncle closed 6 months ago

Fyoncle commented 6 months ago

image The whole sculk thing looks blue with Faithless resource pack, but only inside should be white and inside is blue. image Theres one duplicate object with the white version so yea, some kind of weird exporting glitch is there, is it possible to fix?

BramStout commented 6 months ago

The resource pack is able to make the inside blue and the outside white, because it's actually two cubes, one blue and one white. But, the blue cube has its normals facing inwards, while the white cube has its normals facing outwards. This works, because Minecraft renders out blocks with backface culling, so the blue cube is only visible on the inside and the white cube is only visible on the outside.

There was a small difference between how MiEx and Minecraft handle block models, that caused the blue cubes normals to not face inwards, but that has been fixed in the latest version.

So, MiEx and the Faithless resource pack both work correctly. The issue here is Blender not rendering the meshes with backface culling. This is actually the same issue as your other post https://github.com/BramStoutProductions/MiEx/issues/59

You can fix this by turning on Backface culling in the material settings. I'll check in with BlueEvilGFX to see if we can automate this in the Blender Addon