POV-Ray : Newsgroups : povray.binaries.scene-files : New version screen.inc Server Time
28 Apr 2024 18:14:05 EDT (-0400)
  New version screen.inc (Message 21 to 30 of 52)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Yannick Patois
Subject: Re: New version screen.inc
Date: 17 Mar 2016 04:50:00
Message: <web.56ea6fa7b4b00596629fde300@news.povray.org>
Hi,

"posfan12" <nomail@nomail> wrote:
> Here's an updated version. It uses a new macro, Set_Camera_Orthographic, to
> toggle orthographic mode on/off. Otherwise, the script will not be compatible
> with old scenes made prior to this script.

Thanks for your great work.

However, when I tried this version, I saw that the render was not the same when
simply switching from the regular screen.inc to screen_new.inc.

Is that expected?

Thanks.

Yannick


Post a reply to this message

From: cbpypov
Subject: Re: New version screen.inc
Date: 3 Nov 2017 18:40:01
Message: <web.59fcef3fb4b00596591d362a0@news.povray.org>
This is a really cool feature which I'd like to use for an animation. Somehow it
does not work for me: the camera "zooms in" much more than using the normal
orthographic camera. The object positioning of text does not work either, as
shown in the standard screen.inc example attached.

What am I doing wrong. Or did something change?


Post a reply to this message


Attachments:
Download 'screentest.png' (105 KB)

Preview of image 'screentest.png'
screentest.png


 

From: Stephen
Subject: Re: New version screen.inc
Date: 3 Nov 2017 21:57:17
Message: <59fd1e7d@news.povray.org>
On 03/11/2017 22:35, cbpypov wrote:
> This is a really cool feature which I'd like to use for an animation. Somehow it
> does not work for me: the camera "zooms in" much more than using the normal
> orthographic camera. The object positioning of text does not work either, as
> shown in the standard screen.inc example attached.
> 
> What am I doing wrong. Or did something change?
> 

You are right. You can only use screen.inc with the perspective camera.


Fake it. Move the camera further away and reduce the angle.


-- 

Regards
     Stephen


Post a reply to this message

From: cbpypov
Subject: Re: New version screen.inc
Date: 4 Nov 2017 15:20:00
Message: <web.59fe12d3b4b00596663654620@news.povray.org>
>
> You are right. You can only use screen.inc with the perspective camera.
>
>
> Fake it. Move the camera further away and reduce the angle.
>
>
> --
>
> Regards
>      Stephen


Wasn't it just the objective of SharkD's file to actually make screen.inc
compatible with the orthographic camera? I.e. the issue of this thread?? A few
posts before some people state that it behaves as expected, but I can't seem to
get it to work.

It would be nice to have this feature, because I already have all the camera
positions of my animations and simply wanted to add a subtitle and some displays
in front of the camera. Due to the scientific background of the animation I'd
really prefer to have the orthographic cam.

Stephen, I tried your suggestion (without thinking, though) and just multiplied
the camera location vector by 10, and divided the angle by 10. It did not work
:) Is there a known mathematical way to fake the ortho-cam with my working
camera settings (i.e. a simple transformation that I can apply in the end)?

Thank you!


Post a reply to this message

From: Stephen
Subject: Re: New version screen.inc
Date: 4 Nov 2017 15:56:44
Message: <59fe1b7c@news.povray.org>
On 04/11/2017 19:19, cbpypov wrote:
>>
>> You are right. You can only use screen.inc with the perspective camera.
>>
>>
>> Fake it. Move the camera further away and reduce the angle.
>>
>>
>> --
>>
>> Regards
>>       Stephen
> 
> 
> Wasn't it just the objective of SharkD's file to actually make screen.inc
> compatible with the orthographic camera? I.e. the issue of this thread?? A few
> posts before some people state that it behaves as expected, but I can't seem to
> get it to work.
> 

Oops! I forgot the beginnings of this thread.
That's what he said in the first post. But the third one with an 
attachment still says:

> // You can only use screen.inc with the perspective camera. Screen.inc
> // will automatically create the camera definition for you when it is
> // included.




> It would be nice to have this feature, because I already have all the camera
> positions of my animations and simply wanted to add a subtitle and some displays
> in front of the camera. Due to the scientific background of the animation I'd
> really prefer to have the orthographic cam.
> 
> Stephen, I tried your suggestion (without thinking, though) and just multiplied
> the camera location vector by 10, and divided the angle by 10. It did not work
> :) Is there a known mathematical way to fake the ortho-cam with my working
> camera settings (i.e. a simple transformation that I can apply in the end)?
> 

There will be a tangent in there some way.

https://en.wikipedia.org/wiki/Angle_of_view#Derivation_of_the_angle-of-view_formula

All those hard quantum sums, eh? ;-)




> Thank you!
> 


-- 

Regards
     Stephen


Post a reply to this message

From: cbpypov
Subject: Re: New version screen.inc
Date: 4 Nov 2017 17:50:00
Message: <web.59fe354ab4b00596663654620@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

>
> Oops! I forgot the beginnings of this thread.
> That's what he said in the first post. But the third one with an
> attachment still says:
>
> > // You can only use screen.inc with the perspective camera. Screen.inc
> > // will automatically create the camera definition for you when it is
> > // included.
>

No need to remember it: it's there, online, you can read it again ;) But I think
you copied these lines from its screen.inc attachment. BUT, these lines are
there because SharkD copied them from the original screen.inc and frogot to
delete them :D Maybe it's me: but I am sure this thread would not be here if
SharkD did not have tried to get ortho-cam to work. Moreover, his
reimplementation of Set_Camera would not have a new `orth` parameter:

    #macro Set_Camera(Location, LookAt, Angle, Ortho)

Right?

So, ... we are a bit at cross-purposes, i think. I attached examples of a
minimal scene. minimal_perspective.pov uses the normal camera, and using
screen.inc (minimal_screen.pov) gives identical results. When setting the
ortho-cam in the traditional way, I get the expected result (minimal_ortho.pov).
However, when using SharkD's screen.inc and setting `ortho=on`), the result is
way different (minimal_ortho_screen.pov). I think this is not how it is supposed
to work, i.e. minimal_ortho.png and minimal_ortho_screen.png are supposed to be
identical, but they are not.

>
> There will be a tangent in there some way.
>
> https://en.wikipedia.org/wiki/Angle_of_view#Derivation_of_the_angle-of-view_formula
>
> All those hard quantum sums, eh? ;-)
>

I see, it should be simple ;) I tried it, see minimal_ortho_fake.pov. But it is
still wrong :/

Does anyone see a fix for SharkD's approach? Or do you see where my mistake in
the fake version is?

Thanks :)


Post a reply to this message


Attachments:
Download 'minipov.zip' (176 KB)

From: Stephen
Subject: Re: New version screen.inc
Date: 5 Nov 2017 04:10:00
Message: <web.59fed53cb4b005965035c1510@news.povray.org>
Reposting this so I can pick it up in thunderbird.

(It came through the first time blank.)


"cbpypov" <nomail@nomail> wrote:
> Stephen <mca### [at] aolcom> wrote:
>
> >
> > Oops! I forgot the beginnings of this thread.
> > That's what he said in the first post. But the third one with an
> > attachment still says:
> >
> > > // You can only use screen.inc with the perspective camera. Screen.inc
> > > // will automatically create the camera definition for you when it is
> > > // included.
> >
>
> No need to remember it: it's there, online, you can read it again ;) But I think
> you copied these lines from its screen.inc attachment. BUT, these lines are
> there because SharkD copied them from the original screen.inc and frogot to
> delete them :D Maybe it's me: but I am sure this thread would not be here if
> SharkD did not have tried to get ortho-cam to work. Moreover, his
> reimplementation of Set_Camera would not have a new `orth` parameter:
>
>     #macro Set_Camera(Location, LookAt, Angle, Ortho)
>
> Right?
>
> So, ... we are a bit at cross-purposes, i think. I attached examples of a
> minimal scene. minimal_perspective.pov uses the normal camera, and using
> screen.inc (minimal_screen.pov) gives identical results. When setting the
> ortho-cam in the traditional way, I get the expected result (minimal_ortho.pov).
> However, when using SharkD's screen.inc and setting `ortho=on`), the result is
> way different (minimal_ortho_screen.pov). I think this is not how it is supposed
> to work, i.e. minimal_ortho.png and minimal_ortho_screen.png are supposed to be
> identical, but they are not.
>
> >
> > There will be a tangent in there some way.
> >
> >
https://en.wikipedia.org/wiki/Angle_of_view#Derivation_of_the_angle-of-view_formula
> >
> > All those hard quantum sums, eh? ;-)
> >
>
> I see, it should be simple ;) I tried it, see minimal_ortho_fake.pov. But it is
> still wrong :/
>
> Does anyone see a fix for SharkD's approach? Or do you see where my mistake in
> the fake version is?
>
> Thanks :)


Post a reply to this message

