Skip to content

Conversation

@louis-e
Copy link
Owner

@louis-e louis-e commented Apr 10, 2025

No description provided.

@louis-e louis-e merged commit fa6a023 into main Apr 10, 2025
3 checks passed
@louis-e louis-e deleted the pull403-adaptions branch April 10, 2025 19:50
@Oleg4260
Copy link
Contributor

Oleg4260 commented Apr 11, 2025

Hi Louis, thank you for merging my PR, but looks like we have some disagreement here, and you cancelled a lot of my changes and made some parts worse. Please read my review here, I am asking you to revert some of your changes in this commit

if !editor.check_for_block(x, max_y, z, Some(&[STONE]), None) {
editor.set_block(groundlayer_block, x, max_y, z, None, None);
editor.set_block(DIRT, x, max_y - 1, z, None, None);
editor.set_block(DIRT, x, max_y - 2, z, None, None);
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be removed, it looks much better with 2 blocks of dirt under it, like in a normal minecraft world, also this depth might be needed in the future for some features that go in the ground

Copy link
Owner Author

Choose a reason for hiding this comment

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

I removed it for generation speed reasons, but I understand your point. I've noticed some generation performance issues since the last release and wanted to counteract this by removing this layer for now until we managed to improve the performance again. I can add the line again in the meanwhile

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sorry, but what you did is really weird. You basically cancelled almost everything I did, you made trees randomly spawn again and the ice in the winter mode now looks weird, also this code is much bigger and more complicated. Could you please revert this file back to the original state as it was when I commited it? it looked much better.

image

Copy link
Owner Author

Choose a reason for hiding this comment

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

I tend to generate rural areas during development and in my personal opinion it looked better with a bit of random tree generation on the fields. I'll look into this again with some areas

Regarding the ice generation in winter; I was thinking it looked a bit odd so I tried to give it some more randomness. I agree, this doesn't look good either - I didn't test this one thoroughly.

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 13, 2025

Choose a reason for hiding this comment

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

I understand, with trees the farmlands look a little more detailed, but they are meant to be smooth, no farmer would be happy to see so many trees taking space in their field and not letting tractors move. Speaking of the winter mode, neither mine symmetric option nor your random look good, but I think mine could be there temporarily, its code is more compact and probably more fast, so I'm asking you again to revert this file to my version if you agree with me

image

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks for the great discussion, I just reverted it to your change!

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you keep this to prevent very steep differences in elevation? I don't like that scale.sqrt() because it distorts the scale even more. Also when there wasn't BASE_HEIGHT_SCALE the hills had their real size

Copy link
Owner Author

Choose a reason for hiding this comment

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

With the addition of elevation we have the problem that some large buildings on bigger elevation differences basically "merge with the ground". I attached an image to demonstrate what I mean.
image

When testing your PR I've seen this happen on the first generation already, which is why I reverted it. Do you have an idea on how we can counteract this?

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 13, 2025

Choose a reason for hiding this comment

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

Ok, I've noticed that as well, I think this can be fixed by adding generation of the basement floor, so that the first floor is elevated above the ground, after fixing this issue we can increase the elevation scale to 1.0

Many buildings have a basement and their first floor is elevated about 1 meter above the ground, so this would look good
image

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 13, 2025

Choose a reason for hiding this comment

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

I imagine it to look like this. The first floor of the building has to start on the highest point and have a basement filling the gap under it.
image

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 13, 2025

Choose a reason for hiding this comment

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

Also please note the issue of OSM data and elevation data being not aligned perfectly, it is noticeable in many generations, see #399

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see, that could be an idea. It'd be good to have a POC of this so we can take a look at it visually. If I have the time I can try to do that and ping you with the results.
Also of course the current elevation 'stretching' doesn't get rid of this issue either, but I observed it way less. That's why I'd keep it as it is for now - but we should definitely reconsider it before creating the next release!

Copy link
Owner Author

Choose a reason for hiding this comment

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

Before and after
image
image

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 20, 2025

Choose a reason for hiding this comment

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

This really looks good. But I wonder if the left door is meant to go into the basement? This building might not be meant to be located on a side of a hill, but on the top, since the issue of OSM data and elevation data is still present so it also should be fixed, as I said before, it's in #399 and also here. As I noticed, on different hemispheres of the earth the terrain is shifted into a different direction, do you have any idea how to align terrain with osm objects properly?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks for your feedback, do you think the foundation should be a kind of stone block for all buildings or should it be the wall block of the building? For the OSM and elevation data shift - that's going to be a tricky task to fix haha! Not sure yet what causes this, I wanted to look into this with a bit of more time. Also thanks for the hint with the hemispheres, I wasn't aware of that yet.

Copy link
Contributor

@Oleg4260 Oleg4260 Apr 25, 2025

Choose a reason for hiding this comment

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

I think it should be the same as the wall block for now

Copy link
Owner Author

@louis-e louis-e left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your feedback @Oleg4260, let me hear your thoughts on my comments and then we can proceed with the next steps!

if !editor.check_for_block(x, max_y, z, Some(&[STONE]), None) {
editor.set_block(groundlayer_block, x, max_y, z, None, None);
editor.set_block(DIRT, x, max_y - 1, z, None, None);
editor.set_block(DIRT, x, max_y - 2, z, None, None);
Copy link
Owner Author

Choose a reason for hiding this comment

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

I removed it for generation speed reasons, but I understand your point. I've noticed some generation performance issues since the last release and wanted to counteract this by removing this layer for now until we managed to improve the performance again. I can add the line again in the meanwhile

Copy link
Owner Author

Choose a reason for hiding this comment

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

With the addition of elevation we have the problem that some large buildings on bigger elevation differences basically "merge with the ground". I attached an image to demonstrate what I mean.
image

When testing your PR I've seen this happen on the first generation already, which is why I reverted it. Do you have an idea on how we can counteract this?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I tend to generate rural areas during development and in my personal opinion it looked better with a bit of random tree generation on the fields. I'll look into this again with some areas

Regarding the ice generation in winter; I was thinking it looked a bit odd so I tried to give it some more randomness. I agree, this doesn't look good either - I didn't test this one thoroughly.

editor.set_block(OAK_LOG, x, ground_level + 1, z, None, None);
editor.set_block(OAK_LOG, x + 1, ground_level + 1, z, None, None);
editor.set_block(OAK_LOG, x - 1, ground_level + 1, z, None, None);
}
Copy link
Contributor

@Oleg4260 Oleg4260 Apr 13, 2025

Choose a reason for hiding this comment

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

I have another question about these benches. There are too many of them, they are scattered randomly and they don't look good. Also the program already has the code to generate benches that are mapped in the OSM, so why would you not want to remove this part of code?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Pretty much the same thing here as with the trees on farmland - I originally added the generation on leisure because it added a bit more variety. I'll revert the lines as well, maybe we can come up with a good looking bench structure soon hah!

@Oleg4260
Copy link
Contributor

Thanks for your reply and all the explanations, @louis-e, just tagging you in case you didn't get notified about my answers

@louis-e
Copy link
Owner Author

louis-e commented Apr 17, 2025

Hey man, thanks for the ping - I didn't notice your updates. Will look into it on the weekend, thanks for all your input! :)

@louis-e louis-e mentioned this pull request Apr 19, 2025
@Oleg4260
Copy link
Contributor

@louis-e Thanks for reverting most of your changes and keeping my work, just don't forget to put back the editor.set_block(DIRT, x, max_y - 2, z, None, None); line in data_processing.rs, it used to be there before my changes and we agreed that there has to be 2 blocks layer of dirt, also take a look at #414, just did some small changes to farmland code that I forgot to do before

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants