# Difference between revisions of "Documentation/OOo3 User Guides/Draw Guide/Working with 3D Objects"

This is Chapter 7 of the OpenOffice.org 3 Draw Guide, produced by the OOoAuthors group. A PDF of this chapter is available from this wiki page.

Although Draw does not match the functionality of leading drawing or picture editing programs, it is capable of producing and editing very good 3D drawings and pictures.

Draw offers two different types of 3D objects: 3D bodies and 3D shapes. Depending on which type you choose, there are different possibilities for further editing of the object (rotation, illumination, perspective). 3D shapes are simpler to set up and edit than 3D bodies, but 3D bodies currently allow for more customization.

## Creating 3D bodies

You can produce 3D bodies in three ways: extrusion, body rotation, and using ready made objects. In this chapter, these methods are called Variation 1, 2, and 3.

### Variation 1: Extrusion

First, draw one of the common Draw objects, for example a square/rectangle, circle/ellipse or a text box using the or icons on the Drawing toolbar. Next, choose Modify > Convert > To 3D (or right-click on the object and choose Convert > To 3D, or click the icon) to produce a 3D object from the 2D surface.

The icon is not usually visible on the Drawing toolbar. To make it visible, select Visible Buttons from the toolbar menu at the right-hand end of the toolbar and click on the icon to make it visible.

Extruding 3D objects from 2D surfaces

The procedure by which parallel surfaces are moved to create a 3D object is known as extrusion. In this case the 2D surface is moved forwards "out of" the drawing level. At the same time the object is slightly tilted and central projection turned on so that one can better recognize the object. Draw uses a default value for the extrusion (the body depth) based on the size of the 2D object. The value can be changed after the extrusion; see Editing 3D objects.

### Variation 2: Body rotation

Choose a common drawing object, for example a (non-black) line. Then change this into a rotation body. Draw provides two methods to do this.

Method 1. Click the icon in the Drawing toolbar (this icon is also usually not visible) or choose Modify > Convert > To 3D Rotation object. With this rotation method, the axis of rotation coincides with the left edge of the enclosing selection rectangle, through the green rectangle handles.

 Rotation body created using variation 2.1

Method 2. Click the icon on the Effects pulldown menu on the Drawing toolbar. This icon can also be accessed from the Mode menu, accessible from View > Toolbars > Mode. Notice that this icon lacks the curved red arrow of the fixed-axis rotation icon.

With this method, you can change the location of the rotation axis, which appears as a dotted line with two white circular endpoints.

Rotation body created using variation 2.2

Click one of the white endpoints and drag it so that the axis moves to the desired position. You may need to move both ends to achieve this. The outline shows how the figure will be rotated. When you click on the figure again, the rotation is carried out and the new 3D body is produced.

Use the 3D Objects toolbar/pulldown menu. To activate this toolbar, click View > Toolbars > 3D Objects).

' ' ' The 3D Objects toolbar' ' '

If you add the icon to the Drawing toolbar, the 3D Object bar will be available as a pulldown menu or as a floating toolbar.

After choosing the type of object, left-click on the starting point and drag the mouse diagonally until the outline of the object is the size you want.

After releasing the mouse button, the 3D object appears. To change the height:width ratio of the object, keep the Shift key pressed while dragging the mouse. Most of these objects are constructed by rotation. Cubes and spheres are special types of 3D objects that are directly defined in the OOo program code.

## 3D scenes

Variations 1-3 all produce a result known as a 3D scene. If you click on a 3D scene, the status bar text shows 3D scene selected. Such a scene is actually a group of objects.

If you constructed the scene using one of the above methods, it consists of the 3D body as a single element. 3D scenes can, however, be extended to include other 3D objects, as described in Combining objects in 3D scenes.

As mentioned in Chapter 6 (Editing Pictures), you can access individual elements of the group using Modify > Enter group or the context menu. The status bar text then changes and shows the type of each individual element selected, for example Sphere selected or Extrusion object selected.

## Producing 3D shapes

Since the release of Version 2.0 of OpenOffice.org, Draw contains a type of drawing object known as a Shape. A special method of extrusion exists for these shapes.

### Variation 4: Extrusion of shapes

[[Image:|thumb|Figure 5: The Basic Shapes toolbar]]

You use the Basic Shapes toolbar (or another shape toolbar) to produce 2D surfaces. Shapes such as cylinders or cubes are technically possible but not very useful, because they produce curiously curved images. If you have drawn a shape, the last icon [[Image:]] on the Drawing toolbar is active. A click on this icon can transform a 2D surface into a 3D object (see Figure 6).

