Voxelers / mcthings

A Python framework for creating 3D scenes in Minecraft and Minetest
Apache License 2.0
57 stars 10 forks source link

Create a scene that loads the 487 vox models from mmmm converted to schematics #114

Closed acs closed 3 years ago

acs commented 4 years ago

The idea is to work directly in mcthings_scenes. The scene should download all the vox models and load them inside Minecraft.

Not sure if it is a good idea to convert the 487 models to schematic before (with vox2schematic) and load the schematic files. Maybe we can follow both approaches.

acs commented 3 years ago

Let's explore the distribution of creations:

acs commented 3 years ago

Ok, mostly working. I need to adjust the positioning to avoid overlaps but the results are promising!

Screenshot from 2020-07-07 08-04-23

acs commented 3 years ago

Ok, much better now (I have removed the needed flip, but it has a bug updating the end_position):

Screenshot from 2020-07-07 08-10-40 Screenshot from 2020-07-07 08-09-55 Screenshot from 2020-07-07 08-09-21 Screenshot from 2020-07-07 08-08-55

acs commented 3 years ago

Screenshot from 2020-07-07 08-24-13 Screenshot from 2020-07-07 08-23-16 Screenshot from 2020-07-07 08-22-26 Screenshot from 2020-07-07 08-21-42

acs commented 3 years ago

Now in rows, easier to travel in them: just 48 rows!

Screenshot from 2020-07-07 19-47-41

acs commented 3 years ago

The final step is to create the empty world with all models loaded!

acs commented 3 years ago

Trying to create a world with all the models:

2020-07-08 06:09:25,722 Number of models: 487 
2020-07-08 06:09:25,723 Creating model alien_bot1.vox
2020-07-08 06:09:25,751 Creating model alien_bot2.vox
2020-07-08 06:09:25,773 Creating model alien_bot3.vox
....
2020-07-08 06:23:32,206 Creating model veh_car1.vox
2020-07-08 06:23:32,415 Creating model veh_car2.vox

Process finished with exit code 143 (interrupted by signal 15: SIGTERM)

so it seems not all of them were added.

[minecraft-launcher]$ grep "Creating model" /tmp/m | wc -l
455

Probably we need to add more memory to Minecraft. But no traces.

But taking a look to the results, the models are correctly loaded. Not sure if there are empty models at some points.

For example, we have a hole in this row.

Screenshot from 2020-07-08 06-33-26

In any case, as a demo, the results are good enough. Some points to improve:

acs commented 3 years ago

Screenshot from 2020-07-08 06-35-48

The last row:

Screenshot from 2020-07-08 06-39-11

acs commented 3 years ago

Ok, let's save the world.

[saves]$ du -sh vox/
74M vox/
[saves]$ zip -r vox.zip vox/
[saves]$ du -sh vox.zip 
5.3M    vox.zip
[saves]$ mv vox.zip vox-world.zip

Great. It is created using 1.12.2 so it is easily imported in newer version. And it can also be converted to Bedrock.

acs commented 3 years ago

Next step is to deploy it in a server to test it.

acs commented 3 years ago

World available in github (1.12.2 version): https://github.com/Voxelers/mcthings_scenes/blob/develop/worlds/vox-world.zip

Scene created at: https://github.com/Voxelers/mcthings_scenes/blob/develop/apps/scene_magicavoxel.py

Tweet: https://twitter.com/McthingsP/status/1280902177972682752