Open se8820726 opened 4 years ago
You'll need a VoxelViewer
as a child of your player/camera.
Thanks for the hint about the VoxelViewer, but I unfortunately still can't see any terrain when I try out the noise_smooth_lod.tscn scene in the fps_demo folder of the above-mentioned demo project. In case of custom_stream.tscn and heightmap_smooth_lod.tscn in the same folder, geometry is only created in a square area with one corner touching the player's starting position. The bottom halves of the sine waves in custom_stream.tscn are missing and they are displayed in the coarsest LOD. No LOD changes occur when moving around and no new geometry is generated. However, the FPS become worse and worse.
Block generation for heightmap_blocky.tscn and heightmap_smooth.tscn appears to work as intended, except that there is no collision detection between player and terrain (which works in the other cases, except maybe noise_smooth_lod.tscn because there is no terrain at all).
I had these issues with the same executable as linked above (https://github.com/Zylann/godot_voxel/actions/runs/277106721) and with my own build from the current master with godot v3.2.3-stable. The demos worked properly (i.e. without any of the issues that I mentioned) with the pre-compiled build v3.2.2 from http://tokisan.com/godot-binaries/#downloads. The only thing that didn't work with the old version and works now is that new geometry is generated (and old geometry is removed) when moving around in the non-LOD scenes (however, without any collision detection).
Can you reproduce these issues, or am I the only one who sees them? Is there any way to fix the demo projects to work with the current master of this module?
I think VoxelLodTerrain is currently being refactored (https://github.com/Zylann/godot_voxel/issues/188), and thus isn't working yet with the latest VoxelViewer/VoxelServer system. So if you want to use VoxelLodTerrain, then for now I think you'll need to use the older 3.2.3 branch of this voxel module in addition to a 3.2.* branch of the godot engine.
Thanks for pointing me to that issue. I already suspected that there might be some major changes going on. I'm a bit unsure whether or not it makes sense to use the old version, since its API is outdated. But since I'm new to Godot, it probably makes sense for me to concentrate on learning other stuff first until this module has stabilized a bit.
VoxelLodTerrain should work in master now. It still needs to get refactored though, because it can only use one VoxelViewer
at the moment.
Is it still a problem?
I'm using this version of godot for voxel terrains: https://github.com/Zylann/godot_voxel/actions/runs/277106721
its version is v3.2.4.beta.custom_build.422c279fc
I have built an spatial node as the scene root and have added a VoxelLodTerrain node as its child.
moreover, I have added the following script to the root spatial node: (extracted from https://github.com/tinmanjuggernaut/voxelgame/blob/master/project/fps_demo/scripts/CodeTerrain.gd)
MyStream.gd is from https://github.com/tinmanjuggernaut/voxelgame/blob/master/project/fps_demo/scripts/MyStream.gd
however whenever I run the scene I cant view any terrains :'(
can you please help me what to do ?