POV-Ray : Newsgroups : povray.binaries.images : City buildings of different kind Server Time
31 Oct 2024 21:29:31 EDT (-0400)
  City buildings of different kind (Message 1 to 10 of 26)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Bill Pragnell
Subject: City buildings of different kind
Date: 19 Mar 2018 19:30:01
Message: <web.5ab0472eb982ead01b6c6b3a0@news.povray.org>
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!

Bill


Post a reply to this message


Attachments:
Download 'city1.jpg' (598 KB)

Preview of image 'city1.jpg'
city1.jpg


 

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 19 Mar 2018 19:35:00
Message: <web.5ab0487e653a98a11b6c6b3a0@news.povray.org>
and t'other one


Post a reply to this message


Attachments:
Download 'city2.jpg' (554 KB)

Preview of image 'city2.jpg'
city2.jpg


 

From: Paolo Gibellini
Subject: Re: City buildings of different kind
Date: 20 Mar 2018 07:57:41
Message: <5ab0f735$1@news.povray.org>
Bill Pragnell wrote on 20/03/2018 00:27:
> 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!
> 
> Bill
> 
I like a lot both of them (and also I'm interesting in the process used...).

Paolo


Post a reply to this message

From: Thomas de Groot
Subject: Re: City buildings of different kind
Date: 20 Mar 2018 08:06:57
Message: <5ab0f961$1@news.povray.org>
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 ;-)

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: City buildings of different kind
Date: 20 Mar 2018 17:55:00
Message: <web.5ab181c9653a98a1a47873e10@news.povray.org>
Wow, that is looking really cool. Your method looks more 'organic'/natural than
my attempts so far, regarding street layout, non-square buildings etc.
Currently, I'm wrapped up in the minutia of making more building height_field
faces, for more variety in the city-- which gives me time to figure out the best
way to tackle these other (more important) considerations, and how to code it
all ;-) My SDL scene is likewise getting quite complex. Your non-SDL approach
appears to be very sophisticated! Kudos. I'm looking forward to seeing how it
progresses.


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 21 Mar 2018 10:35:01
Message: <web.5ab26b76653a98a1474d4c950@news.povray.org>
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


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 21 Mar 2018 10:55:00
Message: <web.5ab27141653a98a1474d4c950@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
>
> 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 ;-)

I think I already do, but the threshold angle is quite small.
Just get sharper furniture!

Bill


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 21 Mar 2018 11:50:00
Message: <web.5ab27e17653a98a1474d4c950@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Wow, that is looking really cool. Your method looks more 'organic'/natural than
> my attempts so far, regarding street layout, non-square buildings etc.
> Currently, I'm wrapped up in the minutia of making more building height_field
> faces, for more variety in the city-- which gives me time to figure out the best
> way to tackle these other (more important) considerations, and how to code it
> all ;-) My SDL scene is likewise getting quite complex. Your non-SDL approach
> appears to be very sophisticated! Kudos. I'm looking forward to seeing how it
> progresses.

The very first thing I did was to parametrise buildings so they could be made
randomly with a degree of variety. And then I got bogged down with making them
polygonal, then with streets, then how to get those streets, then the various
edge cases that crop up...!

Since most of the groundwork is now laid, I can concentrate on colour, texture
and detail. Window sills via repeat object textures, roof styles and furniture
(aircon, water towers, masts etc), and some more building styles and sub-types.
I also really want to do some more work on the height selection, to get some
interesting cityscapes with 'hills' and 'valleys'. It's been a bottom-up
approach, so it's only recently started to all come together :)

Bill


Post a reply to this message

From: Alain
Subject: Re: City buildings of different kind
Date: 21 Mar 2018 14:15:28
Message: <5ab2a140$1@news.povray.org>

> 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.


Post a reply to this message

From: Bill Pragnell
Subject: Re: City buildings of different kind
Date: 21 Mar 2018 18:15:01
Message: <web.5ab2d872653a98a11b6c6b3a0@news.povray.org>
....and a different city from a more 'real' viewpoint.


Post a reply to this message


Attachments:
Download 'city_low_view.jpg' (225 KB)

Preview of image 'city_low_view.jpg'
city_low_view.jpg


 

Goto Latest 10 Messages Next 10 Messages >>>

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