POV-Ray : Newsgroups : povray.binaries.images : City buildings of different kind Server Time
25 Apr 2024 06:45:39 EDT (-0400)
  City buildings of different kind (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Alain
Subject: Re: City buildings of different kind
Date: 22 Mar 2018 16:59:20
Message: <5ab41928$1@news.povray.org>

> On 21-3-2018 19:16, Alain wrote:

>>> On 20-3-2018 0:27, Bill Pragnell wrote:
>>>> So, inspired by Kenneth's recent forays into city building, I've 
>>>> returned to a
>>>> project that I started over 3 years ago.
>>>>
>>>> This started as a set of SDL macros, but unfortunately it was 
>>>> getting dog-slow
>>>> and impossible to maintain so I started over in C++. I'm using SVG 
>>>> files as
>>>> input, reading straight-line paths to define streets, intersecting 
>>>> them to make
>>>> block polygons, then splitting the blocks to get building polygons. The
>>>> buildings are constructed as triangle blocks and exported as mesh2 
>>>> objects in
>>>> ...inc files.
>>>>
>>>> In the images here, the building data is a few MB in size, generated 
>>>> in several
>>>> seconds by my program and rendered in several minutes by POV-Ray.
>>>>
>>>> I have a huge to-do list, and progress is sporadic because real 
>>>> life, but I am
>>>> getting some nice results at last!
>>>>
>>>
>>> Very interesting indeed. You might consider slicing off the polygonal 
>>> buildings when the angle gets too sharp. There are rooms there which 
>>> are impossible to furnish ;-)
>>>
>>
>> You probably did not see the World's narrowest house...
>> It's 5 stories high, and have only a single window on each top floors. 
>> The ground floor have only a single door and a narrow window. Go 
>> inside, and you can easily touch the opposing walls, everywhere.
>> It's to narrow for a double bed.
> 
> Well, I know Amsterdam has one at least. ;-)
> 

The one that have the official title is in Bruxel, on the Grand Place. 
As it's a private house, there are no visiting.


Post a reply to this message

From: Kenneth
Subject: Re: City buildings of different kind
Date: 23 Mar 2018 15:35:01
Message: <web.5ab55684653a98a1a47873e10@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> > You've also solved the need for
> > 'recessed' building sections on top of the 'main' buildings.
>
> Do you mean the 'compound' buildings with the decreasing sizes? Those are
> basically a specialised building type that just creates two or three
> sub-buildings with different versions of the base polygon. Since the building
> construction already offsets polygons extensively, it wasn't a lot of work to
> add this.
>
> ...there are indeed many ways to skin a cat!
>

This as far as I got with my original code (and I made only a single small
render, unfortunately.) The upper building sections are not 'correct' though.

Then I changed the code, to try a different approach to those upper sections.

*Then* I decided to go in a different direction entirely-- making the building
faces as height_fields (which will require a re-work of my original
city-building code.)

Ah, the fun of it!


Post a reply to this message


Attachments:
Download 'buildings with added heights.png' (836 KB)

Preview of image 'buildings with added heights.png'
buildings with added heights.png


 

From: Stephen
Subject: Re: City buildings of different kind
Date: 23 Mar 2018 16:07:28
Message: <5ab55e80$1@news.povray.org>
On 23/03/2018 19:33, Kenneth wrote:
> Ah, the fun of it!

Pleased that you are enjoying yourself.
This is looking too good. ;-)

-- 

Regards
     Stephen


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 23 Mar 2018 18:20:01
Message: <web.5ab57c62653a98a11b6c6b3a0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> This as far as I got with my original code (and I made only a single small
> render, unfortunately.) The upper building sections are not 'correct' though.
>
> Then I changed the code, to try a different approach to those upper sections.
>
> *Then* I decided to go in a different direction entirely-- making the building
> faces as height_fields (which will require a re-work of my original
> city-building code.)

Yes, I remember this image - really nice. I need more roof furniture!

> Ah, the fun of it!

It's not the destination, it's the journey :)


Post a reply to this message

From: Alain
Subject: Re: City buildings of different kind
Date: 25 Mar 2018 17:49:47
Message: <5ab8197b$1@news.povray.org>

> "Bill Pragnell" <bil### [at] hotmailcom> wrote:
>> "Kenneth" <kdw### [at] gmailcom> wrote:
>>> You've also solved the need for
>>> 'recessed' building sections on top of the 'main' buildings.
>>
>> Do you mean the 'compound' buildings with the decreasing sizes? Those are
>> basically a specialised building type that just creates two or three
>> sub-buildings with different versions of the base polygon. Since the building
>> construction already offsets polygons extensively, it wasn't a lot of work to
>> add this.
>>
>> ...there are indeed many ways to skin a cat!
>>
> 
> This as far as I got with my original code (and I made only a single small
> render, unfortunately.) The upper building sections are not 'correct' though.
> 
> Then I changed the code, to try a different approach to those upper sections.
> 
> *Then* I decided to go in a different direction entirely-- making the building
> faces as height_fields (which will require a re-work of my original
> city-building code.)
> 
> Ah, the fun of it!
> 

You have a problem with the roof structures : They often end outside the 
roofs.
I can see at least 22 cases where beams are to long for the roofs.
It seems to only affect buildings where the top part is smaller than the 
bottom part. The beams are sized for the bottom part.