Extrusion of a shape does not create a new object type but just changes the shape's appearance. All the objectâs properties and settings are retained. You can use this button to toggle between a 2D and a 3D view. The actual object properties and settings are not lost in the switching operation from one view to another.

[[Image:|thumb|<center>
Figure 6: 3D objects from basic shapes]]</center>

If you click on such an object, the 3D-Settings toolbar is available. If this is not automatically opened, switch it on with View > Toolbars > 3D-Settings.

[[Image:|thumb|<center>
Figure 7: 3D-Settings toolbar
]]</center>

The first icon [[Image:]] corresponds to the icon on the Drawing toolbar. This icon also works as a toggle switch. After changing to 2D, the 3D-Settings toolbar is again hidden. To change the object back to 3D, you must use the icon [[Image:]] on the Drawing toolbar.

### Variation 5: Fontwork

For text you can also use the shapes from the Fontwork Gallery. These produce a similar type of extrusion objects to those from Variation 4.

To open the Fontwork Gallery, use the icon [[Image:]] on the Drawing toolbar.

[[Image:|thumb|Figure 8: Extrusion Shapes from the Fontwork Gallery]]

# Editing 3D objects

## Rotating 3D objects

### Procedure for 3D bodies

The Rotation command used for 2D objects also works with 3D objects, but due to the additional axis, there are a few differences with the editing of 3D objects (see Figure 9). The procedure for selecting the object is identical to that used for a 2D object.

[[Image:|thumb|Figure 9: 3D object rotation]]

You can rotate the object about each axis (X,Y,Z). The X and Y axes are those parallel to the edges of the drawing layer, while the Z axis comes out of the page. It is not possible to change the axis orientation.

The three axes are not shown directly, but the [[Image:]] symbol indicates their intersection point.

You want to ...¦ You must ...
... rotate the object about the X or Y axis. ... put the mouse cursor over the object. With the left mouse key pressed you can now rotate the object as you wish. Moving one of the red points at the middle of an edge allows you to rotate the object about only one axis. Note that the cursor initially has the shape for a (2D) shearing movement but pressing the mouse button changes it to a rotation cursor.
... rotate the object about the Z axis. ... move the handle on one of the corner points with the left mouse button pressed. Rotation about the Z axis is independent of the setting of the rotation angle in the dialog Position and Size.
... move the axis intersection point. ... simply drag the Symbol [[Image:]] to the desired location. The point is located by default in the middle of the object.

These rotations can be carried out on a 3D scene as a whole or on individual objects within a 3D scene.

### Procedure for 3D shapes

Objects produced using variations 4 and 5 (see above) can only be rotated about the Z axis when using the three methods described in the previous section. This rotation is carried out on the underlying 2D object. It is also possible to rotate the 3D object in the same way as with a 2D object using Format > Position and Size > Rotation (shortcut key for Position and Size is F4) and specifying the pivot point location and the number of degrees of rotation desired.

Shape objects have their own procedure for rotation about the X and Y axes. If you have activated the 3D-Settings toolbar (under View > Toolbars), this becomes active when you select the 3D object; icons 2 to 5 on this toolbar (see Figure 10) rotate the object in 5 degree increments about the X and Y axes.

[[Image:|thumb|Figure 10: 3D-Settings toolbar with rotation icons indicated]]

## 3D settings for 3D bodies

### 3D Effects dialog — general buttons

The 3D Effects dialog offers a wide range of possible settings for 3D objects produced with variations 1 to 3 (see previous sections). To open the dialog, right-click on the object and choose 3D Effects from the pop-up menu. You can also activate a 3D Effects icon [[Image:]] on the Standard toolbar or add it to another toolbar using Customize Toolbar > Add > Category Options > 3D Effects.

The dialog can be docked in a similar manner to the Navigator or Template windows.

The possible settings are arranged in various thematic categories on separate pages, accessible through the buttons at the top of the window, which act in a similar way to tabs. To apply the settings you have altered, click the Assign button [[Image:]]. This applies all the changes you have made to the object on the other pages of the dialog as well as the current one.

[[Image:|thumb|Figure 11: Upper part of the 3D Effects dialog]]

