POV-Ray : Newsgroups : povray.general : Chris Colefax's city generator Server Time
2 Nov 2024 15:27:31 EDT (-0400)
  Chris Colefax's city generator (Message 1 to 3 of 3)  
From: Greg M  Johnson
Subject: Chris Colefax's city generator
Date: 31 Dec 2003 16:55:49
Message: <3ff345e5$1@news.povray.org>
... is quite cool.

http://www.geocities.com/SiliconValley/Lakes/1434/citygen.html

If Chris is reading these ng's,  I have a public request for a feature to
this generator.  One thing I noticed that when tinkering years ago was that
the city block near the origin is completely different depending on whether
you have one block or mulitple blocks on the scene.   Suppose I wanted to
set up some "action"  and do lots of tinkering at the origin block.  Then
for final render I might want to add a bloomin' city behind it.  How hard
would it be (for you/me) to change your city generator to make this change?


Post a reply to this message

From: Chris Colefax
Subject: Re: Chris Colefax's city generator
Date: 1 Jan 2004 19:39:31
Message: <3ff4bdc3@news.povray.org>
"Greg M. Johnson" <gregj;-)565### [at] aolcom> wrote:
> If Chris is reading these ng's,  I have a public request for a feature to
> this generator.  One thing I noticed that when tinkering years ago was
that
> the city block near the origin is completely different depending on
whether
> you have one block or mulitple blocks on the scene.   Suppose I wanted to
> set up some "action"  and do lots of tinkering at the origin block.  Then
> for final render I might want to add a bloomin' city behind it.  How hard
> would it be (for you/me) to change your city generator to make this
change?

The City Generator uses a number of random number streams to control
different aspects of the city.  One way to achieve what you want is to reset
the necessary streams for each block, e.g. create a custom city macro file
(a copy of City.mcr) and rewrite the city_building macro something like
this:

#macro city_building (Corner1, Corner2, Direction)
    #declare _CT_rand3 = seed(vlength(Corner1*100));
    #declare _CT_rand4 = seed(vlength(Corner1*100));
    #local BCentre = (Corner1 + Corner2)/2;
    #local BHeight = min_building_height +
rand(_CT_rand3)*(max_building_height - min_building_height);
    #if (BHeight > 0) city_assemble_building
(int(building_types*rand(_CT_rand3)), (Corner2-Corner1) +
y*BHeight, -y*90*Direction, BCentre + y*pavement_height) #end
#end

This way the characteristics of each building will be determined by its
distance from the origin, and adding further city blocks around the centre
will not change the existing buildings.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Chris Colefax's city generator
Date: 2 Jan 2004 23:16:32
Message: <3ff64220@news.povray.org>
Cool thanks.  That it's doable gives me courage to try.  In the middle of
irtc anim rendering right now, but thanks greatly for the answer.


Post a reply to this message

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