voxelgame icon indicating copy to clipboard operation
voxelgame copied to clipboard

can you create a planet demo?

Open xukongwen opened this issue 4 years ago • 3 comments

thanks for the greate demo! can you create a planet demo for me? i'm come from youtube...

thanks!

xukongwen avatar Mar 30 '20 07:03 xukongwen

Hi, if you look in mystream.gd, you'll see an example of how to write a generator for a sine wave. You need to write a generator that uses the signed distance function (sdf) of a sphere: http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/

Basically set ground where the distance from 0,0 0 to x, y, z is < radius. Or length of Vector3(x, y, z) < radius.

It is something I want to do, and really it should be implemented in C++. But you can do it in gdscript.

TokisanGames avatar Apr 02 '20 00:04 TokisanGames

thanks!

xukongwen avatar Apr 02 '20 23:04 xukongwen

Zylann is writing a VoxelGraph that should make it easier to make new shaped landscapes, including planets, without having to write faster C++ modules. Watch the main repo for when that gets released.

TokisanGames avatar May 08 '20 20:05 TokisanGames