POV-Ray : Newsgroups : moray.win : How do I rotate a citygen 1.5 scene in moray? Server Time: 16 Jun 2019 07:45:49 GMT
  How do I rotate a citygen 1.5 scene in moray? (Message 1 to 7 of 7)  
From: JReyes
Subject: How do I rotate a citygen 1.5 scene in moray?
Date: 28 Jan 2007 06:35:00
Message: <web.45bc43458f47c8365604e8e60@news.povray.org>
I want to use a scene create with CityGen v1.5
(http://members.tripod.com/~dcieslak/util.html) in moray. I find I can
easily bring in the scene and have it rendered. But of course the city is Y
up and moray is z up. what is the best way to rotate the city? I tried using
the POVInclude plugin for Moray
(http://www://www.kolban.com/3d/POVInclude.htm with the option "inclusion of
POV-Ray to Moray coordinate system transforms." checked but had no luck.
Any assistance would be welcomed. Thank you.


Post a reply to this message

From: Thomas de Groot
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 28 Jan 2007 08:06:51
Message: <45bc599b$1@news.povray.org>
"JReyes" <nomail@nomail> schreef in bericht 
news:web.45bc43458f47c8365604e8e60@news.povray.org...
>I want to use a scene create with CityGen v1.5
> (http://members.tripod.com/~dcieslak/util.html) in moray. I find I can
> easily bring in the scene and have it rendered. But of course the city is 
> Y
> up and moray is z up. what is the best way to rotate the city? I tried 
> using
> the POVInclude plugin for Moray
> (http://www://www.kolban.com/3d/POVInclude.htm with the option "inclusion of
> POV-Ray to Moray coordinate system transforms." checked but had no luck.
> Any assistance would be welcomed. Thank you.
>
>

Basically, the transform from POV-Ray to Moray (or from Moray to POV-Ray) is 
very simple. The only thing you have to do is to add two commands to the (I 
suppose) union englobing your city:

scale <1, 1, -1>
rotate <90, 0, 0>

That's all.

When using the POVInclude plugin, the advanced option you mention is only 
used for the placeholder box visible in Moray and containing the POV-Ray 
object. There is a pdf tutorial available for this plugin. If you are 
interested, I can post it in moray.binaries.

Thomas


Post a reply to this message

From: JReyes
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 29 Jan 2007 05:15:00
Message: <web.45bd81e78031825d3fcc65ba0@news.povray.org>
> Basically, the transform from POV-Ray to Moray (or from Moray to POV-Ray) is
> very simple. The only thing you have to do is to add two commands to the (I
> suppose) union englobing your city:
>
> scale <1, 1, -1>
> rotate <90, 0, 0>
>
> That's all.
>
> When using the POVInclude plugin, the advanced option you mention is only
> used for the placeholder box visible in Moray and containing the POV-Ray
> object. There is a pdf tutorial available for this plugin. If you are
> interested, I can post it in moray.binaries.
>
> Thomas

I'm not great with povray script writing and I think that is where my
problem is. I don't know how to declare the whole city as one object and
rotate it. I'm going to download files from povray.text.tutorials and see
if I find one with an example that I can copy-paste and edit to do this.

thank you for such a quick response!


Post a reply to this message

From: Thomas de Groot
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 29 Jan 2007 08:06:30
Message: <45bdab06@news.povray.org>
"JReyes" <nomail@nomail> schreef in bericht 
news:web.45bd81e78031825d3fcc65ba0@news.povray.org...
>
> I'm not great with povray script writing and I think that is where my
> problem is. I don't know how to declare the whole city as one object and
> rotate it. I'm going to download files from povray.text.tutorials and see
> if I find one with an example that I can copy-paste and edit to do this.
>
> thank you for such a quick response!
>
Well, to be frank, I was not aware of CityGen itself, so I downloaded it. I 
shall try it to see how the file looks like.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 29 Jan 2007 09:12:38
Message: <45bdba86$1@news.povray.org>
OK. I have rapidly tested CityGen. Here are some thoughts:

- Most important: CityGen is an OLD program (1999) and it exports to POV-Ray 
3.0. That generates some troubles, especially missing semi-colons after all 
declarations etc. but easy to overcome: run you scene a number of times in 
POV-Ray and read the error messages appearing. When your scene renders 
correctly, your SDL will be ready for Moray.
- Now, for your specific problem, you have to do the following as CityGen 
does not group the streets and buildings into separate entities:
--> Go to the line labelled "City Scene"
--> Above that line type:  union {
--> Go to the end of the file and type the following three lines:
scale <1, 1, -1>
rotate <-90, 0, 0>
}

-->if you use the Moray camera and lights, you have also to comment out the 
whole header part of the CityGen scene, i.e. the part of the script between 
"Standard Camera" and "End of Header".

Hope this helps.

Thomas


Post a reply to this message

From: JReyes
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 30 Jan 2007 15:50:01
Message: <web.45bf679f8031825d2e8e680f0@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote:
> OK. I have rapidly tested CityGen. Here are some thoughts:
>
> - Most important: CityGen is an OLD program (1999) and it exports to POV-Ray
> 3.0. That generates some troubles, especially missing semi-colons after all
> declarations etc. but easy to overcome: run you scene a number of times in
> POV-Ray and read the error messages appearing. When your scene renders
> correctly, your SDL will be ready for Moray.
> - Now, for your specific problem, you have to do the following as CityGen
> does not group the streets and buildings into separate entities:
> --> Go to the line labelled "City Scene"
> --> Above that line type:  union {
> --> Go to the end of the file and type the following three lines:
> scale <1, 1, -1>
> rotate <-90, 0, 0>
> }
>
> -->if you use the Moray camera and lights, you have also to comment out the
> whole header part of the CityGen scene, i.e. the part of the script between
> "Standard Camera" and "End of Header".
>
> Hope this helps.
>
> Thomas

Awesome! It works great. I also used union on the lights and planes created
by Citygen and rotated those.  Except for an error with the fog it also
worked. I decided using Moray's built in fog in scene settings gave better
results anyway so I deleted the fog created by Citygen. I didn't seem to
need to use "scale <1, 1, -1>" at the moment because the size seems right
on. I imagine that I'll need to modify in the future when mixing with other
objects and or effects in Moray. The "rotate <-90, 0, 0>" had to be changed
to "rotate <90, 0, 0>".
Thomas I saw your name on the GEOMORPH macro for creating isosurfaces. I
haven't learned to use it yet but hope to create a good landscape for
cities created by citygen with its functions. I do wish that citygen did
support the current povray SDL. I like the Moray city plugin but citygen's
quick street and building setup are features I really like. That's what
keeps me coming back to it. Plus there is something appealing about those
simple box buildings.
   I don't know anything about using isosurfaces but is it possible for your
macro to be made into a Moray plugin like keith HullsChris Colefax's city
plugin?

Well thanks again.


Post a reply to this message

From: Thomas de Groot
Subject: Re: How do I rotate a citygen 1.5 scene in moray?
Date: 31 Jan 2007 08:50:03
Message: <45c0583b$1@news.povray.org>
"JReyes" <nomail@nomail> schreef in bericht 
news:web.45bf679f8031825d2e8e680f0@news.povray.org...
> Awesome! It works great. I also used union on the lights and planes 
> created
> by Citygen and rotated those.  Except for an error with the fog it also
> worked. I decided using Moray's built in fog in scene settings gave better
> results anyway so I deleted the fog created by Citygen. I didn't seem to
> need to use "scale <1, 1, -1>" at the moment because the size seems right
> on. I imagine that I'll need to modify in the future when mixing with 
> other
> objects and or effects in Moray. The "rotate <-90, 0, 0>" had to be 
> changed
> to "rotate <90, 0, 0>".

Yes, fog may react strangely. Better to stick to Moray there.
Without the scale command, your city will be mirrored. That is not 
immediately obvious perhaps. Without the scale, rotation becomes positive 
too.

> Thomas I saw your name on the GEOMORPH macro for creating isosurfaces. I
> haven't learned to use it yet but hope to create a good landscape for
> cities created by citygen with its functions. I do wish that citygen did
> support the current povray SDL. I like the Moray city plugin but citygen's
> quick street and building setup are features I really like. That's what
> keeps me coming back to it. Plus there is something appealing about those
> simple box buildings.

Ah, yes, my Geomorph macro!! That grew somewhat out of hand :-)
Very useful, but start simple. Also, be aware that isosurfaces take much 
more time to render than height_fields.
If you want to dive into isosurfaces, be sure to visit Mike Williams' site: 
http://www.econym.demon.co.uk/isotut/ before using Geomorph. It will give 
you a feeling of the thing. There was another tutorial by Samuel Benge, but 
that site seems to have disappeared...

>   I don't know anything about using isosurfaces but is it possible for 
> your
> macro to be made into a Moray plugin like keith HullsChris Colefax's city
> plugin?

It probably is possible, but way beyond my skills I am afraid... The best 
way to do that would be through FullMoon 2, I think. But then, still, you 
would have a problem showing the isosurface in Moray, except for a 
placeholder.

>
> Well thanks again.

You are welcome :-)


Thomas


Post a reply to this message

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