POV-Ray : Newsgroups : povray.general : Camera angles problem Server Time
29 Jul 2024 06:23:18 EDT (-0400)
  Camera angles problem (Message 22 to 31 of 31)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Camera angles problem
Date: 19 Aug 2013 15:05:00
Message: <web.52126b4d572d40e673fc9ebb0@news.povray.org>
Speaking of macros, and this whole camera business...

In order to clear this up for myself, and perhaps once and for all (maybe)
putting this baby to bed, I'm working on a pov file and studying screen.inc to
perhaps get a good, thorough nooby tool developed to SHOW what is going on.

This of course leads me to a few problems, and questions that may be
overcomplicating things and in the final result, superfluous.

First, screen.inc would not work until I added an extra parameter (1) to the
Set_Camera input from screen.pov, since it needs 4 parameters, and it was only
supplying 3 - the "ortho" parameter wasn't being passed to the macro.

Second, apparently there is meant to be text diplayed on the "screen" -
#declare MyTextObject =
text {
   ttf "crystal.ttf", "target: enemy base", 0.01, <0,0>
   scale 0.08
   pigment {color <1.0,0.5,0.2>}
   finish {ambient 1 diffuse 0}
}

That doesn't show up, and I'm currently investigating why.

Third, my current goal is to write up something that graphically demonstrates
what's going on internally with the render engine so that the User can follow
along with data output to the "screen" showing the values of the relevant
variables.  Sort of like a dashboard on a car.  Fire up an animation.ini file
that moves the camera around, changes key variables that affect the camera and
view, and those variables and the result are dynamically displayed on the
"screen" as the animation progresses.  Display the active directives being used
to alter the screen position or other things happening in the render(s).

Fourth, incorporate some standard scene reference objects - x,y,z axes,
directions of rotation, "pointers" and guides from light sources to show things
like point-at, spotlight fades, etc.

Incorporates some switches to turn those guides on and off so that the user can
either see them or not.  Turn on for scene development, turn off for final
render, or after they grasp what is going on.

(I've thought about having a "dual render" - where the scene is rendered without
any interfering stuff, and then a second render is automatically called from
within the SDL at the end of the first render - is this possible?)

In addition to rendering with guides from the viewpoint of the camera, I thought
it would be instructive and helpful to do a "meta-render" where the camera and
scene are actually shown from some other view.  A side or diagonal view with a
camera point, with 4 rays extending outwards to the corners of the visible
scene, etc.

While it may be a lot of work, I think it will pay big dividends in the end,
since the newsgroups will be freed from these repetitive questions about basic
fundamentals of how POV-Ray operates, provide a large number of working examples
in the pov code, will make POV-Ray more accessible to people trying to get
started using it, and the final animation would itself make a great advertising
tool to showcase what POV-Ray is capable of doing - because it does what other
things CAN'T.

If this project interests you, I'd appreciate any advice and suggestions as to
what it should include, how it should be implemented, snippets of helpful or
illustrative code or full working examples - perhaps as individual pov or inc
files to be added in, ... basically anything at all that might assist me in
making efficient progress and producing a worthwhile result.

Anyone want to help me beat a few dead horses?
It's National Sado-Necro-Equine Month.


Post a reply to this message

From: Nekar Xenos
Subject: Re: Camera angles problem
Date: 20 Aug 2013 14:34:14
Message: <op.w14oi70hufxv4h@xena>
•On Mon, 19 Aug 2013 21:00:29 +0200, Bald Eagle  

<cre### [at] netscapenet> wrote:

> Speaking of macros, and this whole camera business...
>
> In order to clear this up for myself, and perhaps once and for all  

> (maybe)
> putting this baby to bed, I'm working on a pov file and studying  

> screen.inc to
> perhaps get a good, thorough nooby tool developed to SHOW what is goin
g  

> on.
>
> This of course leads me to a few problems, and questions that may be
> overcomplicating things and in the final result, superfluous.
>
> First, screen.inc would not work until I added an extra parameter (1) 
to  

> the
> Set_Camera input from screen.pov, since it needs 4 parameters, and it 
 

