POV-Ray : Newsgroups : povray.general : user_defined camera Server Time
31 Oct 2024 21:30:31 EDT (-0400)
  user_defined camera (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: IGM
Subject: user_defined camera
Date: 16 May 2019 03:20:01
Message: <web.5cdd0e3b187d86e7776fc67d0@news.povray.org>
Hi!
I'm trying to use the user_defined camera, but the explanation in the reference
and the examples I find around are still obscure to me. Is there any for-dummies
introduction? Is there anyone who can try to describe its use in different
words?

Thank you
igmar


Post a reply to this message

From: William F Pokorny
Subject: Re: user_defined camera
Date: 16 May 2019 06:32:12
Message: <5cdd3c2c$1@news.povray.org>
On 5/16/19 3:16 AM, IGM wrote:
> Hi!
> I'm trying to use the user_defined camera, but the explanation in the reference
> and the examples I find around are still obscure to me. Is there any for-dummies
> introduction? Is there anyone who can try to describe its use in different
> words?
> 
> Thank you
> igmar
> 
> 
Have you played with the v3.8 sample scene? It was aimed to be pretty 
simple and has a defined perspective camera too so you can see - in a 
more usual way - the shapes which the user_defined inward cylindrical 
camera is 'viewing' as rays are defined in a rotating fashion around the 
y axis from top to bottom.

<install location>/scenes/camera/user_defined.pov

or on github at:

https://github.com/POV-Ray/povray/tree/master/distribution/scenes/camera

The location block defines the origin of each ray. The direction block 
the direction from each ray. Change, for example, the { y } in the 
locations block of the example scene to { y+0.5 } and render the scene 
anew. (The inward looking cylindrical set of rays now sits higher in y 
relative to the shapes in the scene.)

Bill P.


Post a reply to this message

From: IGM
Subject: Re: user_defined camera
Date: 18 May 2019 10:55:01
Message: <web.5ce01ba257450ea956a775350@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> Have you played with the v3.8 sample scene?

Yes, but maybe I didn't spend enough time with it...
Thank you, I will give it another try.

igmar


Post a reply to this message

From: IGM
Subject: Re: user_defined camera
Date: 18 May 2019 14:25:06
Message: <web.5ce04d7857450ea956a775350@news.povray.org>
After some testing, I've a question: with user_defined camera, camera
transformations (rotate and translate) won't work. Once created the three
functions{} (for direction and location) suitable to obtain a particular effect,
is there a way to "rotate" the whole camera? The insertion of translation is
very simple, but for rotation things seem more complicate..


Post a reply to this message

From: IGM
Subject: Re: user_defined camera
Date: 18 May 2019 16:00:01
Message: <web.5ce063e257450ea956a775350@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
> After some testing, I've a question: with user_defined camera, camera
> transformations (rotate and translate) won't work. Once created the three
> functions{} (for direction and location) suitable to obtain a particular effect,
> is there a way to "rotate" the whole camera? The insertion of translation is
> very simple, but for rotation things seem more complicate..

By the way, the second example found in
"http://wiki.povray.org/content/Reference:Camera#User_defined_projection"
uses "rotate", but it has no effect...:

// Only direction functions specified
#declare Camera01 = camera {
    user_defined
    direction {
      function { x }
      function { y }
      function { 1 }
    }
    location  <0,0,-2>
    rotate    y*5
}

Where am I wrong?
igmar


Post a reply to this message

From: William F Pokorny
Subject: Re: user_defined camera
Date: 20 May 2019 08:55:57
Message: <5ce2a3dd$1@news.povray.org>
On 5/18/19 3:58 PM, IGM wrote:
> "IGM" <iar### [at] gmailcom> wrote:
>> After some testing, I've a question: with user_defined camera, camera
>> transformations (rotate and translate) won't work. Once created the three
>> functions{} (for direction and location) suitable to obtain a particular effect,
>> is there a way to "rotate" the whole camera? The insertion of translation is
>> very simple, but for rotation things seem more complicate..
> 
> By the way, the second example found in
> "http://wiki.povray.org/content/Reference:Camera#User_defined_projection"
> uses "rotate", but it has no effect...:
> 
> // Only direction functions specified
> #declare Camera01 = camera {
>      user_defined
>      direction {
>        function { x }
>        function { y }
>        function { 1 }
>      }
>      location  <0,0,-2>
>      rotate    y*5
> }
> 
> Where am I wrong?
> igmar
> 
> 

