Office Automation Example -
AutoCAD DView
Think like a photographer
AutoCAD DVIEW is one of those programs that, before you see it
demonstrated, it can be a real challenge to use. But I like to use it better than 3D
Orbit because it lets me plan the view as if I were setting up a camera.
We will be using the sample KITCHEN2 drawing from AutoCAD version 12
as our model. You can use any wireframe model that you prefer. The KITCHEN2
drawing shown here:

But first, let's get some definitions out of the way.
TARGET - This is the point that will be in the dead
center of the picture when you are done. If you look through a camera viewfinder,
there may be an "X" in the middle, or the focusing prism might be in the center
of your lens. Imagine this point in the final picture and figure out what you want
to be there. We will be using the top of the table as the target in the KITCHEN2
drawing.
CAMERA - This is the point from which you will be
viewing the scene. It is not a point on the ground, but a point at eye level.
Imagine where you would hold a camera to take a picture of the scene. We will
be standing in the middle of the doorway directly in front of the table.
To locate these points precisely,
draw a line using OSNAP "NEAr" to the target and "NEAr" to the point
you would set up a camera tripod.
You can see the line in this picture:

Use AutoCAD to LI List the line you just drew.
In the command line history or in the F2 Text Screen, use your mouse to
highlight the coordinates of the line you just listed.
from point, X= 5'-0" Y=7'-11 3/16" Z= 2'-7"
to point, X=5'-8 5/8" Y= 0'-0" Z= 0'-0"
Ctrl+C to copy these coordinates to the clipboard,
then Ctrl+V paste them to a NOTEPAD text window.
( [Start] / Run... / Notepad is one way of getting this text window)
In the Notepad window, delete the extra information, delete spaces,
delete fractions, and insert commas to clean up the coordinates to look like this:
5'-0",7'-11",2'-7"
5'-8",0'-0",0'-0"
The point is to make the coordinates look like something AutoCAD will
read. Spaces act like the <Enter> key, and fractions are not necessary unless
you are working with a very small model like a machine part.
Now, we need to do one more thing to the points, and that is set the
height of the camera.
Remember, we picked a point "NEAr" the floor, so we have to add around 5 feet to
the height of the camera.
Now the points should look like this:
5'-0",7'-11",2'-7"
5'-8",0'-0",5'-0"
We are now ready for the DVIEW command.
In AutoCAD, erase the line you created so it doesn't appear in the
final picture.
In AutoCAD, type DVIEW.
Command: DVIEW
Select objects or <use DVIEWBLOCK>:
All <Enter>
(or <select objects> <Enter>)
(or <Enter> for DVIEWBLOCK)
If you type "All", then AutoCAD has to think of all the
objects in your model each time you change the DVIEW options.
If you want just a simple house represented by the DVIEWBLOCK,
AutoCAD will respond faster in the DVIEW command. The "dviewblock"
looks like what you see here:

Since we already know all of our camera settings, we may not want to
see the model during the setup, so the DVIEWBLOCK option would be a good selection.
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]:
There's lots of options for DVIEW, but I usually use only 3 of
them....
PO Points to enter the Target and Camera that we just created,
D Distance to convert the scene into a perspective view and
Z Zoom to change lenses on my camera.
Command: DVIEW
Select objects or <use DVIEWBLOCK>:<Enter>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: PO
Specify target point <8'-6 11/16", 9'-10 3/8", -0'-8 7/16">: 5'-0",7'-11",2'-7"
Specify camera point <8'-5 11/16", 9'-9 3/8", -0'-7 7/16">: 5'-8",0'-0",5'-0"
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: D
Specify new camera-target distance <8'-3 5/8">:<Enter>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: Z
Specify lens length <25.000mm>:55<Enter>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]:<Enter>
Regenerating model.
Command:
The view shown here doesn't include enough of the room.

So, we will start the DVIEW command again just by clicking the
spacebar.
Then, Z Zoom and change the size of the lens.
Command: <Spacebar> DVIEW
Select objects or <use DVIEWBLOCK>:<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/
PAn/Zoom/TWist/CLip/Hide/Off/Undo]: z<Spacebar>
Specify lens length <25.000mm>: 15<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/
PAn/Zoom/TWist/CLip/Hide/Off/Undo]:<Spacebar>
Regenerating model.
Command:

The zoom settings correspond to a Single Lens Reflex (SLR) camera
lens.
The lower the millimeter zoom setting, the more of the model is shown
in the view and the more distortion you will see around the edges.
The higher the millimeter zoom setting, the more the lens resembles a
telephoto lens. You will see less of your model in the view, and you will notice
less perspective distortion.

The better your skills become in setting up the camera, the faster
you will see the shots you want in the DVIEW command.
To return to a normal view, use the AutoCAD View toolbar and select a
view, type PLAN, or use the VPOINT command and pick your view from the compass.
Front and Back Clipping Planes
Have you ever seen a photography studio setup that has removable
walls so they can maneuver the camera into the set?
DVIEW lets you do the same thing. If you find that a wall is
blocking your view, you can turn Front and Back Clipping planes on and off and slide them
in and out in relation to the TARGET.
You may first have to find out how far DVIEW thinks the camera is
from the target. Start the DVIEW command and select the D Distance option.
Don't change it, just make a note of the distance displayed.
Command: DVIEW<Spacebar>
Select objects or <use DVIEWBLOCK>:<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: D<Spacebar>
Specify new camera-target distance <8'-3 5/8">:<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: <Spacebar>
Regenerating model.
Command:
In this case, the distance between the TARGET and the CAMERA is over
8'. If the wall is directly in front of the camera, try using the CL Clip option and
set the front to 7', then 6', until you see the wall disappear.
Command: DVIEW
Select objects or <use DVIEWBLOCK>:<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: CL<Spacebar>
Enter clipping option [Back/Front/Off] <Off>:F<Spacebar>
Specify distance from target or [set to Eye(camera)] <8'-3 5/8">: 7'<Spacebar>
Enter option
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]: <Spacebar>
Regenerating model.
Command:
The rear wall can be removed if you set a Back clipping plan at a
negative number from the target. For example, if you want the rear wall removed 6'
behind your TARGET, then do this:
[CAmera/TArget/Distance/POints/PAn/Zoom/TWist/CLip/Hide/Off/Undo]:
CL<Spacebar>
Enter clipping option [Back/Front/Off] <Off>:B<Spacebar>
Specify distance from target or [set to Eye(camera)] <8'-3 5/8">: -6'
Some practical applications for DVIEW
SECURITY CAMERAS - Position DVIEW to your security
cameras. Set to the mm zoom lens and see your model exactly as you would see through
the lens of the security camera - before the building is built or the camera is purchased!
VIDEO CAMERAS - Create a "Viewfinder"
block with 3DFaces that is the same proportions as the camera view. Insert this
block into your drawing, then set up DVIEW using the center line in the block as your
TARGET and CAMERA.
Then, when you SHADE, you can see exactly what the camera would see.


|