Template:Documentation/Note In order for the Effects dialog to take over all the current properties of the object, you must click the [[Image:]] button. If you deactivate this button before you leave an object and click on it again when you open the Effects dialog for another object, the settings are carried over from the first object to the second object. You can use this to transfer favorite settings from one object to another, as all the settings are brought over to the new object. In normal use, however, the icon should be left activated.

At the bottom left of the dialog is another row of buttons (see Figure 12), which are available on each page.

[[Image:|thumb|<center>
Figure 12: Buttons for geometric transformations]]</center>

The first two buttons correspond to the menu commands Modify > Convert > To 3D / To 3D Rotation Object. When the Effects dialog for a 3D object is called up, these buttons are inactive. The third icon switches on or off a perspective view of the object.

 [[Image:]] Converts the selected 2D object to an extrusion body. [[Image:]] Converts the selected 2D object to a rotation body. [[Image:]] Switches between a central projection and a perspective projection.

With a central projection parallel edges are shown as meeting at some common point in the distance, as shown on the button symbol. Parallel projection retains all parallel edges as parallel, as is often used to produce oblique figures in school. The switching process is carried out on the entire 3D scene.

With central projection (see Figure 13), Draw creates the object with three vanishing points. The parameters for central projection are set (indirectly) through the camera settings on the Shading dialog page.

[[Image:|thumb|Figure 13: Figure shown using central projection. For clarity the projection lines have been added.]]

### 3D Effects - Geometry

On the Geometry page, you can make changes to the geometry of a 3D object. This page is opened with the Geometry button [[Image:]] in the upper part of the 3D Effects dialog.

[[Image:|thumb|Figure 14: Geometry page]]

In the first example, the depth (length) of a body is to be changed. This is possible only if you created it through extrusion. To illustrate: draw a circle and convert it according to Variation 1 into a 3D object (a flat cylinder); see Figure 15 a and b.

If necessary, select the cylinder, open the 3D Effects dialog, make sure the Geometry page is active, change the parameter Depth to 3.5cm and click on the Assign icon [[Image:]]. The cylinder should now resemble the figure in Figure 15c.

[[Image:|thumb|Figure 15: Conversion by extrusion of a 2D object (a) into a 3D object (b) and then changing its depth (c)]]

This parameter has no effect on a rotation body or on ready-made 3D objects, although the input field remains active.

With the Rounding parameter you can specify how strongly the edges of the 3D object are rounded. Select (if necessary) the lengthened cylinder again and use the 3D Effects dialog to change the rounding to 30%. The cylinder should now resemble that in Figure 16.

[[Image:|thumb|Figure 16: Edge rounding of 10% (a) and 30% (b)]]

This parameter also has interesting effects when you convert text into a 3D object.

The Scaled Depth parameter sets the size ratio of the front to the back for a 3D object produced by extrusion. The front side of such an object always protrudes out from the original surface; the rear side is the original surface of the 2D object (that is, the 2D exit surface) even if the object has been rotated in the meantime.

By default the scaling is set to 100%, which results in both surfaces being scaled by the same amount. If you set this scaling to 50% the cylinder becomes a truncated cone (see Figure 17).

[[Image:|thumb|<center>
Figure 17: Cylinder with 50% scaling]]</center>

The diameter of the front side is 50% that of the rear side. It is also possible to create the reverse effect, with the rear side smaller than the front, by using a scaling depth greater than 100%.

With rotation bodies this parameter influences the width of the surface parallel to the axis of rotation. At the end of the rotation the surface width of the figure is given by the scaling depth. The distance to the rotation axis remains unchanged. In Figure 18 a line is rotated to create a 3D object with a scaling depth figure of 0%.

[[Image:|thumb|<center>
Figure 18: Scaling depth of a rotation body]]</center>

The Rotation Angle parameter is only available for rotation bodies. With this parameter you can create a segment of a complete rotation body by choosing an angle less than 360 degrees. Figure 19 shows a hemisphere with a rotation angle of 270Â°.

[[Image:|thumb|<center>
Figure 19: Hemisphere with a rotation angle of 270Â°]]</center>

The Horizontal and Vertical Segments parameters define the number of segments out of which Draw builds spheres and rotation objects[1]. For rotation objects, the horizontal segments are more important. The vertical segments influence the degree of edge rounding.

In Figure 20 the left sphere is made up of 10 horizontal and vertical segments while the right sphere has 25 segments. More segments give a smoother surface, but it will take longer to generate the figure on the screen. By default, spheres and hemispheres are constructed with 24 segments. For a square pyramid you need four horizontal segments.

