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

Explore Voxels in Godot #2

Open
acs opened this issue Aug 28, 2020 · 11 comments
Open

Explore Voxels in Godot #2

acs opened this issue Aug 28, 2020 · 11 comments

Comments

@acs
Copy link
Contributor

acs commented Aug 28, 2020

During a first exploration, it seems this is the right project to follow:

https://github.com/Zylann/godot_voxel

And his main developer is pretty active now, after 4 years working in the project. Great commitment.

It is not a general voxels tool: «A C++ module for creating volumetric worlds in Godot Engine.«

It is for creating worlds.

It could be a nice thing to compare with https://www.voxelfarm.com/index.html

@acs
Copy link
Contributor Author

acs commented Aug 28, 2020

My first impresion is that it is just limited to the world, so the players for example are not voxelized. But it is the same in Voxel Farm. It is not 100% voxelized like Minecraft for example.

@acs
Copy link
Contributor Author

acs commented Aug 30, 2020

Ok, in order to use it it seems I will need to compile Godot with this module included.

"Voxel Tools is a custom C++ module for Godot 3.1+. It must be compiled into the engine to work."

https://github.com/Zylann/godot_voxel/blob/master/doc/01_get-started.md

First step, compile from sources Godot for Linux:

https://docs.godotengine.org/en/latest/development/compiling/index.html

Right now I am on Fedora so:

sudo dnf install scons pkgconfig libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel \
    libXi-devel mesa-libGL-devel mesa-libGLU-devel alsa-lib-devel pulseaudio-libs-devel \
    libudev-devel yasm gcc-c++

and

scons -j8 platform=linuxbsd
...
[Initial build] Compiling ==> thirdparty/freetype/src/type1/type1.c
[Initial build] Compiling ==> thirdparty/freetype/src/type42/type42.c
[Initial build] Compiling ==> thirdparty/freetype/src/winfonts/winfnt.c
[Initial build] Compiling ==> thirdparty/freetype/src/sfnt/sfnt.c
[Initial build] progress_finish(["progress_finish"], [])
[Initial build] Linking Static Library ==> modules/freetype/libfreetype_builtin.linuxbsd.tools.64.a
[Initial build] Ranlib Library         ==> modules/freetype/libfreetype_builtin.linuxbsd.tools.64.a
[Initial build] Linking Static Library ==> core/libcore.linuxbsd.tools.64.a
Ranlib Library         ==> core/libcore.linuxbsd.tools.64.a
[Initial build] Linking Program        ==> bin/godot.linuxbsd.tools.64
[Initial build] scons: done building targets.

It is easier that I have expected!

[godot](master)$ bin/godot.linuxbsd.tools.64

Screenshot from 2020-08-30 07-42-30

[godot](master)$ du -sh bin/godot.linuxbsd.tools.64-v4.0.dev
401M	bin/godot.linuxbsd.tools.64-v4.0.dev

[godot](master)$ strip bin/godot.linuxbsd.tools.64-v4.0.dev

[godot](master)$ du -sh bin/godot.linuxbsd.tools.64-v4.0.dev
114M	bin/godot.linuxbsd.tools.64-v4.0.dev

But probably it is better to build the last stable release (v4.0.dev will be great for testing the new features).

[godot](master)$ git checkout 3.2.2-stable
[godot](3.2.2-stable)$ scons -j8 platform=x11

Let's continue now with the voxels tools engine:

[godot]$ cp -a godot_voxel/ godot/modules/voxel
[godot](3.2.2-stable)$ scons -j8 platform=x11
...
[godot](3.2.2-stable)$ scons -j8 platform=x11
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[  3%] Compiling ==> main/main.cpp
[  4%] Compiling ==> modules/register_module_types.gen.cpp
[ 29%] Compiling ==> modules/voxel/cube_tables.cpp
[ 30%] Compiling ==> modules/voxel/register_types.cpp
[ 30%] Compiling ==> modules/voxel/voxel_buffer.cpp
...
[ 95%] Linking Program        ==> bin/godot.x11.tools.64
[ 95%] scons: done building targets.

and we execute the godot binary generated, let's try to find the new VoxelTerrain node ...

[godot](3.2.2-stable)$ bin/godot.x11.tools.64

