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:21:03 EDT (-0400)
  Re: Is it possible to render only a sub-set of a scene?  
From: John Ratcliff
Date: 26 May 2011 13:45:01
Message: <web.4dde9173e70c3bc790ae49fd0@news.povray.org>
Thanks for the feedback.  The thing is, what I want do do is actually super
trivial from the standpoint of C++.  That may be the best way to approach the
problem.

What I'm trying to do is compute a lightmap projection for certain triangles in
the scene.  The raytracer needs to consider the entire scene but not *render*
the entire scene; just the sub-section.

I'll take a crack at doing this at the C++ level.  Maybe I'll even add a script
binding so other people can easily do the same kind of culling.

Thanks,

John


Alain <aze### [at] qwertyorg> wrote:

> > 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.