godot_voxel
godot_voxel copied to clipboard
Procedurally Generated Planets
Is it possible to make a custom stream that will generate a planet or am is this tool not that flexible?
It is possible to generate a planet yes. One of the easiest ways is to use SDF functions: a sphere for the base shape, and layers of 3D noise to create surface features. This is doable with either VoxelGeneratorScript
, or VoxelGeneratorGraph
.
Maybe there are more specialized ways to do it though, which I haven't tried yet.
Here is an example which uses a torus shape instead of a sphere, though the idea is the same:
I was able to do it. Thank you for taking the time to help me. I really appreciate it.
i cant wrap my head around this xD I wish we could get a video tutorial on making planets and asteroids, im sure im not the only one who's been dying to make space games with voxel tools
It is possible to generate a planet yes. One of the easiest ways is to use SDF functions: a sphere for the base shape, and layers of 3D noise to create relief. This is doable with either
VoxelGeneratorScript
, orVoxelGeneratorGraph
. Maybe there are more specialized ways to do it though, which I haven't tried yet.Here is an example which uses a torus shape instead of a sphere, though the idea is the same:
Every time i try copying what you did in that picture, it crashes my instance of godot, even on a new brand new empty project, using either graph or script generators, on both opengl2 or 3
im using the godot3.2.3 version of voxel tools
I'm aware of a bug somewhere, it happens very rarely for me so I was not able to find what it was yet. One occurrence was reported in https://github.com/Zylann/godot_voxel/issues/216 but the code has changed a lot since (and the clamp
node was fixed). I think it's a known assertion though, it's not a random crash, so having a log showing the error message might help (or better, the call stack)
I figure maybe this is a bug fixed in newer branches? I've been trying to get the master branch of voxel tools all day and cant figure out what branch of godot it will successfully build with
with the 3.2.3 version of godot & voxel tools, no matter how i try to go about it, even if stream in editor is false, graph crashes the editor immediately whenever a noise or sdf node is connected to outputsdf
trying my best to understand, im pretty sure the only way id achieve voxel ore chunks underneath voxel terrain, as well as asteroid fields in space, would be through using voxelgraphs
... I think it's a known assertion though, it's not a random crash, so having a log showing the error message might help (or better, the call stack)
if youre asking for a crash report i have no idea where godot would save them if it does generate them
The module uses the latest of Godot 3.2
branch to build.
I don't know myself how people get call stacks from release_debug
versions (the kind of build used by official versions and the CI of my repo), but there should be a message printed in the system console when that happens. Maybe you could try running Godot from a command line so it won't close right away?
Is there a very specific series of steps you are doing to reproduce the crash?
Is there a very specific series of steps you are doing to reproduce the crash?
yes, anything connecting to an outputSDF node crashes the editor, meaning i dont think i can use any of the custom gen functionality
anything connecting to an outputSDF node crashes the editor
I tried that, didn't crash.
https://user-images.githubusercontent.com/1311555/110208187-86a77580-7e7f-11eb-8c19-38e862cdfbc6.mp4
Okay so I guess its just when i connect a 3dGenerator node to an outputSDF
no matter what, having a 3dGen connected in the chain to outputSDF, it immediately crashes
What is a 3dGenerator
?
I tried with Noise3D, did not get a crash.
https://zylannprods.fr/dl/godot/voxel/issue219_0.mp4
What is a
3dGenerator
? I tried with Noise3D, did not get a crash.https://zylannprods.fr/dl/godot/voxel/issue219_0.mp4
Im really not trying to be a pest here, sorry, just really want help so I can use the full potential of this awesome module Why does it crash the editor for me? Is there anything I can do, did I build the module into godot wrong? I really dont understand what I could be doing wrong
I appreciate the replies sorry I will try running from a command line to get you some sort of error at least
At: modules\voxel\generators\graph\voxel_graph_runtime.cpp:748 ERROR: The graph has no SDF output
it spammed this like a thousand times before the crash as soon as a Noise3D was connected to an OutputSDF node
this is the only other info cmd provided:
Godot Engine v3.2.3.stable.custom_build - https://godotengine.org -------- VoxelMemoryPool ----------
C:\Users\Angel\HDD Documents\GODOT>OpenGL ES 3.0 Renderer: GeForce GTX 560 Ti/PCIe/SSE2
At: modules\voxel\generators\graph\voxel_graph_runtime.cpp:748 ERROR: The graph has no SDF output
Strange, voxel_graph_runtime.cpp only has 654 lines, line 748 does not exist. Maybe you're not using latest version?
Based on the message, it could be either line 501 or line 603. It means the graph is being executed while it's not in a valid state. Looks like a bug coming from the graph editor, but I need to know more precisely how you are making this happen, because when I try, it does not happen. If needed, reproduction steps should start from the moment you launch Godot to the moment it crashes, without using pre-existing scenes or resources, because I don't have them myself when I reproduce the steps.
I've tried Noise3D and it doesn't crash on my machine, but doesn't work either. When I use FastNoise3D I get it working in the editor. However, when I start the game itself, nothing shows.
Your scene is missing VoxelViewer
under the camera, maybe that's why you don't see it in game?
That solved the problem. Thanks!
I think there might be a bug in SdfSphere - it produces weird artifact on each face (see the image bellow). Any idea what can cause this?
That graph should not produce a bug like this.
Do you also get the artifacts if you remove the Constant
, and instead assign the radius on the default inputs of the SdfSphere
node?
Event with the radius on the default inputs of the SdfSphere node it still produces artifacts. I also tried SdfSphereHeightmap and it just did the same thing.
Do you still get it if you remove the Add
node and connect directly the sphere node to OutputSDF
?
Also, do you get a dent inside the geometry? Or is it only the shading that looks like that?
I've re-create the issue again with x,y,z inputs, a plain SdfSphere with radius set to 100 and OutputSdf. The artifact looks like dent inside the geometry - see the image.
I may have a look later but I think I know what that is.
try to increase that 0.2f
constant here: https://github.com/Zylann/godot_voxel/blob/fe968f17aa6d1e08e5565d237a3fa94bdd2bbdb6/generators/graph/voxel_generator_graph.cpp#L231
It's going to be exposed as a property soon
I've recompiled godot with the plugin using values 0.5f and 1.0f but the dent is still there. Also I've noticed that when I change the LOD_split_scale to a higher value (4 or 5) the dent gets smaller.