Subject:
|
Re: Newbie question...
|
Newsgroups:
|
lugnet.cad.ray
|
Date:
|
Fri, 19 Jan 2001 01:36:47 GMT
|
Viewed:
|
1011 times
|
| |
| |
Here is something I wrote on camera angles:
Free-Form Camera Positioning with MLCAD, L3P, and POV-RAY
One of the hardest issues to grasp when starting out with MLCAD, L3P, and
POV-RAY is figuring out how to position the camera to get the desired shots.
Various techniques exist for camera positioning, but this article seeks to
discuss one of the easiest and most powerful.
Background
MLCAD describes 3D points using three different coordinates: (x,y,z). If
you are looking at the front of a model, the X axis defines how far a point
is to the left or right. The Y access defines how high a point is (i.e.
up/down). The Z access defines how far the point is away from the viewer
(i.e. in and out). L3P translates these coordinates into a POV-RAY file
for 3D rendering.
Finding a Point in MLCAD
A key to this technique is to locate the position of the camera and the
position of the "subject.' The subject is a point at which you want the
camera to point or "look at."
To locate a point, load up the desired model in MLCAD. Typically, the
upper-left view shows the front. If it is set to something else, reset it
to show the front. The lower-left view should show the model from above.
Make sure this view is set to show the model from above..
Now, move the cursor onto the upper-left view and position it where you
would like the camera to be. At the lower-left of the application window
(in the status bar), MLCAD displays the coordinates of that point. You can
only register two of the coordinates in any one view. Notice how the
coordinates change as you move the cursor. Write down the X and Y
coordinates based on the cursor position.
Next, move the cursor onto the lower-left view, again where you want the
camera. This is necessary to get the third coordinate. When you've found
the spot, write down the Z coordinate.
Repeat this process to find a second point at which you want the camera to
look. Often, the center of the model is an ideal spot.
Keep MLCAD running while completing the rest of the process, as the
procedure can be repeated to find different camera locations.
L3P
The L3P utility is used to generate a POV-RAY file from the MLCAD output.
Although L3P supports some camera positioning options, this technique doesn'
t use them. Just generate a POV-RAY file for your model using the default
options.
Using the Point in POV-RAY
Load up the POV-RAY file. Scroll down to the bottom of the text
representation of the file. Near the bottom, you will see something like the
following:
// Camera (Latitude,Longitude,Radius = 0,180,0)
camera {
#declare PCT = 0; // Percentage further away
#declare STEREO = 0; // Normal view
file://#declare STEREO = degrees(atan2(1,12))/2; // Left view
file://#declare STEREO = -degrees(atan2(1,12))/2; // Right view
location vaxis_rotate(<80,-600,-1400> + PCT/100.0*<0,0,3106>,
<0,-9.64724e+006,0>,STEREO)
sky -y
right -4/3*x
look_at <300,-150,0>
angle 40
rotate <0,1e-5,0> // Prevent gap between adjecent quads
file://orthographic
}
It's not really necessary to understand the specifics of what this does.
You just need to plug in the appropriate values in the correct locations.
Put the three camera coordinates found earlier into the
".vaxis_rotate(<X,Y,Z>.." construct.
Put the three coordinates where you want the camera to point into the
"look_at<X,Y,Z>" construct.
Now, save the file and do a test run. The procedure can be repeated over
and over to refine the shot or to create new ones. It is not necessary to
re-run the model through L3P each time. Just change the coordinates in the
final POV-RAY file and re-run.
Camera Lens
It is possible to simulate just about any camera lens. The zoom of the lens
is controlled by the "angle" construct (see above). L3P generates a
standard view with this set to about 64. A telephoto lens (close-up shot)
is simulated by a value of about 40. A wide-angle shot is simulated by a
value of 100. Setting this to about 120 provides a super-wide-angle shot
with some "fish-eye" effect.
Doing a Photo Shoot
When doing many shots, it is often nice to save the camera positions. This
is useful because you may want to enhance the model and then re-run the same
series of shots. To do this, copy the above snippet from the POV-RAY file
into a text file using notepad, Word, or any other editor. You can comment
your shot by adding a line prior to it that starts with "//" (slash-slash).
Then, when you want to re-run the shot, just copy the text from the text
file and replace that text block in the POV-RAY file.
Ahui Herrera <jedi_agh@yahoo.com> wrote in message
news:G7A73q.D5D@lugnet.com...
> I just started playing with Ray-Tracing and have finsihed my first image
> using POV-Ray. It came out perfect but the picture is shown like an
> isometric drawing with a top view. Is there ay way to change the views in
> which POV-Ray will render the images? Do I need to set the way I want the
> 3d view to look like in the dat file and then POV-ray oit or can I chaneg
> the 3D viw in POV-ray itself. Thanks Ahui
|
|
Message is in Reply To:
| | Newbie question...
|
| I just started playing with Ray-Tracing and have finsihed my first image using POV-Ray. It came out perfect but the picture is shown like an isometric drawing with a top view. Is there ay way to change the views in which POV-Ray will render the (...) (24 years ago, 17-Jan-01, to lugnet.cad.ray)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|