I think your right the documentation doesn't match the functionality 
with respect to camera modifiers. As to what should be or not, others 
better know.

I've not thought about a functionally defined camera set up where the 
functions enable later rotation. With functions suppose possible though 
complicated. I'll let the idea rattle around my skull for a while.

I was involved in the original ODS work that led to creation of the 
user_defined camera and I created the shipped sample scene. But, I've 
never worked in the camera source code so I don't know it - specifically 
how the modifiers get applied with cameras / or camera rays. Having that 
functionality with user_defined cameras would be convenient.

I've used the user_defined camera extensively in my own work, but always 
straight up never needing to transform the camera after the functional 
definition. I have a vague recollection of someone else posting the 
transform stuff didn't work for user_defined cameras (or 'maybe' some 
other camera type) and an expert's reply. I had no luck turning it up in 
a couple quick searches.

If you need some user defined, transform-able camera immediately, the 
mesh camera is another kind of user defined camera where transforms - 
applied to the mesh itself at least - should work fine. Unfortunately 
the mesh camera's mesh load (parse time) tends to be expensive. And 
don't forget Jerome's hgpovray38 has additional inbuilt cameras.

Bill P.


Post a reply to this message

From: IGM
Subject: Re: user_defined camera
Date: 20 May 2019 13:00:00
Message: <web.5ce2dc7a57450ea956a775350@news.povray.org>
Hi,
I'm following also the discussion
http://news.povray.org/povray.general/thread/%3CXnsA9E3A3F647A49seed7%40news.povray.org%3E/

The approach, in my opinion, is still far from being user friendly, but I
_think_ that the problem is similar to mine.

igmar


Post a reply to this message

From: Bald Eagle
Subject: Re: user_defined camera
Date: 20 May 2019 13:50:07
Message: <web.5ce2e84e57450ea94eec112d0@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
> Hi,
> I'm following also the discussion
>
http://news.povray.org/povray.general/thread/%3CXnsA9E3A3F647A49seed7%40news.povray.org%3E/
>
> The approach, in my opinion, is still far from being user friendly, but I
> _think_ that the problem is similar to mine.
>
> igmar

Yes, I recall briefly looking at that thread.
TOK has a very thorough understanding of a lot of the underlying math, and
excels in applying it and translating it into code.

Since this (in my mind) seems very similar to isosurfaces, you might take a look
at
http://www.econym.demon.co.uk/isotut/substitute.htm

to see how various transforms are implemented in functions.


As for rotations, I looked into the transforms for that a number of times.
There should be some useful links in this thread
http://news.povray.org/povray.general/thread/%3Cweb.5b9ed475f76fb4baa47873e10%40news.povray.org%3E/

as well as others to show you how to change the expressions for x, y, and z to
rotate the function you want to use.


Post a reply to this message

From: William F Pokorny
Subject: Re: user_defined camera
Date: 27 May 2019 19:38:05
Message: <5cec74dd@news.povray.org>
On 5/20/19 12:57 PM, IGM wrote:
> Hi,
> I'm following also the discussion
>
http://news.povray.org/povray.general/thread/%3CXnsA9E3A3F647A49seed7%40news.povray.org%3E/
> 
> The approach, in my opinion, is still far from being user friendly, but I
> _think_ that the problem is similar to mine.
> 
> igmar
> 
See post today to povray.binaries.images with the title:
"Method to apply transforms to user_defined camera."

It's at least a start on something useful that works today.

Bill P.


Post a reply to this message

From: IGM
Subject: Re: user_defined camera
Date: 4 Jun 2019 03:20:01
Message: <web.5cf61adb57450ea9d5f3e7360@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 5/20/19 12:57 PM, IGM wrote:
> > Hi,
> > I'm following also the discussion
> >
http://news.povray.org/povray.general/thread/%3CXnsA9E3A3F647A49seed7%40news.povray.org%3E/
> >
> > The approach, in my opinion, is still far from being user friendly, but I
> > _think_ that the problem is similar to mine.
> >
> > igmar
> >
> See post today to povray.binaries.images with the title:
> "Method to apply transforms to user_defined camera."
>
> It's at least a start on something useful that works today.
>
> Bill P.

I tried the macro by Olav, but I found an unexpected behaviour:
https://news.povray.org/povray.general/thread/%3CXnsA9E3A3F647A49seed7%40news.povray.org%3E/?mtop=427321&moff=10

igmar


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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