[[Image:|thumb|<center>
Figure 20: Sphere from 10 segments (left) and 25 segments (right)]]</center>

These are properties belonging to individual objects. If you use the setting for segments on a 3D scene, all the objects contained in the scene are modified accordingly.

If you extrude an unfilled circle or intersecting lines with a filling the result may not be what you expect. In this case the Double-Sided [[Image:]] tool, on the lower part of the dialog page, may be able to help. It changes the line properties of an object from invisible to continuous and so enables all edges to be seen. Otherwise it may happen that some surfaces receive no filling (see Figure 21). For lines without filling the effect is switched on by default and cannot be switched off. This is also a property of single objects.

Figure 21: Left: without "Double-Sided"

Middle: with continuous lines but without "Double-Sided"

Right: with "Double-Sided"

Use the buttons in the section Normals to modify the normals of a 3D object.

A Normal is a straight line which is perpendicular to the surface of an object (in the same way that a vector, starting from an inner point and extending outwards, is at right angles to the surface of the object at the point where it exits). Figure 22 shows some normals extending outwards from a sphere made up of 10 segments.

[[Image:|thumb|<center>
Figure 22: Normals (vectors) of a 3D sphere with 10 segments]]</center>

Using normals, the display of the object surface and the variation in colors, textures and lighting can be controlled, influencing directly how the surface of the object is rendered.

The first three icons in Figure 14) work as "either-or" switches. Only one of the effects can be active at a given time; an effect can be switched off by clicking on one of the other icons.

The settings belong to individual objects, not scenes; every object can have its own setting. The rest of the icons are normal toggle "on-off" switches. The following effects are available:

 [[Image:]] Object specific: The object is rendered to produce the best result independent of its shape. Single segments are changed but their âedgesâ will hardly be visible. [[Image:]] Flat: The surface of the 3D object will be divided into single polygons, whose edges are clearly recognizable. Every polygon is generated with a uniform color. [[Image:]] Spherical: The enclosing sphere is calculated for the object and then projected onto the object. This form of calculation produces an object with a smoother surface; the edges of individual segments are more smoothly rounded than with the Object-specific effect (see Figure 23). However surfaces that meet at a point do not show a realistic lighting effect. [[Image:]] Invert Normals: This results in a reversal of the lighting direction. The inside of the body then becomes the outside. This property is particular to each individual object. [[Image:]] Double sided illumination: The lighting is also computed for the inside of the object. In other cases the lighting value for the outside is simply transferred to the inner side. This property is of interest for open objects. It is a property of the 3D scene and affects all objects in the scene.
[[Image:|thumb|<center>
Figure 23: Cylinder with 10 segments a= Object-specific b=Flat, c=Spherical]]</center>

The following table shows the linkage between double-sided illumination and inverted normals.

 The light source is on the right. Normalsnot inverted Normals inverted No double sided illumination [[Image:]] [[Image:]] With double sided illumination [[Image:]] [[Image:]]

Shading is a rendering method involving a consideration of lighting ratios, which is used to produce curved 3D surfaces. The surfaces are broken down into small triangular segments. Draw offers three methods to produce this effect: Flat, Phong and Gouraud. The setting selected applies to all objects in the 3D scene.

