CF::MinimumSize = 4
startshape big
rsi = 0.46
shape quad
rule {
SQUARE[ s 1.015 b -1]
SQUARE[s 1 b 1 ]
}
shape big
{
loop 4 [y (0.5+rand(0.8))]big_x[s 1 (1.2+rand(0.5))]
}
shape big_x
{
loop 4 [x (1+rand(1))] frac[s (1.2+rand(0.58)) 1]
}
shape frac
rule {
quad[ ]
frac [x 0.25 y 0.25 s rsi r -90 b -0.9]
frac[ x -0.25 y 0.25 s rsi r 0 b -0.8]
frac[ x -0.25 y -0.25 s (rsi/2) r 90 b -0.7]
frac[ x 0.25 y -0.25 s rsi r 90 b -0.6]
}
rule {
quad[ ]
frac [x 0.25 y 0.25 s rsi r -90 b -0.6]
frac[ x -0.25 y 0.25 s rsi r 0 b -0.7]
frac[ x 0.25 y -0.25 s (rsi/2) r 90 b -0.8]
frac[ x -0.25 y -0.25 s rsi r 90 b -0.9]
}

Enjoy!!

Last edited by barcud on Fri Sep 03, 2021 5:49 am, edited 1 time in total.

This is pretty cool; it reminds me of RPG maps, like
in Shadowrun.

How did you have this idea? And the follow-up render idea? I never
heard of aerialod before. I assume you must have some experience
with that? It looks a bit like an artistic rendering actually - I saw
somewhat similar renderings done via blender on the old cg-forum
if anyone remembers that...

Edit: The name is city map? I usually look at the gallery first actually
and less so on the forum.

Aerialod was also a new one for me - it's another free program by the guy who did MagicaVoxel and I follow him on Twitter - that's how I came across it.

I have only recently (re)started with Context Free - I am actually a StructureSynth person - a (sort of) 3D version of CFDG. I had generated some map like thing in Structure Synth and somebody asked if it would be possible to do that in ContextFree so I gave it a go and it worked quite easily.

Using StrucutreSynth I quite often export objects and render them externally so I am quite used to that and using heightmaps is just one of those things that's quite handy for all kind of surface structures in renders and/or when you are doing fractals in Mandelbulb3D.

The "City map" gallery is close but the real code for the map is in the post.

CF::MinimumSize = 4
CF::Background = [b -1]
startshape big
rsi = 0.4
shape quad
rule {
SQUARE[ s 1.1 b 0.2]
SQUARE[s 1 b -2 ]
}
shape big
{
loop 8 [y (0.5+rand(0.8))]big_x[s 1 (1.2+rand(0.5)) ]
}
shape big_x
{
loop 7 [x (1+rand(1))] frac[s (1.2+rand(0.58)) 1 ]
}
shape frac
rule {
quad[ ]
frac [x 0.15 y 0.15 s rsi r -90 b rand(0.1,0.3)]
frac[ x -0.25 y 0.25 s rsi r 0 b rand(0.1,0.3)]
frac[ x -0.25 y -0.25 s (rsi/2) r 90 b rand(0.1,0.3)]
frac[ x 0.25 y -0.25 s rsi r 90 b rand(0.1,0.3)]
}
rule {
quad[ ]
frac [x 0.25 y 0.25 s rsi r -90 b rand(0.1,0.3)]
frac[ x -0.25 y 0.25 s rsi r 0 b rand(0.1,0.3)]
frac[ x 0.25 y -0.25 s (rsi/2) r 90 b rand(0.1,0.3)]
frac[ x -0.25 y -0.25 s rsi r 90 b rand(0.1,0.3)]
}