|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have an animation which the camera is moving through the scene. However,
certain objects are to remain aligned to the camera as if the camera was at <0,
0, 0> with right in the +x direction and up in the +y direction and looking
along +z. How can I take an object(s) and transform them based on the camera's
current position, angle, etc to achieve this?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Allen" <bri### [at] yahoocom> wrote in message
news:web.496ecaad4b0681c28f162dfb0@news.povray.org...
>I have an animation which the camera is moving through the scene. However,
> certain objects are to remain aligned to the camera as if the camera was
> at <0,
> 0, 0> with right in the +x direction and up in the +y direction and
> looking
> along +z. How can I take an object(s) and transform them based on the
> camera's
> current position, angle, etc to achieve this?
Not absolutely positive about this but maybe you could change
splinefollow.pov example scene (scenes\animations subfolder) to be opposite.
Camera as object and object as camera...?
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bob Hughes" <omniverse charter net> wrote:
> "Allen" <bri### [at] yahoocom> wrote in message
> news:web.496ecaad4b0681c28f162dfb0@news.povray.org...
> >I have an animation which the camera is moving through the scene. However,
> > certain objects are to remain aligned to the camera as if the camera was
> > at <0,
> > 0, 0> with right in the +x direction and up in the +y direction and
> > looking
> > along +z. How can I take an object(s) and transform them based on the
> > camera's
> > current position, angle, etc to achieve this?
>
>
> Not absolutely positive about this but maybe you could change
> splinefollow.pov example scene (scenes\animations subfolder) to be opposite.
> Camera as object and object as camera...?
>
> Bob
I had problems because I was generating part of the file from a script. I
didn't think to incorporate the same changes applied to the camera to the
objects, but now I just use Spline_Trans on the objects as well as the camera.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Allen" <bri### [at] yahoocom> wrote:
> I have an animation which the camera is moving through the scene. However,
> certain objects are to remain aligned to the camera as if the camera was at <0,
> 0, 0> with right in the +x direction and up in the +y direction and looking
> along +z. How can I take an object(s) and transform them based on the camera's
> current position, angle, etc to achieve this?
Maybe the easiest way would be to not move the camera at all, but the scene...?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hallo,
how about using screen.inc?
It's all there :-)
Happy tracing...
Karl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Allen wrote:
> I have an animation which the camera is moving through the scene. However,
> certain objects are to remain aligned to the camera as if the camera was at <0,
> 0, 0> with right in the +x direction and up in the +y direction and looking
> along +z. How can I take an object(s) and transform them based on the camera's
> current position, angle, etc to achieve this?
That depends on how you place the camera.
In my animations, I make heavy use of titling and objects placed in
front of the camera to produce fade effects. For this I use the
following variables:
pCamL= the location of the camera
pCamE = the look_at position of the camera
vCamS = the up direction for the scene (y for lefty worlds, z for righty
worlds)
sCamZ = the zoom value
My main .POV file assigns default values to these, and then calls a
scene file. The scene file changes the values to whatever fits for the
camera in the scene. The main file then does the following:
#declare vCamD=vnormalize(pCamE-pCamL);
#declare vCamR=vnormalize(vcross(vCamS,vCamD));
#declare vCamU=vnormalize(vcross(vCamD,vCamR));
camera {
right vCamR*image_width/image_height
up vCamU
direction vCamD*sCamZ
locate pCamL
}
Then the main .POV file calls another .INC that builds the titling. All
titling is built so that it lies in or just beyond a rectangle that is
centered at the origin and extends by half of the aspect ratio to the
left, a similar amount to the right, and by .5 up and .5 down.
I then apply the following transforms to each titling object:
translate z*sCamZ // (or y*sCamZ if you are modeling in a right-hand
// world)
scale .1 // only needed if your titling intersects with the stuff
// in your scene
Matrix_Transform(vCamR,vCamU,vCamD,pCamL) // left-hand world
// or
Matrix_Transform(vCamR,vCamD,vCamU,pCamL) // right-hand world
It is best to have titling that is very thin in the camera's direction,
because if the zoom value changes, it will be apparent in the rendering
of the titling objects. However, don't make it too thin, or POV-Ray
will not render some things (text, I have found) properly.
Your titling objects should be textured with ambient=1, diffuse=0, and
do not cast shadows or are visible in reflections (unless you want this
effect).
If you've understood all of this, your camera can be doing all sorts of
wild gyrations, but the titling will remain solidly in place.
Hope this helps,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
John VanSickle <evi### [at] hotmailcom> wrote:
> It is best to have titling that is very thin in the camera's direction,
> because if the zoom value changes, it will be apparent in the rendering
> of the titling objects. However, don't make it too thin, or POV-Ray
> will not render some things (text, I have found) properly.
How about a plane, textured using the object pattern?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka wrote:
> John VanSickle <evi### [at] hotmailcom> wrote:
>> It is best to have titling that is very thin in the camera's direction,
>> because if the zoom value changes, it will be apparent in the rendering
>> of the titling objects. However, don't make it too thin, or POV-Ray
>> will not render some things (text, I have found) properly.
>
> How about a plane, textured using the object pattern?
That can work.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|