POV-Ray : Newsgroups : povray.general : large city models in povray Server Time
25 Nov 2024 15:49:04 EST (-0500)
  large city models in povray (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Thomas de Groot
Subject: Re: large city models in povray
Date: 19 Nov 2015 03:47:28
Message: <564d8ca0@news.povray.org>
On 18-11-2015 15:19, christian wrote:
> Can anybody give me a tip, how i can solve this problem? Is it possible to say
> povray, that it should just parse the section in the cameraview?
>

The quick answer is yes. ;-)

There is indeed a possibility to only render what is shown by the 
camera. For this you need to test if a given object is visible within 
the camera view field. Gilles Tran developed a macro which allows you to 
do this.

Play with the attached scene file. The objects are tested against a 
'screen'. I purposefully left this screen smaller than the camera view 
so that you can play and learn to use it.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'utf-8' (5 KB)

From: Stephen
Subject: Re: large city models in povray
Date: 19 Nov 2015 04:26:35
Message: <564d95cb$1@news.povray.org>
On 11/19/2015 8:47 AM, Thomas de Groot wrote:
>
> The quick answer is yes. ;-)
>

:-)

> There is indeed a possibility to only render what is shown by the
> camera. For this you need to test if a given object is visible within
> the camera view field. Gilles Tran developed a macro which allows you to
> do this.

I did not know that. Thanks Thomas.

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: large city models in povray
Date: 19 Nov 2015 07:16:14
Message: <564dbd8e$1@news.povray.org>
On 19-11-2015 10:26, Stephen wrote:
> On 11/19/2015 8:47 AM, Thomas de Groot wrote:
>>
>> The quick answer is yes. ;-)
>>
>
> :-)
>
>> There is indeed a possibility to only render what is shown by the
>> camera. For this you need to test if a given object is visible within
>> the camera view field. Gilles Tran developed a macro which allows you to
>> do this.
>
> I did not know that. Thanks Thomas.
>
A smart little trick, isn't it?

It is difficult to keep track of all the little utilities developed here 
over the years. I am afraid many and more are lost after their initial 
release :-(

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: large city models in povray
Date: 19 Nov 2015 09:44:33
Message: <564de051$1@news.povray.org>
On 11/19/2015 12:16 PM, Thomas de Groot wrote:
> On 19-11-2015 10:26, Stephen wrote:
>> On 11/19/2015 8:47 AM, Thomas de Groot wrote:
>>>
>>> The quick answer is yes. ;-)
>>>
>>
>> :-)
>>
>>> There is indeed a possibility to only render what is shown by the
>>> camera. For this you need to test if a given object is visible within
>>> the camera view field. Gilles Tran developed a macro which allows you to
>>> do this.
>>
>> I did not know that. Thanks Thomas.
>>
> A smart little trick, isn't it?
>

Very. :-)

> It is difficult to keep track of all the little utilities developed here
> over the years. I am afraid many and more are lost after their initial
> release :-(
>

It is, it is.

-- 

Regards
     Stephen


Post a reply to this message

From: Nekar Xenos
Subject: Re: large city models in povray
Date: 19 Nov 2015 12:39:46
Message: <op.x8czcbwfufxv4h@xena>
On Thu, 19 Nov 2015 16:44:27 +0200, Stephen <mca### [at] aolcom> wrote:

> On 11/19/2015 12:16 PM, Thomas de Groot wrote:
>> On 19-11-2015 10:26, Stephen wrote:
>>> On 11/19/2015 8:47 AM, Thomas de Groot wrote:
>>>>
>>>> The quick answer is yes. ;-)
>>>>
>>>
>>> :-)
>>>
>>>> There is indeed a possibility to only render what is shown by the
>>>> camera. For this you need to test if a given object is visible within
>>>> the camera view field. Gilles Tran developed a macro which allows you  
>>>> to
>>>> do this.
>>>
>>> I did not know that. Thanks Thomas.
>>>
>> A smart little trick, isn't it?
>>
>
> Very. :-)
>
>> It is difficult to keep track of all the little utilities developed here
>> over the years. I am afraid many and more are lost after their initial
>> release :-(
>>
>
> It is, it is.
>

IIRC  scenes\advanced\blocks also does something similar.

-- 
-Nekar Xenos-


Post a reply to this message

From: Thomas de Groot
Subject: Re: large city models in povray
Date: 20 Nov 2015 02:53:14
Message: <564ed16a$1@news.povray.org>
On 19-11-2015 18:39, Nekar Xenos wrote:
> On Thu, 19 Nov 2015 16:44:27 +0200, Stephen <mca### [at] aolcom> wrote:
>
>> On 11/19/2015 12:16 PM, Thomas de Groot wrote:
>>> On 19-11-2015 10:26, Stephen wrote:
>>>> On 11/19/2015 8:47 AM, Thomas de Groot wrote:
>>>>>
>>>>> The quick answer is yes. ;-)
>>>>>
>>>>
>>>> :-)
>>>>
>>>>> There is indeed a possibility to only render what is shown by the
>>>>> camera. For this you need to test if a given object is visible within
>>>>> the camera view field. Gilles Tran developed a macro which allows
>>>>> you to
>>>>> do this.
>>>>
>>>> I did not know that. Thanks Thomas.
>>>>
>>> A smart little trick, isn't it?
>>>
>>
>> Very. :-)
>>
>>> It is difficult to keep track of all the little utilities developed here
>>> over the years. I am afraid many and more are lost after their initial
>>> release :-(
>>>
>>
>> It is, it is.
>>
>
> IIRC  scenes\advanced\blocks also does something similar.
>

I think you are right.

-- 
Thomas


Post a reply to this message

From: christian
Subject: Re: large city models in povray
Date: 24 Nov 2015 05:35:01
Message: <web.56543c12c20c243dc45346000@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 18-11-2015 15:19, christian wrote:
> > Can anybody give me a tip, how i can solve this problem? Is it possible to say
> > povray, that it should just parse the section in the cameraview?
> >
>
> The quick answer is yes. ;-)
>
> There is indeed a possibility to only render what is shown by the
> camera. For this you need to test if a given object is visible within
> the camera view field. Gilles Tran developed a macro which allows you to
> do this.
>
> Play with the attached scene file. The objects are tested against a
> 'screen'. I purposefully left this screen smaller than the camera view
> so that you can play and learn to use it.
>
> --
> Thomas