> was only
> supplying 3 - the "ortho" parameter wasn't being passed to the macro.
>
> Second, apparently there is meant to be text diplayed on the "screen" 
-
> #declare MyTextObject =
> text {
>    ttf "crystal.ttf", "target: enemy base", 0.01, <0,0>
>    scale 0.08
>    pigment {color <1.0,0.5,0.2>}
>    finish {ambient 1 diffuse 0}
> }
>
> That doesn't show up, and I'm currently investigating why.
>
> Third, my current goal is to write up something that graphically  

> demonstrates
> what's going on internally with the render engine so that the User can
  

> follow
> along with data output to the "screen" showing the values of the relev
ant
> variables.  Sort of like a dashboard on a car.  Fire up an animation.i
ni  

> file
> that moves the camera around, changes key variables that affect the  

> camera and
> view, and those variables and the result are dynamically displayed on 
the
> "screen" as the animation progresses.  Display the active directives  

> being used
> to alter the screen position or other things happening in the render(s
).
>
> Fourth, incorporate some standard scene reference objects - x,y,z axes
,
> directions of rotation, "pointers" and guides from light sources to sh
ow  

> things
> like point-at, spotlight fades, etc.
>
> Incorporates some switches to turn those guides on and off so that the
  

> user can
> either see them or not.  Turn on for scene development, turn off for  

> final
> render, or after they grasp what is going on.
>
> (I've thought about having a "dual render" - where the scene is render
ed  

> without
> any interfering stuff, and then a second render is automatically calle
d  

> from
> within the SDL at the end of the first render - is this possible?)
>
> In addition to rendering with guides from the viewpoint of the camera,
 I  

> thought
> it would be instructive and helpful to do a "meta-render" where the  

> camera and
> scene are actually shown from some other view.  A side or diagonal vie
w  

> with a
> camera point, with 4 rays extending outwards to the corners of the  

> visible
> scene, etc.
>
> While it may be a lot of work, I think it will pay big dividends in th
e  

> end,
> since the newsgroups will be freed from these repetitive questions abo
ut  

> basic
> fundamentals of how POV-Ray operates, provide a large number of workin
g  

> examples
> in the pov code, will make POV-Ray more accessible to people trying to
  

> get
> started using it, and the final animation would itself make a great  

> advertising
> tool to showcase what POV-Ray is capable of doing - because it does wh
at  

> other
> things CAN'T.
>
> If this project interests you, I'd appreciate any advice and suggestio
ns  

> as to
> what it should include, how it should be implemented, snippets of  

> helpful or
> illustrative code or full working examples - perhaps as individual pov
  

> or inc
> files to be added in, ... basically anything at all that might assist 
me  

> in
> making efficient progress and producing a worthwhile result.
>
> Anyone want to help me beat a few dead horses?
> It's National Sado-Necro-Equine Month.
>

I'm going to give screen.inc a look. Maybe it can solve my problem, thou
gh  

I doubt it. I need to have an object defined according to the camera  

position and orientation for use with a macro.

So basically what I would like to see is the following:
A) Rotation angle of the camera that can be used as a rotation value for
  

an object taking into account the up vector as well. For instance if you
  

wanted to model a specific real-life camera and test it.
B) A look_at(Pos, LookAt, Up) transform macro for objects that rotates a
n  

object exactly like a camera.


-- 

-Nekar Xenos-


Post a reply to this message

From: Bald Eagle
Subject: Re: Camera angles problem
Date: 20 Aug 2013 15:36:37
Message: <5213c545$1@news.povray.org>
> So basically what I would like to see is the following:
> A) Rotation angle of the camera that can be used as a rotation value for
> an object taking into account the up vector as well. For instance if you
> wanted to model a specific real-life camera and test it.

I must admit, I don't really know what you're trying to accomplish.
Are you just trying to make sure that the camera is always looking at a 
certain object the same way after you move the camera?

> B) A look_at(Pos, LookAt, Up) transform macro for objects that rotates
> an object exactly like a camera.

I think that having a way to position objects absolutely, rather than 
relative to the last position would be helpful in certain instances.

Look_at ... what?  The camera?  There would need to be a way to define 
what part of the object was the "front" or however you're thinking about it.

The UP part - do you want to just make sure it's the same vector 
direction as the camera UP?  You should be able to do this by working 
from the line of sight from the camera to the center of view.
Use that axis as the center of your object's rotational movements.


Post a reply to this message

