Skip to content

Add trivial implementation of 3d biomes and 3d blur (off by default) - #1225

Merged
leMaik merged 11 commits into
chunky-dev:masterfrom
NotStirred:feature/render_3d_biomes
May 25, 2022
Merged

leMaik merged 11 commits into
chunky-dev:masterfrom
NotStirred:feature/render_3d_biomes

Conversation

@NotStirred

@NotStirred NotStirred commented Apr 16, 2022 •

Copy link
Copy Markdown
Member

In the future it would be great to add a better implementation for performance

@NotStirred
NotStirred marked this pull request as draft April 16, 2022 06:08
@NotStirred

Copy link
Copy Markdown
Member Author

Still need to do #1225 (comment). Do you want me to add it to the json serialisation for the scene? It shouldn't affect anything but the Chunks need to be reloaded dialog if it gets out of sync (at least afaict atm)

@NotStirred

Copy link
Copy Markdown
Member Author

Currently the only problem with this PR I see is that the biome palette indices are loaded into a structure which isn't yet implementable by anything else. Ideally we'd just have the structures be generic and it'd just work but java generics can't handle primitives :(

@NotStirred
NotStirred requested a review from leMaik May 13, 2022 22:21
biomeStructureImplementation.getItems().addAll(biomeStructureNames);
biomeStructureImplementation.getSelectionModel().selectedItemProperty()
.addListener((observable, oldvalue, newvalue) -> {
scene.setBiomeStructureImplementation(newvalue);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A prompt (as for the emitter grid implementation) would be nice in a follow-up PR 👍

NotStirred added 11 commits May 22, 2022 22:38
In the future it would be great to add a better implementation for performance
 - this is good enough for now
BiomeStructure now completely replaces WorldTexture, which are now loaded as BiomeStructures if the octree format is outdated
Add biomeBlending toggle
Add reload chunks confirmation on relevant changes to biome settings (with minor jank due to no snapshotting)
Refactoring of the BiomeStructure implementations
…ementations are stored for futures reference
Return a default implementation instead of null for an invalid BiomeStructure registry key
similar to how the octree factory works
…dices implementation

It defaults to the previous implementation
@NotStirred
NotStirred force-pushed the feature/render_3d_biomes branch from 01941b8 to cf6a04a Compare May 22, 2022 21:41
@leMaik
leMaik merged commit 785b362 into chunky-dev:master May 25, 2022
@leMaik leMaik added the minecraft Block updates, world format changes, and anything related to Minecraft updates label May 25, 2022
@NotStirred
NotStirred deleted the feature/render_3d_biomes branch October 10, 2022 22:03
NotStirred added a commit to NotStirred/chunky that referenced this pull request Apr 3, 2023
* Add trivial implementation of 3d biomes and 3d blur (off by default)

In the future it would be great to add a better implementation for performance
 - this is good enough for now

* Rename using3dBiomes->use3dBiomes

* Fixes and refactoring to trivial implementation datastructures

* Complete implementing BiomeStructure
BiomeStructure now completely replaces WorldTexture, which are now loaded as BiomeStructures if the octree format is outdated
Add biomeBlending toggle
Add reload chunks confirmation on relevant changes to biome settings (with minor jank due to no snapshotting)
Refactoring of the BiomeStructure implementations

* Add additional javadoc describing how the trivial BiomeStructure implementations are stored for futures reference

* Remove incorrectly boxed int due to changed implementation

* Add better error handling for BiomeStructure registry usage and loading itself

* Add selection option for BiomeStructure in the UI

Return a default implementation instead of null for an invalid BiomeStructure registry key
similar to how the octree factory works

* Implement better hashing for xyz positions

* Add BiomeStructure.Factory.createIndexStructure, for biome palette indices implementation
It defaults to the previous implementation

* Simplify initial checkbox disable logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minecraft Block updates, world format changes, and anything related to Minecraft updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants