POV-Ray : Newsgroups : povray.binaries.images : To Encore, Making part of an object tranparent Server Time
2 Aug 2024 20:19:04 EDT (-0400)
  To Encore, Making part of an object tranparent (Message 19 to 28 of 38)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Encore
Subject: Re: To Encore, Making part of an object tranparent
Date: 1 Dec 2012 12:00:01
Message: <web.50ba3708f594feb2d26d2d990@news.povray.org>
> Default values are at the top of the page (angle is about 67.380° for a
> 4/3 default perspective camera, but it must be explicitly using at least
> "angle" keyword in orthographic if you want to use the second computation)

Thanks for this I could already fix this option, however, this messes up with
the invisible cuts that create the  illusion. The output is what is show in the
screenshot. How can I tackle this now? :/


Post a reply to this message


Attachments:
Download 'orthographic.png' (103 KB)

Preview of image 'orthographic.png'
orthographic.png


 

From: Le Forgeron
Subject: Re: To Encore, Making part of an object tranparent
Date: 1 Dec 2012 12:49:37
Message: <50ba4331@news.povray.org>
Le 01/12/2012 17:57, Encore nous fit lire :
> 
>> Default values are at the top of the page (angle is about 67.380° for a
>> 4/3 default perspective camera, but it must be explicitly using at least
>> "angle" keyword in orthographic if you want to use the second computation)
> 
> Thanks for this I could already fix this option, however, this messes up with
> the invisible cuts that create the  illusion. The output is what is show in the
> screenshot. How can I tackle this now? :/
> 
Well... you cannot have the same cut for perspective and for orthographic.

With perspective, the cut should be something like a prism-truncated
pyramid (top of the pyramid at the camera).

With orthographic, the cut should be something like a box (sides aligned
with the camera)


Post a reply to this message

From: Encore
Subject: Re: To Encore, Making part of an object tranparent
Date: 3 Dec 2012 11:05:01
Message: <web.50bccc9af594feb215e8f8270@news.povray.org>
> With orthographic, the cut should be something like a box (sides aligned
> with the camera)

Currently, there is a code block which handles the planes that cause the cut to
make the back post invisible.

To achieve this, two planes are created like this:

#declare Plane1 = plane {-x, 0 rotate y * Alpha};
#declare Plane2 = plane { x, 0 rotate y *-Alpha};

Where Alpha is the distance from the camera position to the vertical post that
needs to be visible. This is done by the following:

#local r = R;
#local Alpha = asin(r / ViewVector) * 180 / pi;

This makes the conical shape from the cube to the camera.
Since I now use the orthographic camera, I need to change this setting by making
the two planes simply parallel to each other and fixed to the ViewVector for
animation purposes.
What should I do to solve this problem?

I am also attaching a screenshot of what the scene looks like with the
orthographic camera and the default angle.


Post a reply to this message


Attachments:
Download 'orthographic.png' (106 KB)

Preview of image 'orthographic.png'
orthographic.png


 

From: Le Forgeron
Subject: Re: To Encore, Making part of an object tranparent
Date: 3 Dec 2012 13:56:46
Message: <50bcf5ee$1@news.povray.org>
Le 03/12/2012 17:00, Encore nous fit lire :
> 
>> With orthographic, the cut should be something like a box (sides aligned
>> with the camera)
> 
> Currently, there is a code block which handles the planes that cause the cut to
> make the back post invisible.
> 
> To achieve this, two planes are created like this:
> 
> #declare Plane1 = plane {-x, 0 rotate y * Alpha};
> #declare Plane2 = plane { x, 0 rotate y *-Alpha};
> 
> Where Alpha is the distance from the camera position to the vertical post that
> needs to be visible. This is done by the following:
> 
> #local r = R;
> #local Alpha = asin(r / ViewVector) * 180 / pi;
> 

Well, instead of rotating your plane, translate it.
something along:
#declare Plane1 = plane { -x, 0 translate r*x }; // and so on

now, I wonder if it should be asin or atan ? (given that r is probably
small when compared to ViewVector, that might be irrelevant)
Or maybe I do not understand R, r & ViewVector.

Alpha is not a distance, it's an angle.

> This makes the conical shape from the cube to the camera.
> Since I now use the orthographic camera, I need to change this setting by making
> the two planes simply parallel to each other and fixed to the ViewVector for
> animation purposes.
> What should I do to solve this problem?
> 
> I am also attaching a screenshot of what the scene looks like with the
> orthographic camera and the default angle.
>


Post a reply to this message

From: Encore
Subject: Re: To Encore, Making part of an object tranparent
Date: 4 Dec 2012 08:20:03
Message: <web.50bdf844f594feb2faf1bd150@news.povray.org>
> Well, instead of rotating your plane, translate it.
> something along:
> #declare Plane1 = plane { -x, 0 translate r*x }; // and so on
>
> now, I wonder if it should be asin or atan ? (given that r is probably
> small when compared to ViewVector, that might be irrelevant)
> Or maybe I do not understand R, r & ViewVector.
>
> Alpha is not a distance, it's an angle.
>
Yeah sorry for that I meant the angle. Well I've tried the translate r*x
and at first it looks just fine (it's attached to the left and right part of the
back edge) but then if I start animating the scene, the planes are just messed
up, as if they don't track that edge any more. I am pretty sure I'm not tracking
the edge with the ViewVector that's why it's messed up when I animate it


Post a reply to this message

From: Ger
Subject: Re: To Encore, Making part of an object tranparent
Date: 6 Dec 2012 03:33:29
Message: <50c05859@news.povray.org>
Encore wrote:

> 
> I still can't figure out how to change the camera to an orthographic view.
> When I set the camera to orthographic, it simply messes up my "cuts", I
> would guess because those cuts are something like cone shapes that extend
> from the camera position to the point on the object, whereas it should now
> be more like a long parallelogram because of the different perspective.
> Any ideas how I can tackle this problem? :/

I have it figured out, by not using the orthographic camera, but pulling the 
camera way back from the object and then zooming in. It didn't work the 
first time because I had a mix-up in my math.

Camera distance increased by 1000
-- 
Ger


Post a reply to this message


Attachments:
Download 'transpattempt2000.png' (93 KB)

Preview of image 'transpattempt2000.png'
transpattempt2000.png


 

From: Encore
Subject: Re: To Encore, Making part of an object tranparent
Date: 6 Dec 2012 10:35:00
Message: <web.50c0bab6f594feb2fd39ada50@news.povray.org>
> I have it figured out, by not using the orthographic camera, but pulling the
> camera way back from the object and then zooming in. It didn't work the
> first time because I had a mix-up in my math.
>
> Camera distance increased by 1000
> --
> Ger

So basically you change the Cam0Location to something like
#declare Cam0Location =  < 0 , 1 ,-1000>;

which puts it to -1000 on the z-axis. How would you zoom in then after that?


Post a reply to this message

From: Le Forgeron
Subject: Re: To Encore, Making part of an object tranparent
Date: 6 Dec 2012 10:44:25
Message: <50c0bd59$1@news.povray.org>
Le 06/12/2012 16:33, Encore nous fit lire :
> 
>> I have it figured out, by not using the orthographic camera, but pulling the
>> camera way back from the object and then zooming in. It didn't work the
>> first time because I had a mix-up in my math.
>>
>> Camera distance increased by 1000
>> --
>> Ger
> 
> So basically you change the Cam0Location to something like
> #declare Cam0Location =  < 0 , 1 ,-1000>;
> 
> which puts it to -1000 on the z-axis. How would you zoom in then after that?
> 
I guess: a small angle.


Post a reply to this message

From: Encore
Subject: Re: To Encore, Making part of an object tranparent
Date: 6 Dec 2012 11:00:01
Message: <web.50c0bfddf594feb2fd39ada50@news.povray.org>
> > So basically you change the Cam0Location to something like
> > #declare Cam0Location =  < 0 , 1 ,-1000>;
> >
> > which puts it to -1000 on the z-axis. How would you zoom in then after that?
> >
> I guess: a small angle.

Yeah I was about to post  another reply about that.
I changed the angle to about 0.380
and the #declare Cam0Location =  < 0 , 1000 ,-1000>;

After that, I needed to translate the camera along the x-axis like this:
#declare Cam0Location = vrotate(Cam0Location, <0, CamAngle/1, 0>) + <450, 30,
-3>;

It still needs some configurations but the problem is that the wedges do not
extend until the object anymore, so the result looks something like what you can
see in the screenshot:


Post a reply to this message


Attachments:
Download 'transpattempt.png' (35 KB)

Preview of image 'transpattempt.png'
transpattempt.png


 

From: Ger
Subject: Re: To Encore, Making part of an object tranparent
Date: 6 Dec 2012 12:31:02
Message: <50c0d656@news.povray.org>
Encore wrote:

> 
>> I have it figured out, by not using the orthographic camera, but pulling
>> the camera way back from the object and then zooming in. It didn't work
>> the first time because I had a mix-up in my math.
>>
>> Camera distance increased by 1000
>> --
>> Ger
> 
> So basically you change the Cam0Location to something like
> #declare Cam0Location =  < 0 , 1 ,-1000>;
> 
> which puts it to -1000 on the z-axis. How would you zoom in then after
> that?

Code is in povray.text.scene-files

-- 
Ger


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.