Some semi-random thoughts on terrain generation
#31
nice trees xD
Reply
Thanks given by:
#32
on-a-stiiick Wink
Reply
Thanks given by:
#33
I've fixed the trees getting chopped at chunk borders, now they are generated nicely and all it needs is a few tree images / algorithms.
I committed the current status into the /branches/composable_generator svn branch, so if you want to play with it... Beware, though - the chunk generation is kinda slow, I'd say about half the speed of the previous one. Also you need to configure your world.ini properly, here's a quick cheatsheet from my notes:
Code:
[Generator] section:
BiomeGen={Constant|Checkerboard|DistortedVoronoi}; default=DistortedVoronoi
HeightGen={Flat|Classic}; default=Classic
CompositionGen={SameBlock|DebugBiomes|Classic}; default=Classic
Structures=<comma-separated list of structure generators>; default=Trees,MarbleCaves,SprinkleFoliage

BiomeGen=Constant: *
ConstantBiome=<biomenumber>; default=1 (plains)

BiomeGen=Checkerboard: *
CheckerboardBiomeSize=<size of the checkerboard cell, in blocks>; default=64

BiomeGen=DistortedVoronoi:
-- TODO

HeightGen=Flat: *
FlatHeight=<height>; default=5

HeightGen=Classic: *
ClassicHeightFreq1=<frequency float>; default=0.1
ClassicHeightFreq2=<frequency float>; default=1.0
ClassicHeightFreq3=<frequency float>; default=2.0
ClassicHeightAmp1=<amp float>; default=1.0
ClassicHeightAmp2=<amp float>; default=0.5
ClassicHeightAmp3=<amp float>; default=0.5

CompositionGen=SameBlock: *
SameBlockType=<block-id number or string>; default=stone
SameBlockBedrocked={0|1}

CompositionGen=DebugBiomes: *
-- no parameters

CompositionGen=Classic: *
ClassicSeaLevel=<sea-level in blocks>; default=60
ClassicBeachHeight=<beach height above sealevel>; default=2
ClassicBeachDepth=<beach depth under sealevel>; default=4

Structures:Trees *
-- no parameters

Structures:SprinkleFoliage
-- no parameters
Some of this may be wrong, since some of the features are not yet implemented. Experiment Smile
Reply
Thanks given by:
#34
niceBig Grin
there is no download Sad
Reply
Thanks given by:
#35
You need to build from sources, because it is on a separate development branch. The nightbuilds are done only from the main trunk.
Reply
Thanks given by:
#36
(04-12-2012, 04:55 AM)xoft Wrote: I've fixed the trees getting chopped at chunk borders, now they are generated nicely and all it needs is a few tree images / algorithms.
I committed the current status into the /branches/composable_generator svn branch, so if you want to play with it... Beware, though - the chunk generation is kinda slow, I'd say about half the speed of the previous one. Also you need to configure your world.ini properly, here's a quick cheatsheet from my notes:
Code:
[Generator] section:
BiomeGen={Constant|Checkerboard|DistortedVoronoi}; default=DistortedVoronoi
HeightGen={Flat|Classic}; default=Classic
CompositionGen={SameBlock|DebugBiomes|Classic}; default=Classic
Structures=<comma-separated list of structure generators>; default=Trees,MarbleCaves,SprinkleFoliage

BiomeGen=Constant: *
ConstantBiome=<biomenumber>; default=1 (plains)

BiomeGen=Checkerboard: *
CheckerboardBiomeSize=<size of the checkerboard cell, in blocks>; default=64

BiomeGen=DistortedVoronoi:
-- TODO

HeightGen=Flat: *
FlatHeight=<height>; default=5

HeightGen=Classic: *
ClassicHeightFreq1=<frequency float>; default=0.1
ClassicHeightFreq2=<frequency float>; default=1.0
ClassicHeightFreq3=<frequency float>; default=2.0
ClassicHeightAmp1=<amp float>; default=1.0
ClassicHeightAmp2=<amp float>; default=0.5
ClassicHeightAmp3=<amp float>; default=0.5

CompositionGen=SameBlock: *
SameBlockType=<block-id number or string>; default=stone
SameBlockBedrocked={0|1}

CompositionGen=DebugBiomes: *
-- no parameters

CompositionGen=Classic: *
ClassicSeaLevel=<sea-level in blocks>; default=60
ClassicBeachHeight=<beach height above sealevel>; default=2
ClassicBeachDepth=<beach depth under sealevel>; default=4

Structures:Trees *
-- no parameters

Structures:SprinkleFoliage
-- no parameters
Some of this may be wrong, since some of the features are not yet implemented. Experiment Smile

i see allot biome in this poste Smile is it already inplented??
Reply
Thanks given by:
#37
Things that are marked with an asterisk are implemented. So biome generators available are Constant (same biome everywhere) and Checkerboard (squares of biomes).
First I want to implement more or less what the server had before, move it into the new architecture (and improve on it). Only then will I start doing new stuff, when I see that the new architecture is good enough. I'm almost there already - just need to finish Trees and add SprinkleFoliage, MarbleCaves and some ores.

I already see some advantages and some disadvantages to the new architecture:
+ Many different types of terrain can be achieved by combining different parts of the generators together
+ Implementing a new generator is a bit easier, since the generators are highly specialized
+ The chunks are generated complete at once (unlike in the old architecture, where trees were added after a delay, which caused clients not to see them in newly generated terrain)
+ Lighting can be generated along with the new chunks, rather easily
- The generation is a bit slower
- Some parts get calculated several times over and over (e. g. generating trees makes the neighboring chunks' biomes and height array get calculated over and over, up to 9 times per chunk). A cache might improve speed, but eat up even more memory.
Reply
Thanks given by:
#38
NiceBig Grin
Reply
Thanks given by:
#39
Since you seem to want it so badly, I've built and uploaded an Exe of this branch, rev 462. You can download it at the regular nightbuild address, in the composable_generator folder. Don't forget that you'll need to modify your world.ini; I've included a sample one there as well.

This build is purely manual and I don't plan on making it regular.

The generator is more or less stable - it doesn't eat up gigabytes of memory and actually is almost as fast as the older one. I think there are some lighting problems there, not sure yet - lighting will be rewritten after the generator is finalized, anyway.

Note that for an existing world, there will be artefacts on old/new chunk boundaries. Especially the trees won't fit together; I think the terrain height is off by one (won't bother fixing, don't ask for it)

On the other hand, you can use the /regeneratechunk command to re-generate any chunk, even in the old world (but this will produce a new-world-style chunk) Smile
Reply
Thanks given by:
#40
great I already love itBig Grin
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)