POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature Request: Multiple scenes in one POV-file Server Time
25 Apr 2024 15:23:45 EDT (-0400)
  Feature Request: Multiple scenes in one POV-file (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Zeger Knaepen
Subject: Feature Request: Multiple scenes in one POV-file
Date: 27 Mar 2008 06:18:35
Message: <47eb828b$1@news.povray.org>
I believe I already mentioned it a while ago on povray.general, but this 
might be a better place.  What I would like to see in POV-Ray 4 is the 
possibility to define more than one scene in one POV-file with the 
possibility to "layer" your scenes, meaning: use one scene as background for 
the second, and so on.  This way, the problem mentioned in "Lighting problem 
at extreme distances" (povray.general) could be solved by using one scene 
for the astronomical objects, planets and sun, and another for the smaller 
objects, like spaceships, with the first scene as background for the second.
It would also be a lot easier this way to add a HUD to your image: just 
create a HUD-scene (very easy to do with a orthographic camera) and use the 
original scene as background.  Or lensflares.

It should also be possible to use one scene as image_map in another scene, 
but now I think of it, maybe that's *all* you should be able to do. Layering 
of scene could then be done this way:

---BEGIN CODE---

//declare common objects and macros
#declare Common1=...
#macro CommonMacro(...) ... #end
//declare individual scenes
#declare Scene1=scene {
    camera {...}
    light_source {...}
    object {Common1}
    sphere {...}
    ...
}
#declare MapView=scene {
    Scene1
    camera {
        orthographic
        location y
        up z*10
        right x*10
    }
}
#declare HUD=scene {
    camera {
        orthographic
        ...
    }
    union {
        ...
            pigment { //add a map to the HUD
                image_map {scene MapView}
            }
    }
}
camera {
    orthographic
    location -z*10
    right x
    up y
    look_at 0
    translate .5
}
plane {
    z,0
    pigment {image_map {scene Scene1}}
    finish {ambient 1 diffuse 0}
}
plane {
    z,-1
    pigment {image_map {scene HUD}}
    finish {ambient 1 diffuse 0}
}

---END CODE---

That way, nothing would change for those who don't want to use layered 
scenes.

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: John VanSickle
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 28 Mar 2008 10:22:30
Message: <47ed0d36@news.povray.org>
Zeger Knaepen wrote:
> I believe I already mentioned it a while ago on povray.general, but this 
> might be a better place.  What I would like to see in POV-Ray 4 is the 
> possibility to define more than one scene in one POV-file with the 
> possibility to "layer" your scenes, meaning: use one scene as background for 
> the second, and so on.  This way, the problem mentioned in "Lighting problem 
> at extreme distances" (povray.general) could be solved by using one scene 
> for the astronomical objects, planets and sun, and another for the smaller 
> objects, like spaceships, with the first scene as background for the second.
> It would also be a lot easier this way to add a HUD to your image: just 
> create a HUD-scene (very easy to do with a orthographic camera) and use the 
> original scene as background.  Or lensflares.

I would simply make the distance limits a user-alterable value instead 
of something written directly in the code.  The other items can be done 
by modeling the scene to produce the desired results, often without 
terrible difficulty.  I make most of my subtitles by simply placing text 
in the right way, relative to the camera (although I could also do it 
with a post-processing render).

Regards,
John


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 28 Mar 2008 11:07:49
Message: <47ed17d5$1@news.povray.org>

> I would simply make the distance limits a user-alterable value instead 
> of something written directly in the code.

There aren't any hard-coded distance limits. The limits are using 64-bit 
floating-point maths. Using arbitrary precision floating-point means a 
lot of code changes and making things slower by an order of magnitude.


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 28 Mar 2008 19:37:04
Message: <47ed8f30$1@news.povray.org>
"John VanSickle" <evi### [at] hotmailcom> wrote in message 
news:47ed0d36@news.povray.org...
> Zeger Knaepen wrote:
>> I believe I already mentioned it a while ago on povray.general, but this 
>> might be a better place.  What I would like to see in POV-Ray 4 is the 
>> possibility to define more than one scene in one POV-file with the 
>> possibility to "layer" your scenes, meaning: use one scene as background for 
>> the second, and so on.  This way, the problem mentioned in "Lighting problem 
>> at extreme distances" (povray.general) could be solved by using one scene for 
>> the astronomical objects, planets and sun, and another for the smaller 
>> objects, like spaceships, with the first scene as background for the second.
>> It would also be a lot easier this way to add a HUD to your image: just 
>> create a HUD-scene (very easy to do with a orthographic camera) and use the 
>> original scene as background.  Or lensflares.
>
> I would simply make the distance limits a user-alterable value instead of 
> something written directly in the code.  The other items can be done by 
> modeling the scene to produce the desired results, often without terrible 
> difficulty.  I make most of my subtitles by simply placing text in the right 
> way, relative to the camera (although I could also do it with a 
> post-processing render).