Thank you for all your answers. I have now used this macro. I needed some time,
but now it works very well and fast. :-)

I have another question in this context. Is there a smart way to generate normal
maps and depth maps in POV-Ray. Maybe I can use fog for the depth map?

I'm sure you can help me also in this point. Thank you. :-)

Regards Christian


Post a reply to this message

From: clipka
Subject: Re: large city models in povray
Date: 24 Nov 2015 07:14:10
Message: <56545492$1@news.povray.org>
Am 24.11.2015 um 11:29 schrieb christian:

> I have another question in this context. Is there a smart way to generate normal
> maps and depth maps in POV-Ray. Maybe I can use fog for the depth map?

I'd use an emission-only gradient pigment for depth maps.

For normal maps, you could use either the slope or aoi pattern as the
basis for one emission-only pigment per colour channel / axis, and mix
them via an average pattern. Alternatively, you could try using a plain
white pigment, and one parallel shadowless light source per colour
channel / axis.


Post a reply to this message

From: christian
Subject: Re: large city models in povray
Date: 8 Dec 2015 11:30:01
Message: <web.566704a8c20c243dc45346000@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.11.2015 um 11:29 schrieb christian:
>
> > I have another question in this context. Is there a smart way to generate normal
> > maps and depth maps in POV-Ray. Maybe I can use fog for the depth map?
>
> I'd use an emission-only gradient pigment for depth maps.
>
> For normal maps, you could use either the slope or aoi pattern as the
> basis for one emission-only pigment per colour channel / axis, and mix
> them via an average pattern. Alternatively, you could try using a plain
> white pigment, and one parallel shadowless light source per colour
> channel / axis.


Hmmm, at the moment i don't realy unterstand how this work. Maybe you can give
me an example?


Post a reply to this message

From: Alain
Subject: Re: large city models in povray
Date: 8 Dec 2015 14:39:27
Message: <566731ef$1@news.povray.org>

> clipka <ano### [at] anonymousorg> wrote:
>> Am 24.11.2015 um 11:29 schrieb christian:
>>
>>> I have another question in this context. Is there a smart way to generate normal
>>> maps and depth maps in POV-Ray. Maybe I can use fog for the depth map?
>>
>> I'd use an emission-only gradient pigment for depth maps.
>>
>> For normal maps, you could use either the slope or aoi pattern as the
>> basis for one emission-only pigment per colour channel / axis, and mix
>> them via an average pattern. Alternatively, you could try using a plain
>> white pigment, and one parallel shadowless light source per colour
>> channel / axis.
>
>
> Hmmm, at the moment i don't realy unterstand how this work. Maybe you can give
> me an example?
>
>

For the depth map:


  pigment{gradient z color_map{[0 rgb 0][1 rgb 1] scale 
Farthest_object_distance - Nearest_object_distance}
  finish{emission 1 diffuse 0}
}
camera{...}

Remove all lights as they are not needed. Remove all textures from all 
objects to only use the gradient.

For the normals, replace gradient z by aoi:

  pigment{aoi color_map{[0 rgb 0][1 rgb 0.5]}
finish{emission 1 diffuse 0}
}

Surfaces pointing directly toward the camera will use the zero value, 
those pointing perpendicularly, or away, relative to the camera will use 
the 0.5 entry.

Using 3 lights:
With all objects been plain white:
light_source{1000*x rgb<1,0,0> parallel point_at 0 shadowless}
//a red shadowless light straight to the right
light_source{1000*y rgb<0,1,0> parallel point_at 0 shadowless}
// a green shadowless light straight up
light_source{1000*z rgb<0,0,1> parallel point_at 0 shadowless}
//finaly, a blue one to the back
Place the camera along the <1,1,-1>*Distance or you can use 
double_illuminate for all objects in the scene.




Alain


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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