 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This is a first approach towards simulating urbanism in Gancaloon,
following a pattern of streets. Flat roofs are considered the norm. ;-)
- blocks were drawn on a bitmap;
- scaled up and reworked a bit/added to;
- transformed to svg paths in Inkscape;
- exported as one prism to POV;
- scaled down and translated to correct position in POV;
- intersected with copy of height_field;
- textured with a cell pattern.
Comments:
From far away, the illusion is almost perfect, but close up the defects
show. First of all, the buildings on steeper slopes were the roofs
should be horizontal are looking like anything except buildings. The
blocks should also be a bit more smoothed I guess. The cell texture is
too regular despite a bit of warp added. Building height differences are
needed. Building- and texture orientation should be more random.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon1.png' (391 KB)
Download 'gancaloon2.png' (376 KB)
Preview of image 'gancaloon1.png'

Preview of image 'gancaloon2.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
With the intersecting height_field slightly perturbed by averaging with
a cell pattern, the result is more interesting.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (409 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 31/07/2011 3:42 PM, Thomas de Groot wrote:
> With the intersecting height_field slightly perturbed by averaging with
> a cell pattern, the result is more interesting.
>
That does look better. To my eyes the buildings on the right look right
but the ones on the left look like rocks. As if the scale has changed.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 31-7-2011 17:04, Stephen wrote:
> That does look better. To my eyes the buildings on the right look right
> but the ones on the left look like rocks. As if the scale has changed.
>
Yes, I agree. The technique is not really perfect. Still, it gives some
interesting results. In the present image I decreased still more the
influence of the cell pattern, which reduces the rock-like effect I
guess. Some artefacts are visible from the averaging and/or pixel level
of the images. They may add to the illusion or not however. The problem
is still with the *flat* roofs. I guess I have to avoid steep slopes :-)
at least for the time being.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (403 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> The problem is still with the *flat* roofs. I guess I have to avoid
> steep slopes :-) at least for the time being.
Instead of averaging with the cell pattern you could multiply the
cell function value with coarsely sampled evaluations of the original
height_field image. That would give "city blocks" of constant height
appropriate for local average terrain. It will introduce steps on
roofs that fall on a cell boundary but maybe it looks like an
intended structure ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2-8-2011 0:29, Christian Froeschlin wrote:
> Instead of averaging with the cell pattern you could multiply the
> cell function value with coarsely sampled evaluations of the original
> height_field image. That would give "city blocks" of constant height
> appropriate for local average terrain. It will introduce steps on
> roofs that fall on a cell boundary but maybe it looks like an
> intended structure ;)
>
Yes, of course! <bangs head with the mouse> I should have thought of
that, especially as I used this technique profusely with my Geomorph
macro which was completely function controlled.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tenDOTlnDOTretniATtoorgedDOTt> wrote:
No particular comments, other than to say this looks an interesting project!
Also, I quite like the surreal nature of your placeholder axes and grids
combined with what is shaping up to be a high-detail cityscape.
I shall be watching with interest. :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2-8-2011 11:31, Bill Pragnell wrote:
> Thomas de Groot<tenDOTlnDOTretniATtoorgedDOTt> wrote:
>
> No particular comments, other than to say this looks an interesting project!
> Also, I quite like the surreal nature of your placeholder axes and grids
> combined with what is shaping up to be a high-detail cityscape.
>
> I shall be watching with interest. :)
>
>
Thanks Bill. Much appreciated.
In another context I could quite easily use those placeholders as
integral (and surreal indeed) part of the scene :-) Here I find them
very useful for the placement of object and to get a feel for the
dimensions of the landscape. And of course they are easily switched on
or off according to need.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bill Pragnell wrote:
> Also, I quite like the surreal nature of your placeholder axes and grids
> combined with what is shaping up to be a high-detail cityscape.
Sort of like a holo-suite malfunction ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2-8-2011 0:29, Christian Froeschlin wrote:
> Instead of averaging with the cell pattern you could multiply the
> cell function value with coarsely sampled evaluations of the original
> height_field image. That would give "city blocks" of constant height
> appropriate for local average terrain. It will introduce steps on
> roofs that fall on a cell boundary but maybe it looks like an
> intended structure ;)
>
Well, this is not as simple as it seems, or I am doing something wrong
(probably).
I wrote a simple test code which I think explains things. Just insert it
in a basic scene:
//Start code
#declare HF_pig =
pigment {
image_map {
png "plasma3.png"
}
rotate -90*x
}
#declare F_cells =
function {
pigment {
cells
color_map {
[0.1 rgb 0.4]
[0.9 rgb 0.6]
}
//warp {turbulence <0.1, 0, 0.1>}
scale 0.03
}
}
#declare F_HF_00 =
function {
pigment {
image_map {
png "plasma3.png" gamma 1.0
map_type 0
interpolate 2
}
}
}
#declare F_flatroof =
function {
F_cells(x,y,z).hf
* F_HF_00 (x,y,z).hf
}
#declare hf_cut =
intersection {
height_field {
function 500, 500 {F_flatroof(x,y,z)}
smooth
translate <-0.5, 0, -0.5>
scale <10, 1, 10>
}
box {
<-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
scale <10, 1, 10> * <0.99, 20, 0.99>
}
translate 1.0*y
}
intersection {
object {hf_cut}
box {
<-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
scale <3, 10, 5>
rotate 45*y
}
pigment {rgbt <1,1,0,0.1>}
}
//----------------------------------------------------------
intersection {
height_field {
function 1000, 1000 {F_HF_00(x,y,z).hf}
smooth
pigment {HF_pig}
translate <-0.5, 0.0, -0.5>
scale <10, 1, 10>
}
box {
<-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
scale <10, 1, 10> * <0.99, 10, 0.99>
}
}
//End code
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> Well, this is not as simple as it seems, or I am doing something wrong
> (probably).
the subsampling of the height field needs to be done by rounding
the input coordinates
#declare cell_size = 0.03;
#declare F_flatroof = function {
F_HF_00(int(x/cell_size)*cell_size,
int(y/cell_size)*cell_size,
int(z/cell_size)*cell_size).hf
}
and the thing about multiplying with the cell pattern was
just me not thinking clearly ;) Although it might be useful
to add a smaller scale cell pattern with low weight so that
not all houses within a block have exactly the same height.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 3-8-2011 23:06, Christian Froeschlin wrote:
> the subsampling of the height field needs to be done by rounding
> the input coordinates
>
> #declare cell_size = 0.03;
>
> #declare F_flatroof = function {
> F_HF_00(int(x/cell_size)*cell_size,
> int(y/cell_size)*cell_size,
> int(z/cell_size)*cell_size).hf
> }
>
> and the thing about multiplying with the cell pattern was
> just me not thinking clearly ;) Although it might be useful
> to add a smaller scale cell pattern with low weight so that
> not all houses within a block have exactly the same height.
Happily, I am learning every day :-) This is a neat little trick,
Christian! Thank you very much indeed for sharing. I think this is going
to work superbly. Multiplying with a slightly smaller cell pattern gives
perfect results now.
I am going to implement this now on Gancaloon.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Using Christian's code, here is the next wip. Much better already!
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (407 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nice ;)
My impression is that there is not enough space between houses.
There should probably be a fine scale road system, either painted
by hand or zeroed using some sort of crackle pattern.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 5-8-2011 0:35, Christian Froeschlin wrote:
> Nice ;)
>
> My impression is that there is not enough space between houses.
> There should probably be a fine scale road system, either painted
> by hand or zeroed using some sort of crackle pattern.
True, although the particular society of Gancaloon is based on this
closely built environment ;-)
Still, I was already working on a bit more open urbanism, like this image.
Note that I *added* the cell function instead of *multiplying* it. The
results are better because in the latter case the geometry of the
cutting function is changed in the y direction.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (409 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
For those interested, this is the workflow I have developed to achieve
this view:
/*------------------------------------------------------------------------------------
The urbanism is not detailed and only meant as illusion of a crowded
cityscape.
Follow this workflow (adapt details as needed):
1. In e.g. GIMP draw a city block bitmap layer following a street
pattern layer.
2. Export the bitmap and scale it up 10x.
3. Add additional features according to need.
4. Import the bitmap in Inkscape
5. Apply Filters/Blurs/Blur content
6. Apply Trace Bitmap with (e.g.):
Brightness Cutoff = 0.500
Suppress Speckles: size 2
Smooth Corners: threshold 0.40
Optimize Paths: tolerance 0.20
7. Apply Paths/Simplify if needed
8. Save as POV file (if you want to keep the svg file, save it as well)
9. Open in POV-Ray and change the object{} content as needed:
scale x an z by 1/10; scale up y; add textures; etc
10. translate to correct position, first by centering the object (use
dimensions given
in the file) then by trial and error until correct (use an
orthographic vertical view)
and apply the intersection with the cutoff function you have
created from a height_field
and additional functions
---------------------------------------------------------------------------------------*/
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 2011/08/04 18:35, Christian Froeschlin a écrit :
> Nice ;)
>
> My impression is that there is not enough space between houses.
> There should probably be a fine scale road system, either painted
> by hand or zeroed using some sort of crackle pattern.
Keep in mind that it's a medieval style walled city. In those citys,
space is *scarse*! Buildings are literaly cramed toghether leaving only
the bare minimum space for the narow and twisting streets. Buildings
overhanging over the streets are relatively to very common. Facing
buildings may actualy touch each others. This makes for prety dark
streets and aleys.
Over time, as old buildings are torn down and new ones built, the
streets tend to become narower. Some streets become dead ends, and
former dead ends may now allow thru trafic. In the worst case, some
streets or group of streets can become totaly cut off from all other
streets... In that case, you may have some "tunels" through some
buildings, or strange bridges passing over buildings.
If the terrain is steep, some "streets" can actualy be stairs.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Looks like a interesting project. Curious how it works out (I like cities views
:-)
For an ancient city (don't know if it's meant to be), a few more alleys may be
nice. Btw, they can use the axes as a sewer system, they exit nicely in the
sea...
Joost
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
From the other border of the River Yann, Gancaloon is going to look
something like this.
Water material based on code by Trevor Quayle; landscape patterned
texture based on code by Jaime Vives Piqueres.
My next problem now is this. I have an image_map for texturing the
roads, mostly transparant and which layers nicely over another texture,
except... if I use this patterned texture I cannot layer over it! I have
tried patterning the image_map but to no useful result. Any smart idea
you want to share? ;-)
Thanks!
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon_08a.png' (560 KB)
Preview of image 'gancaloon_08a.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 08/19/2011 11:17 AM, Thomas de Groot wrote:
> From the other border of the River Yann, Gancaloon is going to look
> something like this.
>
> Water material based on code by Trevor Quayle; landscape patterned
> texture based on code by Jaime Vives Piqueres.
>
> My next problem now is this. I have an image_map for texturing the
> roads, mostly transparant and which layers nicely over another texture,
> except... if I use this patterned texture I cannot layer over it! I have
> tried patterning the image_map but to no useful result. Any smart idea
> you want to share? ;-)
>
> Thanks!
>
> Thomas
wow ... making progress! I LIKE where this is going. As far as smart
ideas ... well I'm bogged down working on a landscape of my own, but am
making some headway with Bill's height_field function.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> My next problem now is this. I have an image_map for texturing the
> roads, mostly transparant and which layers nicely over another texture,
> except... if I use this patterned texture I cannot layer over it!
Worst case you can always create a copy of the landscape height_field
translates slightly up just for the roads, so the transparency will show
the lower height_field.
> I have tried patterning the image_map but to no useful result.
Assuming you can make a road image that is white where the roads
are, black where the roads are not, and somewhat smoothed to avoid
hard edges, you should be able to load it as an image_map, use that
as a pigment_pattern with texture_map, using landscape texture for
0 and road texture for 1.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 19-8-2011 23:45, Christian Froeschlin wrote:
> Worst case you can always create a copy of the landscape height_field
> translates slightly up just for the roads, so the transparency will show
> the lower height_field.
Yes, that should be last resort indeed.
> Assuming you can make a road image that is white where the roads
> are, black where the roads are not, and somewhat smoothed to avoid
> hard edges, you should be able to load it as an image_map, use that
> as a pigment_pattern with texture_map, using landscape texture for
> 0 and road texture for 1.
Yes, that is the way I was thinking too, and started experimenting. I
see that I am on the right track (no pun intended)... Thanks!
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Yes! Got it at last! :-)
Note that the road pattern has also been incorporated into the
height_field (done in Geocontrol)
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (419 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 13-8-2011 23:01, Joost wrote:
>
> Looks like a interesting project. Curious how it works out (I like cities views
> :-)
>
> For an ancient city (don't know if it's meant to be), a few more alleys may be
> nice. Btw, they can use the axes as a sewer system, they exit nicely in the
> sea...
The way the urbanism is built presently is intended for overview at some
distance. Real close, a totally different concept should be used where
more detailed alleyways would be provided. The period of the city is
some equivalent of 1000 AD, in the southeastern Mediterranean, but it is
not intended to represent any existing historical setting. It is
strictly imaginary with only touches of more familiar things.
Good idea about the sewer system. I might create an aqueduct or two
perhaps ;-)
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Another view of the city, as seen from a boat coming from upstreams.
This is how Lord Dunsany described this part of the river in Idle Days
on the Yann, from the book A Dreamer's Tales:
[quote]
And now as the sun's last rays were nearly level, we saw the sight that
I had come to see, for from two mountains that stood on either shore two
cliffs of pink marble came out into the river, all glowing in the light
of the low sun, and they were quite smooth and of mountainous altitude,
and they nearly met, and Yann went tumbling between them and found the sea.
And this was Bar-Wul-Yann, the Gate of Yann, and in the distance through
that barrier's gap I saw the azure indescribable sea, where little
fishing-boats went gleaming by.
[/quote]
Note that Lord Dunsany visited the region long before the foundation of
Gancaloon!
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon_10.png' (584 KB)
Preview of image 'gancaloon_10.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 08/23/2011 08:50 AM, Thomas de Groot wrote:
> Another view of the city, as seen from a boat coming from upstreams.
>
> This is how Lord Dunsany described this part of the river in Idle Days
> on the Yann, from the book A Dreamer's Tales:
>
> [quote]
> And now as the sun's last rays were nearly level, we saw the sight that
> I had come to see, for from two mountains that stood on either shore two
> cliffs of pink marble came out into the river, all glowing in the light
> of the low sun, and they were quite smooth and of mountainous altitude,
> and they nearly met, and Yann went tumbling between them and found the sea.
> And this was Bar-Wul-Yann, the Gate of Yann, and in the distance through
> that barrier's gap I saw the azure indescribable sea, where little
> fishing-boats went gleaming by.
> [/quote]
>
> Note that Lord Dunsany visited the region long before the foundation of
> Gancaloon!
>
> Thomas
Hey nice work ... curious about the camera settings that you are using,
mind posting a few particulars? I /really/ like how this scene is posed
... top drawer!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 23-8-2011 15:04, Jim Holsenback wrote:
>> Thomas
> Hey nice work ... curious about the camera settings that you are using,
> mind posting a few particulars? I /really/ like how this scene is posed
> ... top drawer!
Gladly.
Knowing that the height_field with the city has a scale of <500, 30,
500> and is centered on the origin with basis at 0.0, and knowing that
water level is y=0.60; and with the other side of the river being a
height_field with the same scale and translated <-250, 0, 0>:
//Camera positions:
#declare SceneLook = 6; //0=overview; 1=overview River Harbour;
2=Ruins; 3=orthographic vertical; 4=orthographic vertical for roaming
//5=Sikhara; 6=overside Yann; 7=offshore
Sea Harbour; 8=birdseye Yann mouth; 9=from upriver;
camera {
#switch(SceneLook)
#case (0)
location <-100, 30, -240.0>
look_at <-100, 0, 0.0>
#break
#case (1)
location <-140, 30, -140.0>
look_at <-140, 0, 0.0>
#break
#case(2)
location <-59.6, 14.3, -234.0>
look_at <-80.0, 25.0, 0.0>
#break
#case(3)
orthographic
location <0.0, 300.0, 0.0>
look_at <0.0, 0.0, 0.0>
#break
#case(4)
orthographic
location <-150.0, 100.0, -50.0>
look_at <-150.0, 0.0, -50.0>
#break
#case(5)
location <-100.0, 25.0, -50.0>
look_at <-150.0, 10.0, 10.0>
#break
#case(6)
location <-325.0, 5.0, -150.0>
look_at <-100.0, 10.0, 20.0>
#break
#case(7)
location <-100.0, 100.0, 200.0>
look_at <-100.0, 10.0, 0.0>
#break
#case(8)
location <-200.0, 100.0, 200.0>
look_at <-200.0, 10.0, 0.0>
#break
#case(9)
location <-200.0, 2.0, -200.0>
look_at <-200.0, 10.0, 0.0>
#end
direction 1.5*z
right x*image_width/image_height
angle 80
}
The large angle generates some deformation which are acceptable is these
kind of panoramic views.
Just ask if you want any more info.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 08/24/2011 04:46 AM, Thomas de Groot wrote:
> The large angle generates some deformation which are acceptable is these
> kind of panoramic views.
>
> Just ask if you want any more info.
>
> Thomas
Nope ... I'm good to go. Was just looking for a reality check with a
somewhat similar setup. Thanks.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |