POV-Ray : Newsgroups : povray.binaries.images : What cameras can and cannot see - 2 attachments Server Time: 19 Feb 2019 23:27:42 GMT
  What cameras can and cannot see - 2 attachments (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Tor Olav Kristensen
Subject: What cameras can and cannot see - 2 attachments
Date: 19 Feb 2003 16:38:32
Message: <Xns9327B41C265F5torolavk@204.213.191.226>
My camera include file grows steadily. The are now more than
2000 lines of code in it, which makes more than 50 macros.

I have always found it cumbersome to position and orient
cameras so that they show the parts of my scenes that I want
to show.

To make this process easier, I first made a macro that can
show cameras as objects in scenes. Then I made macros to
move cameras and objects along, and around, the axes of
cameras. This all helped, but I thought something was missing
in this "toolbox": It was still difficult to predict what a
camera would actually see. (Or to decide what is in it's
field of view.)

Yesterday I got the idea that maybe a "camera texture" could
be useful. So then I sat down and made a macro that can
produce pigments which changes colors where the camera's
field of view is.

This macro can also show patterns of "helping lines" that
represents certain angles. These lines can be useful if
one want to estimate how much to pan, tilt or roll a camera
in order to get point in the scene into a certain position
of the camera's screen.

Below are two images that shows this macro (and some others)
in use. The big image shows a camera as an object. There are
two other objects that have a "camera pigment" from this
camera applied to them; a torus and a plane. The small image
shows the same scene viewed through this camera.

Below is the code that I used to make the big image.


Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.5;
#include "Camera11.inc"

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#declare Camera1 = DefaultCamera()
SetCameraLocation(Camera1, <-1, -5, -3>)
ChangeCameraLookAt(Camera1, <0, -5, 0>)
ChangeCameraAngle(Camera1, 60)
TiltCameraBackward(Camera1, 24)
PanCameraLeft(Camera1, 10)
RollCameraLeft(Camera1, 20)

torus {
  5, 2.05
  rotate 90*x
  translate 5*z
  CameraAnglePigment(Camera1, 10, 10, 30)
}

plane {
  -z, 0
  OrientToCamera_Trans(Camera1, no)
  TranslateForward_Trans(Camera1, 1000)
  CameraAnglePigment(Camera1, 10, 10, 30)
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#declare Camera2 = DefaultCamera()
SetCameraLocation(Camera2, <5, 1, -8>)
ChangeCameraLookAt(Camera2, <2, 0, 0>)
ChangeCameraAngle(Camera2, 110)

ShowCamera(Camera1, no, 0.02)

//PerspCamera(Camera1)
PerspCamera(Camera2)

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

light_source { <-4, 2, -3>*100 color rgb <1, 1, 1> shadowless }

background { color rgb <0.2, 0.2, 0.4> }

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


To make the small image I just changed three lines:

//ShowCamera(Camera1, no, 0.02)

//PerspCamera(Camera1)
PerspCamera(Camera2)


Post a reply to this message


Attachments:
Download 'CameraTexture04.jpg' (101 KB)
Download 'CameraTexture05.jpg' (29 KB)

Preview of image 'CameraTexture04.jpg'
CameraTexture04.jpg

Preview of image 'CameraTexture05.jpg'
CameraTexture05.jpg


 

From: paul jones
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 19 Feb 2003 16:41:43
Message: <3e53b3c7$1@news.povray.org>
You know, I don't really understand this latest study, but I think it is
really cool.

-paul


Post a reply to this message

From: Kruger
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 19 Feb 2003 18:26:45
Message: <3e53cc65$1@news.povray.org>
Very interesting idea, I ca see how this can be helpful.

Kruger


"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:Xns### [at] 204213191226...
>
> My camera include file grows steadily. The are now more than
> 2000 lines of code in it, which makes more than 50 macros.
>
> I have always found it cumbersome to position and orient
> cameras so that they show the parts of my scenes that I want
> to show.
>
> To make this process easier, I first made a macro that can
> show cameras as objects in scenes. Then I made macros to
> move cameras and objects along, and around, the axes of
> cameras. This all helped, but I thought something was missing
> in this "toolbox": It was still difficult to predict what a
> camera would actually see. (Or to decide what is in it's
> field of view.)
>
> Yesterday I got the idea that maybe a "camera texture" could
> be useful. So then I sat down and made a macro that can
> produce pigments which changes colors where the camera's
> field of view is.
>
> This macro can also show patterns of "helping lines" that
> represents certain angles. These lines can be useful if
> one want to estimate how much to pan, tilt or roll a camera
> in order to get point in the scene into a certain position
> of the camera's screen.
>
> Below are two images that shows this macro (and some others)
> in use. The big image shows a camera as an object. There are
> two other objects that have a "camera pigment" from this
> camera applied to them; a torus and a plane. The small image
> shows the same scene viewed through this camera.
>
> Below is the code that I used to make the big image.
>
>
> Tor Olav
>
>
> // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
>
> #version 3.5;
> #include "Camera11.inc"
>
> // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
>
> #declare Camera1 = DefaultCamera()
> SetCameraLocation(Camera1, <-1, -5, -3>)
> ChangeCameraLookAt(Camera1, <0, -5, 0>)
> ChangeCameraAngle(Camera1, 60)
> TiltCameraBackward(Camera1, 24)
> PanCameraLeft(Camera1, 10)
> RollCameraLeft(Camera1, 20)
>
> torus {
>   5, 2.05
>   rotate 90*x
>   translate 5*z
>   CameraAnglePigment(Camera1, 10, 10, 30)
> }
>
> plane {
>   -z, 0
>   OrientToCamera_Trans(Camera1, no)
>   TranslateForward_Trans(Camera1, 1000)
>   CameraAnglePigment(Camera1, 10, 10, 30)
> }
>
> // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
>
> #declare Camera2 = DefaultCamera()
> SetCameraLocation(Camera2, <5, 1, -8>)
> ChangeCameraLookAt(Camera2, <2, 0, 0>)
> ChangeCameraAngle(Camera2, 110)
>
> ShowCamera(Camera1, no, 0.02)
>
> //PerspCamera(Camera1)
> PerspCamera(Camera2)
>
> // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
>
> light_source { <-4, 2, -3>*100 color rgb <1, 1, 1> shadowless }
>
> background { color rgb <0.2, 0.2, 0.4> }
>
> // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
>
>
> To make the small image I just changed three lines:
>
> //ShowCamera(Camera1, no, 0.02)
>
> //PerspCamera(Camera1)
> PerspCamera(Camera2)
>
>


----------------------------------------------------------------------------
----


>
>
>


Post a reply to this message

From: obj
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 19 Feb 2003 18:30:09
Message: <web.3e53cc42935cfd3b590a39950@news.povray.org>
well Tor Olav ...
you never cease to amaze me.

thanks for thinking outside the box ...
er ... perhaps rhombidodecahedron in your case ;)

-ob-


Post a reply to this message

From: ingo
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 19 Feb 2003 21:59:50
Message: <Xns9327EA4877ED8seed7@povray.org>
in news:Xns### [at] 204213191226 Tor Olav Kristensen 
wrote:

> My camera include file grows steadily. The are now more than
> 2000 lines of code in it, which makes more than 50 macros.
> 

Publish, publish, publish!
Once you're done that is.

Ingo


Post a reply to this message

From: ABX
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 20 Feb 2003 11:07:47
Message: <vsc95v0r3865921t5ivnsl9touq2bs0m5s@4ax.com>
On 19 Feb 2003 11:38:32 -0500, Tor Olav Kristensen <tor### [at] hotmailcom>
wrote:
> Yesterday I got the idea that maybe a "camera texture" could
> be useful. So then I sat down and made a macro that can
> produce pigments which changes colors where the camera's
> field of view is.

Apart from mentioned (http://news.povray.org/povray.binaries.images/30539/) a
few posts above user_defined camera type there will be probably another addition
in MegaPOV 1.1 - pigment type called camera_view similiar to old Portal patch.
It isn't the same what you did but no doubts all together (your macros, my
patches) it will be powerful set of tools in designing scenes. Camera_view
pigment will be image_map viewed for specified camera and placed like all images
in <0,0>-<1,1>. So it means:

pigment{
  camera_view{
    // camera type
    location ...
    direction ...
    angle ...
    // and other typical camera parameters
  }
}

or

#local MyCamera = camera{ /* typical definition */ }

pigment{ camera_view{ MyCamera } }

So at the same time you can view camera with your macro and view camera_view
placed with my pigment.

No doubts we should coordinate used names becouse doubled CAMERA_VIEW name
applied to significantly different features can confuse in the future.

A lot of good work in your macros, Tor.

ABX


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 21 Feb 2003 15:41:18
Message: <Xns9329AA788C2Btorolavk@204.213.191.226>
ABX <abx### [at] abxartpl> wrote in
news:vsc95v0r3865921t5ivnsl9touq2bs0m5s@4ax.com: 

>...
> Apart from mentioned
> (http://news.povray.org/povray.binaries.images/30539/) a few posts
> above

Yes I read that thread. It is good that you have got
your patch working. Now I'm just waiting for you to
release a compiled patch ;)


> user_defined camera type there will be probably another
> addition in MegaPOV 1.1 - pigment type called camera_view similiar
> to old Portal patch.

Yesterday I skimmed through some old "portal" threads
by Chris Huff. I did not get all of it, so I'll have
to read through them more thoroughly later to see
what went on in that patch.


> It isn't the same what you did but no doubts
> all together (your macros, my patches) it will be powerful set of
> tools in designing scenes.

Yes, I hope so.


> Camera_view pigment will be image_map
> viewed for specified camera and placed like all images in
> <0,0>-<1,1>. So it means: 
> 
> pigment{
>   camera_view{
>     // camera type
>     location ...
>     direction ...
>     angle ...
>     // and other typical camera parameters
>   }
> }
> 
> or
> 
> #local MyCamera = camera{ /* typical definition */ }
> 
> pigment{ camera_view{ MyCamera } }
> 
> So at the same time you can view camera with your macro and view
> camera_view placed with my pigment.

I'm not sure if I understand this right...

Do you mean that the image a camera can "see" is made
available the same way as an image_map is ?

That would be useful !


> No doubts we should coordinate used names becouse doubled
> CAMERA_VIEW name applied to significantly different features can
> confuse in the future. 

Ok, I'll soon send you the latest verion of my
camera include file. And then I'll wait for any
comments or suggestions from you about naming etc.


> A lot of good work in your macros, Tor.

=)


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 21 Feb 2003 15:48:07
Message: <Xns9329ABA07AA55torolavk@204.213.191.226>
ingo <ing### [at] tagpovrayorg> wrote in 
news:Xns### [at] povrayorg:

