Managing 3D Objects and Bitmaps:

Contents

Overview	ii

Copyright and trademark information	ii

Feedback	ii

Acknowledgments	ii

Modifications and updates	ii

Managing 3D Objects	1

Rotating 3D objects	1

3D effects	1

Managing Bitmaps	14

The Bitmap Image Toolbar	14

Bitmap Image Management Palette	15

Overview

This document describes the tools and functions that let you let you create powerful 3D drawings and work with bitmaps such as photographs.

Copyright and trademark information

The contents of this Documentation are subject to the Public Documentation License, Version 1.0 (the "License"); you may only use this Documentation if you comply with the terms of this License. A copy of the License is available at:
http://www.openoffice.org/licenses/PDL.rtf

The Original Documentation is Managing 3D Objects and Bitmaps. The Initial Writer(s) of the Original Documentation is/are Linda Worthington © 2004. All Rights Reserved. (Initial Writer contact(s):lindaw@openoffice.org. The Initial Writer contact(s) is to report errors in the documentation. For questions regarding how to use the software, subscribe to the Users Mail List and post your question there: http://support.openoffice.org/index.html.)

Portions created by: original French document written by Michel Pinquier, translated to English by Alex Thurgood and previous content revised by Jim Taylor. All trademarks within this guide belong to legitimate owners.

Feedback

Please direct any comments or suggestions about this document to:
authors@user-faq.openoffice.org.

Acknowledgments

Thanks to Daniel Carrera, Carol Leather and Jean Hollis Weber for reviewing this chapter.

Modifications and updates

Version	Date	Description of Change
1.0	21 November 2004	First published edition,

Managing 3D Objects

Even though OpenOffice.org does not claim to rival leading 3D image software packages, it contains a number of tools that let you create powerful 3D drawings.

Rotating 3D objects

Figure 1 - Rotation of a 3D object The rotation function also works with 3D objects, but differently from flat objects. Rotation acts in a three-dimensional space as shown in Figure 1.

For 3D objects, the axis of rotation is indicated by the symbol .

To do this	Do this
Rotate the object about the x-axis.	Move the left and right (edge) handles.
Rotate the object about the y-axis.	Move the top and bottom (edge) handles.
Rotate the object about the z-axis (the axis coming out of the page).	Move the corner handles.
Re-locate the axis of rotation.	Move the symbol.

3D effects

3D objects have their own configuration dialog. This dialog is called the 3D Controller or the 3D Effects dialog . Click on the button to display it (Main toolbar). The dialog contains several pages that can be selected through the buttons at the top. This chapter discusses each of these pages in turn.

Buttons available in pages

All of the pages have the following buttons:

	Convert a 2D object into a 3D object. This function is also available through the context menu Right-click > Convert > to 3D
	Create a 3D cone object.
	Activate or deactivate perspective display for the selected object.
	Do not apply the light and texture parameters to the selected object. Only apply 3D attributes.
	Apply all attributes to the selected object.
	Apply changes to the selected object.

Favorites page

The Favorites page lets you apply 3D attributes to any 3D object.

To apply a 3D attribute to a selected object, choose an example from the Favorites zone and click the button. (The objects laid out as an example are the same as those that are available through the Gallery, which is described later in this document.) Note that only the attributes are applied; no objects are transformed. For example, a circle will not turn into a torus if you click on the first image of the Favorites page, but it will receive the attributes of the torus, including the blue color.

If the selected object is not a 3D object, it is converted into one. The operation that converts a 2D object into a 3D object is called an extrusion.

To apply a 3D attribute, choose one of the attributes from the examples shown and click on .

This mechanism lets you create a variety of objects. Some examples are shown below.

As an example, this is how the circle above was created:

Draw a circle.

Go to Modify > Convert > To 3D to change the circle to 3D.

Geometry Management page

The Geometry Management page lets you define the geometric settings that are linked to a 3D object. To access this page, go to Format > 3D Effects > Geometry.

The Rounded edges parameter applies when you turn a 2D shape into a 3D shape. It defines the degree of rounding of edges during conversion, as shown in Figure 2.

(a)	(b)
Figure 2 - Rounded edges with
(a) 0% rounding and (b) 25% rounding

This parameter is particularly useful for texts that have been extruded into 3D shapes.

The Scaled depth will define the dimension ratio between the front face and the back face of the object. By default, the scale is set to 100%, which means that both faces will have the same dimensions. If you set the scaled depth to 50%, for example, with the cube above, you get the object shown in Figure 3.

Figure 3 - Scaled Depth of 50% Here you can see that the front face has a length and breadth that is 50% smaller than the back face. It is even possible to set the scaled depth to more than 100% and thus have a front face that is larger than the back face.

The Rotation angle parameter is useful for some shapes that are made by revolving a profile about an axis. This parameter lets you decide whether or not the rotation will be complete (360°). Figure 4 shows what you can obtain with a hemisphere and a value of 270°.

Figure 4 - Rotation Angle of 270° The Depth parameter lets you define the depth of a 2D object that has been transformed into a 3D object. This value can be changed at any time. The parameter doesn't apply to 3D primitives.

Figure 5 10 line segments (left) and
25 line segments (right). The two following parameters (Horizontal and Vertical segments) let you define the number of segments for the rounded shapes. The higher the number, the smoother the surface of the shape will be, but the longer it will take to display. In Figure 5, the left-hand sphere is made up of 10 horizontal and vertical segments, whereas the right-hand sphere is made up of 25 segments.

The five following buttons (called Normals) let you modify the normals of your 3D objects. A normal is a straight line that is directed perpendicularly across the surface of an object.

Note: Format > 3D > Geometry to access this menu.

Figure 6 shows a few normals drawn on a sphere with 10 segments.

Figure 6 - Object Normals Normals let you define the exterior aspect of an object and its interactions with textures and lighting. When you change the normal mode (also known as the projection mode), you act on the geometry of an object. Here's a description of the functions that act on normals.

	Corresponds to the projection mode illustrated above, wherein each of the faces is visible.
	Lets you create smooth surfaces. Where a sphere is concerned, we obtain a perfect sphere: Figure 7 - Sphere with smooth faces I have kept the normals drawn on the shape so that you'll remember that the faces are still present even if they can't be seen.
	Lets you choose the object-specific rendering that is best suited to the object.
	Lets you invert the normals. Since normals help you to define how an object is lit, you can simulate an interior lighting by inverting the normals. The following is an example of two cups. The first has the normals set to the default value and the second has the normals inverted: Figure 8 - Inverting normals The second cup seems to be lit from the interior.
	Double-sided illumination lets you light an object from the inside and outside.
	Lets you create double or single-sided 3D objects . When the extrusion function is used, the resulting objects are closed (for example, a square will give a cube). If you use this function, Draw will produce open objects. Here's an example of extruding an empty rectangle: Figure 9 - Single-sided object

Shading page

The Shading page covers the parameters linked to the shading of objects (such as shading type and shadow).

The Shading mode refers to the method that Draw uses to render objects and their interaction with light. Draw offers three choices: Flat, Phong and Gouraud.

Flat is the quickest technique, but it also gives the worst results (all of the faces are visible).

Phong is an intermediate technique.

Gouraud renders objects with the highest quality.

Figure 10 - Shading examples. From left to right: Flat, Phong, Gouraud. In the above drawing, flat shading (left) is clearly less attractive, whereas it is more difficult to distinguish between Phong (middle) and Gouraud shading (right). One might simply note that the shading appears to be more realistic with Gouraud shading than with Phong shading.

The shadow area of the dialog lets you display shadows under 3D objects. By changing the surface angle, you can obtain shadows that look more elongated or less elongated:

Figure 11 - 3D shadowing using a surface angle of 0° (left) and 45° (right). The first 3D sphere has a shadow with a surface angle of 0° (the paper is vertical) and the second has a surface angle of 45° (paper inclined at 45°).

You can also see that the shadow is displayed in such a way that it corresponds to the angle of illumination of the sphere.

The other parameters on this page let you define the focal length and distance of the virtual camera that displays the 3D object. The closer the camera (focal distance), the greater the effect of perspective. In Figure 12, the same box is shown on the right, but with a shorter focal distance for the one on the left:

Figure 12 - Examples of different focal lengths These two settings belong to the selected object(s). In general, it is better for these settings to be the same for all 3D objects in the drawing.

Illumination page

Use the Illumination page to define the way in which 3D objects are illuminated. Contrary to most 3D drawing software, the parameters can be set for each object independently of the others. However, in order for the drawing to be coherent, set these parameters the same way for all 3D objects.

This page lets you select 8 different light sources to illuminate the currently selected object. For each light source, you can specify its color and position with respect to the object.

In order to choose the current light source, use the buttons representing a small lightbulb. The bulbs that are lit correspond to an active light source and those that are not correspond to an inactive light source. Double-click on a button to active or deactivate the corresponding light source. A button that appears pressed down indicates the currently selected light source.

The color can be chosen from the dropdown list or by using the small button on the right of the list. The position of the light source is defined by moving the colored dot with the mouse or the slider bars on the small inset drawing located in the lower area of the page. Then click the button to implement the light source setting.

Texture Management page

The Texture Management page lets you manage the properties of a bitmap texture applied to an object.

Before using this page, we'll look at the two ways you can apply bitmapped images to an object.

Use the fill option and select a bitmap motif.

Use the Gallery. To apply a texture, first display the gallery (Tools > Gallery). Then drag and drop the motif with the mouse while pressing the Shift+Control keys.

Figure 13 - Applying a texture

The first method is better in that you can easily choose the number of tiles of the bitmap motif to be applied. To obtain the bitmap application settings dialog, select Format > Area and make your background edits there.

Figure 14 - Bitmap application settings

Figure 15 shows a few examples of what one can do by changing the default parameters when applying a bitmap to a cube.

Figure 15 - Examples of applying bitmaps Note: The checkbox Tiled in the dialog lets you specify whether you want the motif to be repeated (as in the cube top left) or not (as in the bottom right cube).

We have just seen how to change the number of tilings of the bitmap pattern. Now let's look at the method that Draw uses to project the image onto the object. This is done on the Texture Management page.

First, you can choose to project the image in black and white() or in color ().

The Mode chosen will tell Draw whether you want to manage lighting and shadow on the selected object. In Figure 16, the first sphere corresponds to the setting Only Texture and the second (more realistic) to the setting Texture and Shading.

Figure 16 - Example of texture settings The six following buttons (Projection X / Y) let you specify the type of projection used to draw the motif on the object. The settings on the X and Y axes are as follows: Object-Specific (), Parallel () and Circular (). Generally, the default setting of Object-Specific can be left as it is because it gives the best results.

Note: Format > 3D > Textures to access this menu.

Materials Management page

The Materials Management page concerns the use of materials on the surface of 3D objects. This page lets you give object the appearance of commonly used materials such as plastic or metal.

The drop down list Favorites lets you choose a predefined texture. The default choices are Metal, Gold, Chrome, Plastic and Wood (see Figure 17).

Figure 17 - Texture examples. From left to right:
Metal, Gold, Chrome, Plastic and Wood. The parameters that need to be defined are the default color of the object, lighting, and the color and intensity of the spot. The spot shows how the light reacts on the object.

Note that materials are compatible with textures. The use of materials generally lets you accentuate the effect of any applied textures.

Managing Bitmaps

Up to now, we have only dealt with vector drawings. Draw also includes functions for managing bitmaps, such as photographs.

We won't deal very much with the bitmap editing tools since other programs (such as The Gimp) have more advanced functionality.

The Bitmap Image Toolbar

When a bitmap image is selected in the workspace, a dedicated toolbar is displayed (Figure 18).

Figure 18 - Bitmap Image Toolbar Note: Any changes you make to a bitmap will change only a copy of the image file in your document. The original image will not be modified.

	The type of display for the image. The four options are: Default Grayscale: displays the bitmap with 256 levels of gray Monochrome: transforms the image into a black and white representation Watermark: fades the colors of the bitmap image to make it extremely pale
	These controls let you modify the level of each of the primary colors in the image. You can set each color level from –100% (no color) to +100% (full intensity).
	Adjust the brightness of the image. The parameter can be set from –100% (totally black) to +100% (totally white).
	Adjust the contrast of the image from –100% (least contrast) to +100% (most contrast).
	Adjust the gamma level from 0.10 to 10. This control lets you effectively set the monitor balance for an image created on one computer when the image is loaded on another computer.
	Adjust the transparency of the image from 0% (opaque) to 100% (totally transparent).
	Figure 19 - Cropping an image This tool lets you crop an image. When you click on this button, the dialog box shown in Figure 19 appears:
	The dialog in Figure 19 lets you do the following: Cut out a part of the contour of the image. To do this, just change the values in the Crop section (such as Left and Right). The preview display area show the new image frame. Change the scale of the image up to 100%. Change the size of the bitmap in the current measurement unit.

Bitmap Image Management Palette

The leftmost button on the bitmap toolbar lets you display and pick the bitmap filters. OpenOffice.org offers 10 filters.

	Inverts the colors in an image. The result looks like a color negative. This filter is useful for resetting the colors in a scanned negative.
	Smooths an image.
	Sharpens an image.
	Rids your image of noise pixels.
	Applies a solarization effect to an image. A dialog box lets you choose the degree of solarization for the image.
	Applies an aging effect to the image. You can set the degree of aging via a dialog box.
	The Posterize filter lets you reduce the number of colors in an image. You can choose the number of colors in the dialog box. The result is an image that looks a bit like a drawing.
	The pop art filter applies an effect that transforms the image into something resembling a pop art drawing:
	Simulates a charcoal drawing effect
	Applies a relief aspect to your image.
	The mosaic filter transforms the image into a pixellated mosaic.

There is a slight inconsistency between the bubble help that you get when the mouse crosses over the button and the actual name of the dialog when displayed.

In the online help, this button is called 'double-sided'.

Managing Bitmaps

Managing 3D Objects and Bitmaps	19

Title:	Managing 3D Objects and Bitmaps:
Version:	1.0
First edition:	November 2004

Overview

Managing 3D Objects and Bitmaps	xix

Managing 3D Objects and Bitmaps

2005-04-07T17:57:45