-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Materials in Chunky are weird:
- Blocks are materials, which is mostly only useful for customizing them (players think in blocks, not block surfaces)
- Some blocks (eg. lava cauldron and open eyeblossom require hard-coded material changes)
- The current and previous materials are stored in the ray and equal the block by default
With the open eyeblossom, Minecraft itself introduced per quad material properties (only the emissive quads emit light). We should update Chunky to allow that, too. For PBR, we need per quad specular/normal/emittance maps anyways).
Proposed solution:
- Remove the "block = material" assumption and don't let every block implement
Material(the block doesn't decide the material that one gets when intersecting it, that's the block model's job) - Most blocks only need a single material, though, so add some Material registry that can provide a
Materialfor a block (and, at a later point, some combination of block properties, see Add a way to change material properties for different blockstates #1145), which the block model may or may not use (depending on the model, eg. lava cauldron might use the lava material instead). - For quad model blocks, add a method that returns all materials (one for each quad, similar for how textures work)
Metadata
Metadata
Assignees
Labels
No labels