From: Bald Eagle
Subject: Re: Camera angles problem
Date: 20 Aug 2013 15:45:04
Message: <5213c740$1@news.povray.org>
> Second, apparently there is meant to be text displayed on the "screen" -
> #declare MyTextObject =
> text {
>     ttf "crystal.ttf", "target: enemy base", 0.01, <0,0>
>     scale 0.08
>     pigment {color <1.0,0.5,0.2>}
>     finish {ambient 1 diffuse 0}
> }
>
> That doesn't show up, and I'm currently investigating why.

Alright, I changed the font to arial, and that made the text visible, 
but it was being interfered with by the fog or something.

I've now stripped everything else out the scene, but I'm missing 
characters now.

"Text size 0.08"   Appears as "T         0 08"

commenting out the global_settings {charset utf8} had no effect.
Changing the font to Times only shows a capital T

Changing it to arial, all caps gives me "TEXT S ZE 0 08"

I am truly bewildered.


Post a reply to this message

From: Nekar Xenos
Subject: Re: Camera angles problem
Date: 20 Aug 2013 16:01:16
Message: <op.w14sj9raufxv4h@xena>
On Tue, 20 Aug 2013 21:36:37 +0200, Bald Eagle  
<cre### [at] netscapenet> wrote:

>
>> So basically what I would like to see is the following:
>> A) Rotation angle of the camera that can be used as a rotation value for
>> an object taking into account the up vector as well. For instance if you
>> wanted to model a specific real-life camera and test it.
>
> I must admit, I don't really know what you're trying to accomplish.
> Are you just trying to make sure that the camera is always looking at a  
> certain object the same way after you move the camera?

I want an object to be able to act just like a camera so that if you  
rotate an object shaped like an arrow for instance with the camera  
rotation and translate it in the same position as the camera, the arrow  
should point at the camera's look_at position.

>> B) A look_at(Pos, LookAt, Up) transform macro for objects that rotates
>> an object exactly like a camera.
>
> I think that having a way to position objects absolutely, rather than  
> relative to the last position would be helpful in certain instances.
>
> Look_at ... what?  The camera?  There would need to be a way to define  
> what part of the object was the "front" or however you're thinking about  
> it.
>
Look_at a specified point "LookAt".
Revised:
look_at(Pos, LookAt, Up, Front)
Front would be a vector defining what the front of the object is.

> The UP part - do you want to just make sure it's the same vector  
> direction as the camera UP?  You should be able to do this by working  
> from the line of sight from the camera to the center of view.
> Use that axis as the center of your object's rotational movements.
>
If up is y then simply using only the x and y rotations without the z  
rotation seems to work. But probably not in all cases.

Thanks for mentioning screen.inc. I had forgotten about it. It might just  
help me with my scene.

-- 
-Nekar Xenos-


Post a reply to this message

From: Alain
Subject: Re: Camera angles problem
Date: 20 Aug 2013 16:09:28
Message: <5213ccf8@news.povray.org>


> (I've thought about having a "dual render" - where the scene is rendered without
> any interfering stuff, and then a second render is automatically called from
> within the SDL at the end of the first render - is this possible?)
>

Not possible strictly from the SDL itself.

What you need for that is to use an ini file that will render the 
original scene, then, set some control variable(s) to render the second 
scene.
With that, the two renders can have different resolutions and aa 
settings if it's not rendered as an animation but as two separate 
images. You'll need to explicitely give an image name for at least one 
of the renders.


Alain


Post a reply to this message

From: Le Forgeron
Subject: Re: Camera angles problem
Date: 20 Aug 2013 16:27:09
Message: <5213d11d$1@news.povray.org>
Le 20/08/2013 22:09, Alain nous fit lire :
> Le 13-08-19 15:00, Bald Eagle a écrit :
> 
>> (I've thought about having a "dual render" - where the scene is
>> rendered without
>> any interfering stuff, and then a second render is automatically
>> called from
>> within the SDL at the end of the first render - is this possible?)
>>
> 

That sound a bit like the portal pattern. (or viewport ? I do not
remember exactly, it was some experimental stuff a long time ago)

What I do not get (yet ?), what is in the file generated by the render ?


> Not possible strictly from the SDL itself.
> 
> What you need for that is to use an ini file that will render the
> original scene, then, set some control variable(s) to render the second
> scene.
> With that, the two renders can have different resolutions and aa
> settings if it's not rendered as an animation but as two separate
> images. You'll need to explicitely give an image name for at least one
> of the renders.
> 
> 
> Alain

