POV-Ray : Newsgroups : povray.binaries.images : city building generator WIP : Re: city building generator WIP Server Time
25 Apr 2024 17:11:57 EDT (-0400)
  Re: city building generator WIP  
From: omniverse
Date: 22 Jul 2017 01:00:00
Message: <web.5972db3e164bd7b09c5d6c810@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
>
> Currently, the buildings are just randomly placed. I've made no attempt to put
> them into a 'street grid' yet. (Perhaps real-world real-estate prices will be so
> high in the future that buildings will NEED to be overlapped by economic
> necessity, ha!)

Impressive none-the-less. I was thinking about the Spider-Man movie (what CGI
movie haven't I seen?!) as I looked at your city. Movie magic could do wonders
with this already, just by showing only a few moments in motion. Not sure how
many people would notice there aren't streets if only from this diagonal view.

> The buildings' facades and windows are from photos I got off the 'net-- then
> re-worked in Photoshop to be small 'tiles' that can be repeated. Then I took the
> same tiles and made 'reflection hold-out mattes', for the windows themselves.
> (That took a lot of manual labor.) The two different images are combined in the
> many textures' image_pattern {...} blocks, so that reflections only show up in
> the glass windows. The 'image_pattern' feature is great for creating 'texture
> masks'.

Effective.

> The photo tiles (I've used only eleven so far, randomly repeated) are all in
> different shapes and resolutions. I *could* have re-made them to be the same rez
> and shape (more or less) in PS-- but it was more fun to write SDL code to take
> care of that, using 3.7xx's new max_extent feature for finding the X/Y rez of an
> image.
>
> Applying image_maps to all four sides of a box shape would seem to be a simple
> procedure (and it is, if that's all that's required.) But I decided to 'enclose'
> the image tiles in POV-Ray's 'boxed' pattern-- to create a thin 'concrete
> outline' around the (four) faces of each building, with a larger one at the top.
> I didn't want the buildings' window images to go all the way to the side edges;
> that would look odd and unrealistic. This extra step took most of the coding
> effort-- making sure that it worked at all building scales, while also keeping
> all the buildings' windows at the SAME relative scale. (Obviously, each floor of
> each building should be the same height!)

Heh. Did I notice that until you said? Nope.  ;) Again, I glance over these type
of images and eventually look more, but I know there's going to be something
amiss if I look long enough at anything like this. Well, usually anyhow.
Main thing I was seeing was the cleanliness of the outer tops, especially
compared to the interior of roofs.

> I made an interesting discovery with the windows: The raw photos already showed
> natural reflections there-- which didn't look correct when applying 'extra'
> reflection in POV-Ray. In real life, windows in buildings are very dark (when
> NOT reflecting anything) because the room interiors behind them are dark,
> *compared to* the buildings' bright sunlit exteriors. SO, I had to darken the
> window areas in all the photos to remove that reflected look, then add it back
> in in POV-ray.
>
> Instead of using real photos for this, it would be interesting
> to try and create some sort of 'window/facade' generator, using procedural
> textures in POV-Ray instead. As a guess, it might be done with a combination of
> the 'boxed' pattern, the 'cells' pattern, and warp{repeat...} in some kind of
> combination, along with random variations of all the elements. (BTW, I haven't
> yet looked at any of the building generator .inc files or macros that are
> available; I first wanted to see how far I could go, before I needed help!)
>
> Still to do: Figuring out a way for each building's width and height to be
> strict multiples of its image_map tile size-- so that a building's edge doesn't
> end in the middle of a window! (Which is currently what happens, as the
> buildings are just randomly sized.) I may have to rewrite a good chunk of my
> code to do that :-/
>
> Another way to make a building would be with *heightfields* for the faces, to
> show their natural 3-D appearance (balconies, recessed windows, etc.) I'm
> working on that too-- I've already made HF image_maps from most of the image
> tiles-- but it's a tedious Photoshop procedure (and involves rewriting my
> code yet again.)

If the result does well maybe it will be worthwhile!
^^ says me LOL

Bob


Post a reply to this message

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