> in news:Xns### [at] 204213191226 Tor Olav Kristensen 
> wrote:
> 
>> My camera include file grows steadily. The are now more than
>> 2000 lines of code in it, which makes more than 50 macros.
>> 
> 
> Publish, publish, publish!

I will Ingo, I will !


> Once you're done that is.

I seldom get done with my macro collection files.
- So I have to publish it before it is finished =(


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 21 Feb 2003 15:50:33
Message: <Xns9329AC09FE5D2torolavk@204.213.191.226>
"obj" <nomail@nomail> wrote in 
news:web.3e53cc42935cfd3b590a39950@news.povray.org:

> well Tor Olav ...
> you never cease to amaze me.

I'm happy to hear that ob.


> thanks for thinking outside the box ...
> er ... perhaps rhombidodecahedron in your case ;)

Hehe. I had to google for the rhombidodecahedron word.
It's a nice shape.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: What cameras can and cannot see - 2 attachments
Date: 21 Feb 2003 15:53:16
Message: <Xns9329AC806A565torolavk@204.213.191.226>
"Kruger" <wal### [at] yahoocom> wrote in
news:3e53cc65$1@news.povray.org: 

> Very interesting idea, I ca see how this can be helpful.

I have some more ideas about how it might be made
even more useful. But there's too little time 
and too much to try out :(


Tor Olav


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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