With 3.7, you should search for clockless animation (+kla, with multiple
cameras definition, and so far you need also realtime raytracing with
+rtr). It disables file saving, so it might not be very useful so far.

> http://wiki.povray.org/content/Documentation:Windows_Section_1#Clockless_Animation


Post a reply to this message

From: clipka
Subject: Re: Camera angles problem
Date: 20 Aug 2013 16:54:55
Message: <5213d79f$1@news.povray.org>
Am 20.08.2013 21:45, schrieb Bald Eagle:
>
>> Second, apparently there is meant to be text displayed on the "screen" -
>> #declare MyTextObject =
>> text {
>>     ttf "crystal.ttf", "target: enemy base", 0.01, <0,0>
>>     scale 0.08
>>     pigment {color <1.0,0.5,0.2>}
>>     finish {ambient 1 diffuse 0}
>> }
>>
>> That doesn't show up, and I'm currently investigating why.
>
> Alright, I changed the font to arial, and that made the text visible,
> but it was being interfered with by the fog or something.
>
> I've now stripped everything else out the scene, but I'm missing
> characters now.
>
> "Text size 0.08"   Appears as "T         0 08"
>
> commenting out the global_settings {charset utf8} had no effect.
> Changing the font to Times only shows a capital T
>
> Changing it to arial, all caps gives me "TEXT S ZE 0 08"
>
> I am truly bewildered.

Are you using POV-Ray 3.6?

If so, you might be seeing one of two known bugs, FS#162 and FS#200, 
that have been fixed in POV-Ray 3.7 (see http://bugs.povray.org/task/162 
and http://bugs.povray.org/task/200, respectively).

If not, I'd be interested in the details.


Post a reply to this message

From: Le Forgeron
Subject: Re: Camera angles problem
Date: 20 Aug 2013 17:04:53
Message: <5213d9f5$1@news.povray.org>
Le 20/08/2013 22:27, Le_Forgeron nous fit lire :
> With 3.7, you should search for clockless animation (+kla, with multiple
> cameras definition, and so far you need also realtime raytracing with
> +rtr). It disables file saving, so it might not be very useful so far.
> 
>> >
http://wiki.povray.org/content/Documentation:Windows_Section_1#Clockless_Animation
> 

Side note for Unix: the code for +rtr is not active by default, a
special compilation is needed (in configure, CPPFLAGS=-DRTR_HACK)


Post a reply to this message

From: Alain
Subject: Re: Camera angles problem
Date: 20 Aug 2013 17:07:27
Message: <5213da8f$1@news.povray.org>
Le 13-08-20 16:27, Le_Forgeron a écrit :
> Le 20/08/2013 22:09, Alain nous fit lire :
>> Le 13-08-19 15:00, Bald Eagle a écrit :
>>
>>> (I've thought about having a "dual render" - where the scene is
>>> rendered without
>>> any interfering stuff, and then a second render is automatically
>>> called from
>>> within the SDL at the end of the first render - is this possible?)
>>>
>>
>
> That sound a bit like the portal pattern. (or viewport ? I do not
> remember exactly, it was some experimental stuff a long time ago)
>
> What I do not get (yet ?), what is in the file generated by the render ?
>
>
>> Not possible strictly from the SDL itself.
>>
>> What you need for that is to use an ini file that will render the
>> original scene, then, set some control variable(s) to render the second
>> scene.
>> With that, the two renders can have different resolutions and aa
>> settings if it's not rendered as an animation but as two separate
>> images. You'll need to explicitely give an image name for at least one
>> of the renders.
>>
>>
>> Alain
>
> With 3.7, you should search for clockless animation (+kla, with multiple
> cameras definition, and so far you need also realtime raytracing with
> +rtr). It disables file saving, so it might not be very useful so far.
>
>> http://wiki.povray.org/content/Documentation:Windows_Section_1#Clockless_Animation
>
>

The task is to have a render of the scene proper, then, another from 
possibly another point of view showing additional things: Axis, a camera 
place holder, thin cylinders showing the camera's field of view, the 
location of the various lights with cones showing spot_light 
illumination area, some informative text,...

This requires a new parsing of the scene.

It's not possible possible using clockless or real time animation as 
those require that the only change is the camera.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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