Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biome blending for tints #197

Open
raymondjxu opened this issue Jun 23, 2021 · 3 comments
Open

Biome blending for tints #197

raymondjxu opened this issue Jun 23, 2021 · 3 comments

Comments

@raymondjxu
Copy link
Member

raymondjxu commented Jun 23, 2021

As of #25, we added biome tints. However, Vanilla has "biome blending," where the tints of blocks on the edges of biomes are blurred together to make the change between biomes more gradual/subtle. We do not; and this looks especially silly with trees (screenshot below).

Screen Shot 2021-06-23 at 1 43 41 PM

This looks silly.

To reproduce

  • Travel to the coordinates in the screenshot on the MineWeb test server.
  • Observe the interesting colours.
@Karang
Copy link
Collaborator

Karang commented Jun 23, 2021

A pre-requist for this would be to get the block accurate biome in mineflayer. Since 1.15 the server only send biomes values for squares of 4x4 blocks, the client has to interpolate to get the individual block biomes. prismarine-rng implement the VoronoiLayer code that does this interpolation https://github.com/PrismarineJS/prismarine-rng/blob/master/lib/biomes/layers.js#L561 but it needs to be integrated into mineflayer (and it should be computed on demand as it is not a trivial computation and biomes are rarely needed).

Once each block has a correct biome value, blending two tints is very straightforward, we just have to put a different tint on each vertex of the cube instead of the same on every vertices.

@raymondjxu
Copy link
Member Author

raymondjxu commented Jun 23, 2021 via email

@Karang
Copy link
Collaborator

Karang commented Jun 23, 2021

Yes this part of the computation of the tint we put on each vertex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants