Cuberite Forum
Some semi-random thoughts on terrain generation - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Some semi-random thoughts on terrain generation (/thread-409.html)



RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

Anyone who likes my big oak tree? Smile
[Image: ded71e0994.jpg]


RE: Some semi-random thoughts on terrain generation - tonibm19 - 11-13-2014

Its right, but a little "blocky" (yes, in Minecraft) and its shape seems square.


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

It's not that bad:
[spoiler]
[Image: 05e88bb974.jpg]
[Image: cc815c2761.jpg]
[Image: 9e071d9553.jpg]
[Image: 541039d686.jpg]
[Image: 68d736dda4.jpg]
[/spoiler]


RE: Some semi-random thoughts on terrain generation - xoft - 11-13-2014

I think it's weird. The central trunk should be higher, after all it's the dominant apex.


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

Then how about this:
[Image: 156c5f05ce.jpg]
[Image: d7521e7149.jpg]


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

The branches seem a little too long. I'll adjust it.


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

I uploaded my first implementation to github.


RE: Some semi-random thoughts on terrain generation - xoft - 11-13-2014

Interesting. Why the floating-point directions, can't you work with regular ints?


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 11-13-2014

Because if I use ints I can't place a block on the same height:
Code:
---XX
XX---
instead of
Code:
----X
--X--
X----

(If that makes sense)

EDIT:
Now compare my code to the vanilla tree: https://gist.github.com/grum/62cfdec0537e8db24eb3#file-bigtreefeature-java-L145


RE: Some semi-random thoughts on terrain generation - xoft - 11-13-2014

Make the code lerp between startpoint and endpoint, then, you can have branches at any angle, and still keep int coords. Look up Bresenham algorithm if you need to.