POV-Ray : Newsgroups : povray.general : Is it possible to render only a sub-set of a scene? : Re: Is it possible to render only a sub-set of a scene? Server Time
29 Jul 2024 12:15:06 EDT (-0400)
  Re: Is it possible to render only a sub-set of a scene?  
From: Alain
Date: 26 May 2011 12:56:38
Message: <4dde8646$1@news.povray.org>

> I want to use POVRay to do some pre-computed baked in radiosity solutions.
>
> What I need to be able to do is upload my entire 'game level' into POV Ray but,
> when I render, render only a sub-section of that game world.
>
> Since the 'scene' seems to be a global concept; I'm not quite sure how to have
> it render only a sub-section of the scene.
>
> Could this be done by setting a no-draw material property on the portion of the
> level I want ignored while still having the raytracer take the entire world into
> consideration for shadows, etc.?
>
> I'm brand new to POVRay so forgive the naivete.
>
> Thanks,
>
> John
>
>


Obviously, any object will mask whatever is behind it.
An object with the no_shadow attribute will not cast any shadow, it will 
not interfere with shadows cast by other objects.
One such object can be used to mask parts of the scene while leaving 
shadows cast still visible.

Something similar can be acheived with the no_reflection attribute 
relative to reflections. That object becomes invisible in reflective 
surfaces.

Then, there is the no_image that makes the affected object only visible 
through reflections and cast shadows. To use this in your case require 
to compute the distance from the camera for every object and 
conditionaly apply the attribute. Doable but tedious, especialy for an 
existing scene.

For what you want, the first two should be the "ticket" in allowing you 
to create masking screen(s) that still allow shadows and reflections.
Have those "screens" location be relative to the camera's location this way:
Early in the scene.
#declare Camera_location = Some_Place;
#declare View_distance = 1000;

Then, anywhere convenient:
#declare World_mask = sphere{0, View_distance pigment{Sky_Texture} 
hollow no_shadow no_reflection no_radiosity translate Camera_location}

"hollow" allow media to exist within. Mandatory if your scene have ANY 
media or use fog.
"no_radiosity" make the object invisible to radiosity computations. ONLY 
available with version 3.7.

camera{location 0 look_at Look_Point translate Camera_location}



Alain


Post a reply to this message

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