Screenshot from 2020-08-30 07-55-59

Cool! We are reading to start working with this module!

Next step is to follow the tutorials:

https://github.com/Zylann/godot_voxel/blob/master/doc/03_create-terrain.md

@acs
Copy link
Contributor Author

acs commented Aug 30, 2020

I have a first issue trying to add a VoxelLODTerrain with:

[godot](3.2.2-stable)$ handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3ca70) [0x7f584512ba70] (??:0)
[2] VoxelDataLoader::push(VoxelBlockThreadManager<VoxelDataLoader::InputBlockData, VoxelDataLoader::OutputBlockData>::Input const&) (/home/adelcastillo/devel/godot/godot/modules/voxel/terrain/voxel_data_loader.h:36)
[3] VoxelLodTerrain::send_block_data_requests() (/home/adelcastillo/devel/godot/godot/modules/voxel/terrain/voxel_lod_terrain.cpp:576)
[4] VoxelLodTerrain::_process() (/home/adelcastillo/devel/godot/godot/modules/voxel/terrain/voxel_lod_terrain.cpp:946)
[5] VoxelLodTerrain::_notification(int) (/home/adelcastillo/devel/godot/godot/modules/voxel/terrain/voxel_lod_terrain.cpp:440)
[6] VoxelLodTerrain::_notificationv(int, bool) (/home/adelcastillo/devel/godot/godot/modules/voxel/terrain/voxel_lod_terrain.h:20 (discriminator 14))
[7] Object::notification(int, bool) (/home/adelcastillo/devel/godot/godot/core/object.cpp:934)
[8] SceneTree::_notify_group_pause(StringName const&, int) (/home/adelcastillo/devel/godot/godot/scene/main/scene_tree.cpp:985)
[9] SceneTree::idle(float) (/home/adelcastillo/devel/godot/godot/scene/main/scene_tree.cpp:525 (discriminator 3))
[10] Main::iteration() (/home/adelcastillo/devel/godot/godot/main/main.cpp:2100)
[11] OS_X11::run() (/home/adelcastillo/devel/godot/godot/platform/x11/os_x11.cpp:3265)
[12] /home/adelcastillo/devel/godot/godot/bin/godot.x11.tools.64(main+0xfa) [0x14dc6e0] (/home/adelcastillo/devel/godot/godot/platform/x11/godot_x11.cpp:57)
[13] /lib64/libc.so.6(__libc_start_main+0xf2) [0x7f5845116042] (??:0)
[14] /home/adelcastillo/devel/godot/godot/bin/godot.x11.tools.64(_start+0x2e) [0x14dc52e] (??:?)
-- END OF BACKTRACE --

Zylann/godot_voxel#190

@acs
Copy link
Contributor Author

acs commented Sep 1, 2020

Bug fixed, we can continue testing the module.

@acs
Copy link
Contributor Author

acs commented Sep 2, 2020

The more impressive demo and tutorial is this video: https://www.youtube.com/watch?v=zfzmcbR1H_0

But let's follow the tutorials before working with the video contents.

@acs
Copy link
Contributor Author

acs commented Sep 10, 2020

@acs
Copy link
Contributor Author

acs commented Sep 11, 2020

Ok, let's continue playing with this voxels module because it is what we need in Voxelers. Let's complete all the tutorials and to study the API and source code. The idea is to use voxels not only for then terrain, but also for other objects, like models imported from MagicaVoxel for example.

A must read: Zylann/godot_voxel#150

@acs
Copy link
Contributor Author

acs commented Sep 11, 2020

Let's follow all this work in #6

@acs acs closed this as completed Sep 11, 2020
@acs
Copy link
Contributor Author

acs commented Oct 3, 2020

Ups, I have not detected:

https://github.com/ClarkThyLord/Voxly
https://github.com/ClarkThyLord/Voxel-Core

a pretty young project that seems to have stopped ...

@acs acs reopened this Oct 3, 2020
@acs
Copy link
Contributor Author

acs commented May 23, 2022

Interesting recent discussion with no new clues about Voxel support in game engines.

@acs
Copy link
Contributor Author

acs commented May 23, 2022

I will continue in #53

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

1 participant