POV-Ray : Newsgroups : povray.binaries.images : city buildings as height_field faces-- WIP 2.3.7? Server Time
6 Nov 2024 16:32:25 EST (-0500)
  city buildings as height_field faces-- WIP 2.3.7? (Message 1 to 7 of 7)  
From: Kenneth
Subject: city buildings as height_field faces-- WIP 2.3.7?
Date: 2 Sep 2018 14:10:06
Message: <web.5b8c270739c4ac4a47873e10@news.povray.org>
I've continued to work on my city buildings scheme (from about a year ago!),
taking my leisurely time.

My current overall idea is to use vertical height_fields for the *faces* of the
buildings, to get some interesting 3D detail there, rather than featureless
slabs.

This is just a concept test, using a CSG-differencing scheme (from a simple box
shape) to produce 'solid' buildings, with four  faces and a rooftop-- solid so
that I can subsequently difference-away an indent in the TOP surface for the
roof area, or for other interesting things. Height_fields are just thin shells
by themselves, but I don't want a 'hollow' building.(The test here uses a HF for
the top as well, just for visual interest; plus a sphere, to show that the
result is truly solid.)

(I'll also post an animation at p.b. animations.)

This CSG scheme may look deceptively simple-- but there's a complicating factor
(requiring some tricky coding), due to the way I'm making my original HF art.
Instead of the grayscale art's  'height_field base plane' corresponding to the
usual black color, it's actually at 50% gray. This way, I can make both indents
AND protrusions in the HF building faces (using true black and white for
those)--for recessed windows, protruding ledges, etc.  The middle 'base plane'
level of 50% then corresponds to the typical 'flat surface' of each building
face, always.

But that complicates things-- the mid-plane location depends on the (horizontal)
HF's original height scale (which will probably change for each individual city
building): as the scale increases, the mid-plane *moves*, as do the indents and
outer protrusions of the HF. When flipped vertically, the  'mid-plane' levels of
the four HFs need to always be kept in the same relative locations-- so that
those 'flat' surfaces always meet at the edges and corners of the building (and
so that the building itself remains the same size.) That was one part of the
challenge.

Then, as the four HF height scales change, the main CSG box object has to change
size as well(!). Otherwise, as the building-face protrusions jut out further
from the (50%) base-plane level, the protrusions would go *past* the BOX's
surface-- thus no CSG there. But increasing the box object size (while keeping
the individual HF sizes the same) produced a NEW problem: The CSG resulted in a
leftover 'surrounding' cage-like object, outside the edges of the building-- a
natural consequence of differencing the 'fixed' HF size from the now-larger box
object. Those extra parts had to be differenced away as well.

The finishing touch was to code everthing so that any change to the HFs' height
scale would auomatically compensate everything else. (The final object also has
a manually-added bounding box, which automatically changes size too.)

To make all of this stuff work without even *more* coding-- like adding
inverses, negative scalings etc--I simply reversed the colors of the HF art:
black becomes white, etc (but the linear 50% level stays the same.)

The next challenge is to add code to allow any size building, not just a square
1-unit box!


Post a reply to this message


Attachments:
Download 'box_and_hf_difference.jpg' (270 KB)

Preview of image 'box_and_hf_difference.jpg'
box_and_hf_difference.jpg


 

From: jr
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 4 Sep 2018 15:15:00
Message: <web.5b8ed95f7b6cf1311500b2fd0@news.povray.org>
hi,

"Kenneth" <kdw### [at] gmailcom> wrote:
> My current overall idea is to use vertical height_fields for the *faces* of the
> buildings, to get some interesting 3D detail there, rather than featureless
> slabs.
> ...
> The next challenge is to add code to allow any size building, not just a square
> 1-unit box!

have you come across "insight3d" yet?  "..an open-source, image-based modeling
tool for creation of buildings from photographs."
http://insight3d.sourceforge.net/


regards ,jr.


Post a reply to this message

From: Kenneth
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 5 Sep 2018 06:25:01
Message: <web.5b8fae967b6cf131a47873e10@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
!
>
> have you come across "insight3d" yet?  "..an open-source, image-based modeling
> tool for creation of buildings from photographs."
> http://insight3d.sourceforge.net/
>

Looks interesting; I didn't know about it. (Apparently it's only a 32-bit
version so far.) I'll try to check it out.


Post a reply to this message

From: Sven Littkowski
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 16 Sep 2018 11:55:22
Message: <5b9e7cea$1@news.povray.org>
Be on alert for the Borg, my friend.

---

http://www.avg.com


Post a reply to this message

From: Kenneth
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 16 Sep 2018 18:50:00
Message: <web.5b9edd8f7b6cf131a47873e10@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> Be on alert for the Borg, my friend.
>

You're right, it does look like that! I didn't make the mental connection until
now.


Post a reply to this message

From: clipka
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 16 Sep 2018 20:22:09
Message: <5b9ef3b1$1@news.povray.org>
Am 17.09.2018 um 00:47 schrieb Kenneth:
> Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
>> Be on alert for the Borg, my friend.
>>
> 
> You're right, it does look like that! I didn't make the mental connection until
> now.

"You know you've been watching TOO LITTLE star trek when..."


Post a reply to this message

From: Sven Littkowski
Subject: Re: city buildings as height_field faces-- WIP 2.3.7?
Date: 18 Sep 2018 15:00:13
Message: <5ba14b3d@news.povray.org>
Anyhow, he's been transformed from within. He was been already ready for
them...

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

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