From: Stephen
Subject: Re: New version screen.inc
Date: 5 Nov 2017 08:32:33
Message: <59ff12f1@news.povray.org>
On 05/11/2017 09:09, Stephen wrote:
> Reposting this so I can pick it up in thunderbird.
> 
> (It came through the first time blank.)
> 
> 
> "cbpypov" <nomail@nomail> wrote:
>> Stephen <mca### [at] aolcom> wrote:
>>
>>>
>>> Oops! I forgot the beginnings of this thread.
>>> That's what he said in the first post. But the third one with an
>>> attachment still says:
>>>
>>>> // You can only use screen.inc with the perspective camera. Screen.inc
>>>> // will automatically create the camera definition for you when it is
>>>> // included.
>>>
>>
>> No need to remember it: it's there, online, you can read it again ;) But I think
>> you copied these lines from its screen.inc attachment. BUT, these lines are
>> there because SharkD copied them from the original screen.inc and frogot to
>> delete them :D Maybe it's me: but I am sure this thread would not be here if
>> SharkD did not have tried to get ortho-cam to work. Moreover, his
>> reimplementation of Set_Camera would not have a new `orth` parameter:
>>
>>      #macro Set_Camera(Location, LookAt, Angle, Ortho)
>>
>> Right?
>>

Hands up for posting without validating. :-(


>> So, ... we are a bit at cross-purposes, i think. I attached examples of a
>> minimal scene. minimal_perspective.pov uses the normal camera, and using
>> screen.inc (minimal_screen.pov) gives identical results. When setting the
>> ortho-cam in the traditional way, I get the expected result (minimal_ortho.pov).
>> However, when using SharkD's screen.inc and setting `ortho=on`), the result is
>> way different (minimal_ortho_screen.pov). I think this is not how it is supposed
>> to work, i.e. minimal_ortho.png and minimal_ortho_screen.png are supposed to be
>> identical, but they are not.
>>

You are right. I imported a couple of the scenes into Bishop3D, to get a 
visual representation of the cameras.
Adjusting the Up and Right Vectors of the orthogonal camera until the 
"look at" areas coincided. The angle I read back was 66.67. Substituting 
that into  minimal_ortho_screen.pov it was out by a factor of 2. an 
angle of 66.67/2 gave me a very similar image to minimal_perspective.pov


I conclude that there is something not right with the way that 
screen_ortho.inc converts angle into the the other vectors.

Finding what is beyond me.I would be still at it when the cows came home.



>>>
>>> There will be a tangent in there some way.
>>>
>>>
https://en.wikipedia.org/wiki/Angle_of_view#Derivation_of_the_angle-of-view_formula
>>>
>>> All those hard quantum sums, eh? ;-)
>>>
>>
>> I see, it should be simple ;) I tried it, see minimal_ortho_fake.pov. But it is
>> still wrong :/
>>

I had a quick look at it and it is beyond me. I'm afraid.



-- 

Regards
     Stephen


Post a reply to this message

From: cbpypov
Subject: Re: New version screen.inc
Date: 5 Nov 2017 13:10:01
Message: <web.59ff536db4b005968248f19d0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
>
> Hands up for posting without validating. :-(
>

Sorry, I cannot really follow what you mean ... did I do something wrong? :(

>
> You are right. I imported a couple of the scenes into Bishop3D, to get a
> visual representation of the cameras.
> Adjusting the Up and Right Vectors of the orthogonal camera until the
> "look at" areas coincided. The angle I read back was 66.67. Substituting
> that into  minimal_ortho_screen.pov it was out by a factor of 2. an
> angle of 66.67/2 gave me a very similar image to minimal_perspective.pov
>
>
> I conclude that there is something not right with the way that
> screen_ortho.inc converts angle into the the other vectors.
>
> Finding what is beyond me.I would be still at it when the cows came home.
>

Glad we're talking about the same things now :) Cool that you can do such things
with Bishop3D! I may have a look at what it is capable of.

However, maybe it was not really beyond you. I just had a look at SharkD's code,
and (again without actually thinking very much) I just found two little bugs.
There was just a factor of 2 missing here and there :D It now works in gives
exactly the results without the screen.inc. Hope you like it :)

JUST A SHORT question beyond that... using the screen.inc camera setting method
it seems that I cannot rotate the camera anymore, but need to use the sky-vector
instead. How do I do this? :)

Thanks for your help.
Best,
Carlo


Post a reply to this message


Attachments:
Download 'screen_ortho.inc.txt' (8 KB)

From: cbpypov
Subject: Re: New version screen.inc
Date: 5 Nov 2017 14:30:00
Message: <web.59ff65d8b4b005968248f19d0@news.povray.org>
"cbpypov" <nomail@nomail> wrote:
>
> JUST A SHORT question beyond that... using the screen.inc camera setting method
> it seems that I cannot rotate the camera anymore, but need to use the sky-vector
> instead. How do I do this? :)

Found it myself :) I have to use vaxis_rotate on the camera location instead of
the sky vector. In my case I have to rotate around the y axis by the desired
degrees.

So it seems that everything is working now for me...


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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