Closed HummusSamurai closed 7 years ago
It's really easy to fix, the solution is in the errors (litterally)
I submitted a fix
Success! The engine compiles with opensimplex, voxel, and hterrain!
I can now finally test some terrain :3 I'll let you know how it goes.
I launched the voxelgame project and I'm getting an error in the editor when I try to launch:
Invalid call. Nonexistent function 'set_cube_geometry' in base 'Voxel'
Line 15 in voxelmap.gd
uh... well you can comment out most of this script actually, what it does is done in .tscn now :)
@Zylann I commented out the lines that caused errors, and it works even after I instanced my own character controller!
Unfortunately there are no collisions, neither the kinematicbody player nor his bullets are colliding with anything.
The commented lines were definitely needed, as the game looks rather bare now. But it's progress!
The commented lines were not doing any collision. You can notice I also disabled some lines in the character controller. But in fact there can't be collisions because I removed the code that generated the shapes, and I need to remake them differently. Also I look forward to see this in action: https://github.com/godotengine/godot/pull/10013
Note that using the physics engine with this module is doubling memory usage, so I eventually plan to implement some Axis-Aligned physics similar to what Minecraft has (limited, but wayyyy less memory usage and faster)
Oh well then I guess I'll wait :D But this is already impressive to see right now (although I didn't find an option for smooth voxels anywhere). And the bullet physics will make it even better.
Also I tried the heightmap and it keeps refusing to import the heightmaps I'm testing, even though the resolution is fine and I'm pretty sure I have the color settings correct also. Do you have any pointers?
Smooth voxels are supported, but aren't exposed well editor-side.
The idea is that you have to generate voxel data in the channel Voxel.CHANNEL_ISOLEVEL
instead of Voxel.CHANNEL_TYPE
. Basically the isolevel is a number between 0 and 255 that represents the density of matter, and the module will render the intersection surface at the median value 127.
The smooth mesher doesn't use VoxelLibrary at all though, and the output will be texture-less, but it's a start^^
I need to write some documentation, because at the moment it's not explained that: you need to write your own voxel "generator" by inheriting VoxelProvider
(it can be C++ or GDScript), and putting it in the VoxelTerrain
(in the example I have set VoxelProviderTest
, which generates waves in the CHANNEL_TYPE channel).
If you want to ask stuff about HeightMap
, you should open an issue there: https://github.com/Zylann/godot_heightmap_module/issues
The script error should be fixed now
The issue with opensimplex (https://github.com/Zylann/godot_opensimplex/issues/2) was solved by the PR (thanks @Xrayez), and Godot now compiles with opensimplex.
However now I get the following error when compiling voxel with Godot 3 master, both when compiling with the opensimplex module and alone.
Full pastebin of the errors: https://pastebin.com/UnXu7g6R
I think I saw a discussion about PoolVector in some PR recently, but I can't seem to find it again.
Thanks again and I am looking forward to making this work!