• Flat is the fastest and simplest method. For every individual segment a special color tone is determined, based on the lighting ratio and the direction of the segment area. This tone is used for the whole area of the segment. The segmentation is clearly visible.
• Phong is the most time-consuming method. With this method, for each pixel the associated normal is determined by interpolation, based on the normals of the segment edges. This causes the segment area to appear curved and the segment intersections are no longer visible.
[[Image:|thumb|<center>
• Gouraud is a relatively quick method. It determines the color value for the segment corners and calculates the color value for every pixel through linear interpolation. The segment edges are still recognizable, but importantly are less so than with the flat method. The Gouraud method considers only light reflection on diffuse, reflecting surfaces (dispersal).
[[Image:|thumb|<center>
Figure 25: Flat, Phong and Gouraud shading]]</center>

In Figure 25 the left sphere was rendered with flat shading, the middle with Phong and the right with Gouraud. The quality of the flat method is clearly inferior to the other two. The difference between Phong and Gouraud is small. With the Gouraud method the segments can be very faintly seen and rendered objects have a slightly less âshineâ than with the Phong method.

All three methods function at the pixel level and as such, shadowing and mirroring inside the 3D scene is not possible in the way that ray tracing methods permit.

With the the Shadow button [[Image:]] you can provide a 3D object with a shadow. By changing the Surface angle you can influence the form of the shadow (see Figure 26). The left sphere has a surface angle of 0Â° (the paper represents a perpendicular surface behind the object) while the right sphere has a surface angle of 45Â°. With 90Â° the paper would be directly under the object.

[[Image:|thumb|<center>
Figure 26: Shadows using different surface angles]]</center>

The shape and size of the the shadow are also influenced by the lighting properties. These can be adjusted on the Illumination page of the dialog. Multiple light sources for shadows are not yet supported. The shadow properties can be set for individual objects in a drawing but where objects form part of a 3D scene, the shadow produced is that of the entire scene.

It is possible to set the shadow property for single objects using the Area property. The shadow is then shown with the color selected in the shadow dialog, but again the representation of the lighting of the scene determines the end result of the entire scene. In this way, colored shadows, with different distances to the object, and different color and transparency effects can be created.

In the Camera field of the shading dialog the settings of the virtual camera can be changed. These settings relate only to the view in central projection and apply to the entire 3D scene. The Distance parameter is used to adjust the spacing between the camera and scene. The default value for an extruded body is equal to the depth or length of the body. With equal length edges front and rear, the effect at large distances is quite small. The standard value of Focal length is 10cm. It has the same significance as with a real camera. Larger focal lengths simulate a telephoto lens, smaller ones a wide-angle lens. The effect that changes in the camera settings have on an object are shown in Figure 27.

[[Image:|thumb|Figure 27: Effect of camera settings]]

Picture a shows a 3D object with the standard settings. The individual changes are listed in the following table.

 a b c d Distance: 0.81 cm 3.81 cm 0.81 cm 0.81 cm Focal length: 10 cm 10 cm 5 cm 15 cm

### 3D Effects - Illumination

On the Illumination page (see Figure 28) you define how a 3D object is lit. The settings apply to all objects in a scene.

[[Image:|thumb|<center>
Figure 28: Illumination (lighting) page]]</center>

You can light a scene with a maximum of eight individual Light sources at the same time. For each of these sources the light color and position relative to the scene can be set. The light sources are represented by eight small light bulbs. When you select this page, the first bulb "lights up" [[Image:]]. At least one light source must be active; otherwise, the rendering and shading functions cannot function correctly.

Each symbol functions like a multi-function press switch. With the first mouse click the bulb is selected and with the second click the settings mode for this light source is activated (see Figure 29). A third click deactivates the light source.

[[Image:|thumb|Figure 29: Adjustment of light source]]

In the selection list next to the symbols you can choose the color of the active light source. If desired, click the [[Image:]] button to open a color palette dialog, where you can define your own color and also adjust the brightness. For the first light source, it is best to retain the neutral color value (default is white); with several light sources it is advisable to reduce the brightness.

In the lower right corner of the menu the light source location and orientation is depicted. With the vertical slider bar you can adjust the lighting angle; with the horizontal bar the light is rotated about the object. Alternatively you can click on the light point and drag the point as you please (see Figure 30). Click on the small square in the bottom right (circled) to change the preview image from a sphere to a cube.

[[Image:|thumb|Figure 30: Moving the light source]]

To apply the changed settings to the selected object, click on the the Assign button [[Image:]].

The use of additional light sources can result in some interesting effects.

[[Image:|thumb|Figure 31: Lighting with three independent light sources]]

In Figure 31 the ring has the lighting settings from Figure 30 with the standard color white. In addition it was lit with magenta, and also from the left underside with yellow. The number and position of the light sources is shown in the window at the lower right. The three light sources in use can be recognized by the "lit" symbols [[Image:]].

To see the effect of a particular lighting effect you can also temporarily turn it off. With an object selected, clicking on a "lit" symbol turns it off [[Image:]]. This new setting must then be applied (assigned) to the scene. With a further mouse click on the light source the effect can be switched back on and then re-assigned.

You can also change the settings for the Ambient lighting. The selection of properties (lighting color, brightness, and so on) is carried out in same way as for light sources.

### 3D Effects - Textures

Textures are raster graphics (bitmaps) which can be used as an object property for the surface of an object. Every object in a 3D scene can have its own texture.

You can set a raster graphic as a texture for a 3D object in the same way as for a 2D object (Format > Area > Bitmaps or right-click on the object > Area > Bitmaps) â as is the case for Gradient and Hatching. More details are found in Chapter 4 (Changing Object Attributes).

If the Fill setting on the Area dialog is Color, then the Texture page is inactive. Change it to Bitmap to activate the Texture page for 3D objects. If the texture is not tiled or stretched and is smaller than the object, then the remainder of the area will have the color of the Object color property on the Material page.

[[Image:|thumb|Figure 32: Textures page]]

In the first row of the page (Figure 32) are two switches (Type) with which you can choose between black and white or color for the texture (see Figure 33).

[[Image:|thumb|Figure 33: a - standard color setting, b - texture (color), c - texture (black and white)]]

With the two switches in the row Mode you can control whether the texture of the selected objects is rendered with light and shadows (Switch 2) or not (Switch 1); see Figure 34. By means of appropriate lighting and shading adjustments, the graphic object is more realistically rendered.

[[Image:|thumb|<center>
Figure 34: Texture without (a) and with (b) lighting and shadow effects]]</center>

Projection X / Y

With one of the three buttons you can determine how the texture for this coordinate axis should be projected onto the object. The default setting, Object specific, in general gives the best result. Examples of the use of each button are shown below.

 [[Image:]] Object specific The texture is automatically adjusted to best fit with the form and size of the object. [[Image:]] Parallel The texture is projected parallel to the axis of the object. It is mirrored on the rear side of the object. [[Image:]] Circular The axis of the texture pattern is wrapped around the object.

For a rotation body, the turning axis is the Z axis and the wrapping is the X direction; for an extrusion body, the extrusion direction is the Z axis and the extruded surface is the X direction. Depending on how the object was produced, different positions of the texture result.

[[Image:|thumb|{| style="border-spacing:0;" | style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| <center>Area fill without tiling, with adjustments
| style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection X
| style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection X
Projection X
|- | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection Y
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"|
|- | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection Y
(Difference is small)
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Front and rear side
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"|
|} Figure 35: Cylinder as a rotation body]]</center> [[Image:|thumb|{| style="border-spacing:0;" | style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| Area fill without tiling, with adjustments | style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection X
| style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection X
Projection X
|- | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection Y
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"| |- | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"|
Projection Y
(Difference is small) | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| Upper and under sides | style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"| |} Figure 36: Cylinder as an extrusion object]]

The Filter button [[Image:]] switches on and off a soft-focus filter. It can often remove slight faults and errors in the texture.

### 3D Effects - Material

On this page you can assign the appearance of different materials to the 3D object.

In the selection list under Favorites are the most commonly used materials (see Figure 38).

[[Image:|thumb|Figure 38: The favorites (from left to right): Metal, Gold, Chrome, Plastic and Wood]]

With the individual color parameters, additional effects can be produced. The meaning of these parameters corresponds to those on the Illumination dialog page.

Materials and textures can be combined with one another. Settings only simulate materials and it is sometimes a matter of trial and error to achieve the desired result.

 The Illumination color brightens those parts of the object which lie in shadow making the body seem more illuminated. When textures are used as well, the Illumination color is combined with the white color part of the texture. On the left the object has a black Illumination color, on the right bright green. [[Image:]][[Image:]] The Specular color simulates the reflecting capacity of the surface. The position of the illuminated point is determined by the setting of the first light source. Left: Set the Specular color the same as the object color and the illumination point intensity to a low value, in order to give the impression of a matt body. Right: Set the Illumination point color the same as the light source color, in order to give a shiny appearance to the object surface. [[Image:]] [[Image:]]

Metallic surfaces and glass are not so well simulated, because the impression of these materials is produced through reflection. Such simulation cannot (at the moment) be calculated by OpenOffice.org.

## 3D settings for 3D shapes

3D shapes are handled quite differently from objects in 3D scenes. The appearance of a shape object is changed using the 3D-Settings toolbar (see Figure 39). The 3D Effects dialog described above should not be used for shape objects as it will not give the correct formatting results.

[[Image:|thumb|Figure 39: 3D-Settings toolbar, indicating icons for formatting 3D shapes]]

If you have used it in error, you can remove the incorrect formatting with Format > Default Formatting.

With the buttons on this toolbar you can adjust the extrusion depth and perspective, lighting and material properties as well as the extrusion color. There are tear-off bars, which you open by clicking on the small black triangle. The purpose of each individual button is described by its tool tip. You do not need to assign the result of any of the functions to the object as you do with the 3D Effects dialog used with 3D scenes; every action is immediately applied and you can see its effect on the object in the main Draw window.

Template:Documentation/Note Here are some examples of formatting of 3D shapes:

 [[Image:]][[Image:]] Depth [[Image:]] left: 0.3cm (user defined) right: 1cm (selection) [[Image:]] [[Image:]][[Image:]] Direction [[Image:]] The examples show âcolumnsâ at right angles to the drawing surface. left: 5 cm depth, Parallel projection Middle: 10 cm depth, Perspective right: Infinity, Perspective [[Image:]][[Image:]][[Image:]] Illumination [[Image:]] The light color cannot be changed, the brightness can be changed only in three levels, and some effects may not be totally correctly rendered. left: from left under, dim middle: from left under, bright right: from right under, normal [[Image:]][[Image:]] Surface [[Image:]] Only four built-in variations are possible. At present only Wireframe and Matt are correctly rendered. left: Wireframeright: Matt You can also choose a gradient, hatching, or bitmap for the surface; these are only applied to the extruded surfaceâthe sides remain in the color of the object. [[Image:]] [[Image:]] 3D Color [[Image:]] Here you can choose the color of the sides of the extruded surface. The symbol shows the color of the most recently chosen shape object.

# Combining objects in 3D scenes

3D objects produced by extrusion or rotation are shown in the status bar as a 3D scene. You can group together several of these objects. Other object types cannot be so grouped. Management of the group is carried out in the same way as described in other parts of this guide (Modify > Enter Group, or Modify > Exit Group), see also âGrouping Objectsâ in Chapter 5 (Combining Multiple Objects).

As an example, we will produce a game piece.

 [[Image:]] First produce both objects independently of each other. The subsequent combination is made easier if you use parallel projection and rotate the objects into an upright, straight position. [[Image:]] Click on the sphere and use Edit > Copy to take over the scene and put the sphere on the clipboard. If you are sure that you do not need the original anymore you can use Edit > Cut. In any case move the sphere a little to the side. [[Image:]] Click now on the cone. The status bar will show 3D Scene selected. Right-click and enter the group. You will see that, as usual, elements that do not belong to the group are less bright. Use Edit > Paste. Now the objects (not the whole scene) from the clipboard are pasted into this scene. [[Image:]] The original position of the sphere now contains a new sphere that belongs to the scene. This new sphere can be dragged over to the cone. Exit the group after moving the sphere. [[Image:]] Notice that combining 3D objects results in them being more or less âfusedâ together â there is no stacking or layering as with 2D objects. Adjust the position of the objects as you wish. You cannot arrange objects in front or behind others, as with 2D objects, but can only move them parallel to the drawing plane. [[Image:]] Enter the group again and adjust the objects. The status bar indicates which object is marked. Use the Tab key to change from one object to the next in the group, if it is not possible to do so with the mouse. Exit the group. [[Image:]] [[Image:]] Now you can rotate the entire 3D scene and view your game piece from all sides.

## Examples for your own experiments

All examples use objects in 3D scenes.

 Hello Jean Extruding a 2D object with text generates letters as separate objects and they have a larger extrusion depth than the background. [[Image:]] [[Image:]] 3D objects of the Shape type can be rendered as wireframe models. This effect can be produced in other 3D objects by setting the Area fill to None and the line style to Continuous. [[Image:]] [[Image:]] If you select several 2D objectsâwithout grouping themâand extrude the selection, they are transformed, according to their stacking order, with different extrusion depths. The object previously on top will be uppermost on the extruded object. [[Image:]] [[Image:]] For 2D objects use Modify > Shapes > Merge/Subtract/Intersect to produce complex objects. The resulting figures can be also extruded, rotated and so on. [[Image:]] [[Image:]] Rotation of lines produces concave bodies. Use a bright line color. With a high number of vertical segments, the transition to the ground is relatively sharp-edged. Remember to switch on two-sided illumination. [[Image:]] The transparency of the platter is adjusted in the surface properties of the body. The best effect is obtained only when the transparent body is combined with other objects. The color shadow of the fruit is produced by the use of multiple light sources â they are not ârealâ and do not rotate and change as the scene is rotated.

1. To reduce both calculation time and data storage, circles are often constructed as regular polygons. If you cut a sphere or cylinder of 10 segments through the middle you end up with a 20-cornered cut section (10-cornered for a hemisphere).