That's how you would do things now, but I believe being able to define more than 
one scene is a much cleaner, easier and much more versatile solution.

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Nekar Xenos
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 1 Apr 2008 03:22:43
Message: <47f1f0d3@news.povray.org>
"Zeger Knaepen" <zeg### [at] povplacecom> wrote in message 
news:47eb828b$1@news.povray.org...
>I believe I already mentioned it a while ago on povray.general, but this 
>might be a better place.  What I would like to see in POV-Ray 4 is the 
>possibility to define more than one scene in one POV-file with the 
>possibility to "layer" your scenes, meaning: use one scene as background 
>for the second, and so on.  This way, the problem mentioned in "Lighting 
>problem at extreme distances" (povray.general) could be solved by using one 
>scene for the astronomical objects, planets and sun, and another for the 
>smaller objects, like spaceships, with the first scene as background for 
>the second.
> It would also be a lot easier this way to add a HUD to your image: just 
> create a HUD-scene (very easy to do with a orthographic camera) and use 
> the original scene as background.  Or lensflares.
>
> It should also be possible to use one scene as image_map in another scene, 
> but now I think of it, maybe that's *all* you should be able to do. 
> Layering of scene could then be done this way:
>

I second that.  I have been thinking along the same lines myself.


-- 
-Nekar Xenos-


Post a reply to this message

From: Allen
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 22 May 2008 13:45:00
Message: <web.4835b0ce710383a8cd46d2150@news.povray.org>
"Zeger Knaepen" <zeg### [at] povplacecom> wrote
> It should also be possible to use one scene as image_map in another scene,
> but now I think of it, maybe that's *all* you should be able to do.
> Layering of scene could then be done this way:


MegaPOV has something like that already, a special 'camera_view' pigment type
that can use a camera for a pigment.  I'd love to see camera_view in the
official POV-Ray.  Without it you have to render the scene twice, once for to
create the image to put on the pigment from one camera location, then again to
render the scene that contains the first.


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 22 May 2008 19:05:39
Message: <4835fc43$1@news.povray.org>
"Allen" <bri### [at] yahoocom> wrote in message 
news:web.4835b0ce710383a8cd46d2150@news.povray.org...
> "Zeger Knaepen" <zeg### [at] povplacecom> wrote
>> It should also be possible to use one scene as image_map in another 
>> scene,
>> but now I think of it, maybe that's *all* you should be able to do.
>> Layering of scene could then be done this way:
>
>
> MegaPOV has something like that already, a special 'camera_view' pigment 
> type
> that can use a camera for a pigment.  I'd love to see camera_view in the
> official POV-Ray.  Without it you have to render the scene twice, once for 
> to
> create the image to put on the pigment from one camera location, then 
> again to
> render the scene that contains the first.

the camera_view pigment is not nearly as versatile as being able to define 
multiple scenes in one file, with which the camera_view pigment can be 
emulated.

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Woody
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 12 Dec 2013 13:15:00
Message: <web.52a9fcea710383a882dd1ac40@news.povray.org>
Does this feature even have to wait until POV 4?

I would think it could be something that could be done in POV3.8?

The way I understand this it is akin to a green screen, in which an image is
place d over the original area (green) being replaced.

From what I understand of the way POV works is that for each pixel (let's say
800x600 for easy arithemetics sake) the color of the pixel is obtained, by
calculating the collision, reflection, etc, the path of light passing through
that pixel takes.

Couldn't someone just put into POV some logic that says if the ray "hits" an
object with the scene mapped texture, it "switches" to the mapped scene?

I know that MegaPOV has this feature but it seems to be limited to multiple
viewpoints of a single scene, rather than completely different scenes. The
difference being that the MegaPOV results in the same sky sphere for each
version, where as a scene map could potentially result in different sky spheres.

-Jeff


Post a reply to this message

From: clipka
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 13 Dec 2013 20:11:07
Message: <52abb02b$1@news.povray.org>
Am 12.12.2013 19:14, schrieb Woody:

> I know that MegaPOV has this feature but it seems to be limited to multiple
> viewpoints of a single scene, rather than completely different scenes. The
> difference being that the MegaPOV results in the same sky sphere for each
> version, where as a scene map could potentially result in different sky spheres.

Such a feature is actually on my personal to-do list, meaning that it 
will probably wind up in either POV-Ray proper or UberPOV sooner or - 
more likely - later.

The basic problem is that there's still too much legacy C-style code in 
POV-Ray, some of which was designed to render /the/ scene, not /a/ scene.

I'm slowly weeding out such code these days (C-style code in general, 
that is), but it's still a long way to go until I can tackle the 
scene-level stuff.


Post a reply to this message

From: Woody
Subject: Re: Feature Request: Multiple scenes in one POV-file
Date: 18 Dec 2013 20:15:01
Message: <web.52b2482d710383a882dd1ac40@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 12.12.2013 19:14, schrieb Woody:
>
> > I know that MegaPOV has this feature but it seems to be limited to multiple
> > viewpoints of a single scene, rather than completely different scenes. The
> > difference being that the MegaPOV results in the same sky sphere for each
> > version, where as a scene map could potentially result in different sky spheres.
>
> Such a feature is actually on my personal to-do list, meaning that it
> will probably wind up in either POV-Ray proper or UberPOV sooner or -
> more likely - later.
>
> The basic problem is that there's still too much legacy C-style code in
> POV-Ray, some of which was designed to render /the/ scene, not /a/ scene.
>
> I'm slowly weeding out such code these days (C-style code in general,
> that is), but it's still a long way to go until I can tackle the
> scene-level stuff.

I actually saw the post about uber pov a week ago. I haven't had a chance to
take a look at it yet. Is it being done in ANSI C (I think the only other option
being Objective C, though I admit I haven't done much development on the Mac)?


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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