Alain


Post a reply to this message

From: Kenneth
Subject: Re: City buildings of different kind
Date: 25 Mar 2018 18:35:00
Message: <web.5ab822e9653a98a1a47873e10@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> >
> > This as far as I got with my original code...

> You have a problem with the roof structures : They often end outside the
> roofs.
> I can see at least 22 cases where beams are to long for the roofs.
> It seems to only affect buildings where the top part is smaller than the
> bottom part. The beams are sized for the bottom part.
>

Yes, that is indeed the case. AND, the upper building sections are probably
slicing off some of the windows, at the building edges. But I stopped working on
this particular version of the scene, and began making the building faces as
height_fields... an entirely different approach. I'll go back to the original
scene code later, to try and fix the problems. Hopefully, the city will then
look more realistic!


Post a reply to this message

From: Paolo Gibellini
Subject: Re: City buildings of different kind
Date: 26 Mar 2018 04:19:59
Message: <5ab8ad2f$1@news.povray.org>
Bill Pragnell wrote on 21/03/2018 15:25:
> Paolo Gibellini <p.g### [at] gmailcom> wrote:
>> I like a lot both of them (and also I'm interesting in the process used...).
> 
> Thanks!
> Broadly speaking, the core algorithm takes a list of straight line segments as
> input, then:
>   - intersects all lines to find the connected graph
>   - traverses the graph nodes to build polygons
>   - discards polygons that are too small
>   - splits polygons up until a threshold edge length or split count is reached
>   - uses new polygons as basis for buildings.
> 
> The splitting threshold is selected based on a block's nominal max height,
> imposed randomly in the images above. Building heights are randomly picked up to
> the block max height. Building type is selected based on their height. Buildings
> are made using simple vertical prisms with open sides or ends, combined into a
> single triblock per building, each with its own texture list. These are then
> written to a .inc file.
> 
> The buildings were actually quite quick to make in SDL (even if the code was a
> little convoluted) - the real problem was keeping track of graph nodes and edges
> without going insane. Much easier with a bit of object abstraction! Plus the
> naive algorithms I'm using were far too slow for the SDL parsing.
> 
> I'll post some more pictures at some point.
> 
> Bill
> 

Thank you. The results are excellent imho.

Paolo


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 27 Mar 2018 19:10:01
Message: <web.5abacea7653a98a11b6c6b3a0@news.povray.org>
playing with height functions


Post a reply to this message


Attachments:
Download 'blocks_hill1.jpg' (343 KB)

Preview of image 'blocks_hill1.jpg'
blocks_hill1.jpg


 

From: Kenneth
Subject: Re: City buildings of different kind
Date: 27 Mar 2018 21:45:00
Message: <web.5abaf260653a98a1a47873e10@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> playing with height functions

Very nice!

What I've noticed from looking at real city images (well, using New York City as
my guide-- a *mostly* grid type of layout), the street widths and their block
sizes are interesting: The main thoroughfares are wide and long, while the cross
streets are narrow. And the city 'blocks' between the narrow streets have only
two buildings back to back (of various ground plans, of course, along with an
alleyway), while the wider streets are much longer, with many more buildings
along their lengths. In other words, the street-isolated blocks of buildings are
not square, but rectangular. (Older thoroughfares like NYC's Broadway go in a
diagonal direction, but that's another matter!!)

That's my plan for my own city, anyway-- when I finally get around to coding it
;-)


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 28 Mar 2018 03:35:01
Message: <web.5abb4501653a98a1a9432db90@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> What I've noticed from looking at real city images (well, using New York City as
> my guide-- a *mostly* grid type of layout), the street widths and their block
> sizes are interesting: The main thoroughfares are wide and long, while the cross
> streets are narrow. And the city 'blocks' between the narrow streets have only
> two buildings back to back (of various ground plans, of course, along with an
> alleyway), while the wider streets are much longer, with many more buildings
> along their lengths. In other words, the street-isolated blocks of buildings are
> not square, but rectangular. (Older thoroughfares like NYC's Broadway go in a
> diagonal direction, but that's another matter!!)
>
> That's my plan for my own city, anyway-- when I finally get around to coding it

I have had these exact thoughts :)

The lines I use as input for streets also have widths associated with them. I
have some convoluted magic that fairly reliably makes the resulting block
polygons with the correct gaps between them. When making buildings, there is
also a max alley width used to separate them. I've even gone as far as flagging
polygon edges that lie on street lines, which is carried through to the
buildings. This enables me to discard buildings that are hemmed in with no
street access (just about visible in the hill-downtown image), and in theory I
can make the 'blocked' building faces differently (e.g. fewer windows). If I set
the split parameters right, I can get back-to-back blocks, but you do see larger
blocks with empty interiors in real cities elsewhere in the world.

(I think I'm low-balling the street widths, because they're hardly visible in my
images here unless the camera happens to be aligned with them.)

And it's funny you should mention NYC - I actually have an approximated SVG
version of Manhattan that I hand-traced over Google Maps screenshots, each
street a single line. I've been using it for testing. I've only tried it once
recently - it took minutes to process and the resulting building geometry files
were > 250MB :o I'll have to try it again soon to see if I can get some
interesting images :)

Bill


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.