Difference between revisions of "Documentation/OOoAuthors User Manual/Draw Guide/Working with 3D Objects"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Dialog page - Material)
(3D settings for 3D-Shapes)
Line 431: Line 431:
  
 
== 3D settings for 3D-Shapes ==
 
== 3D settings for 3D-Shapes ==
The appearance of the shape object is changed using the ''3D Settings'' toolbar (see Figure 40). The concept is totally different from that presented above for objects in 3D scenes. The dialog ''3D Effects'' described above should not be used for shape objects and will in fact not give the correct formatting results when used on a shape object.  
+
The appearance of the shape object is changed using the ''3D Settings'' toolbar (see Figure 8). The concept is totally different from that presented above for objects in 3D scenes. The dialog ''3D Effects'' described above should not be used for shape objects and will in fact not give the correct formatting results when used on a shape object.  
 
+
[[Image:|]]<br> ''Figure 40: 3D Settings Toolbar''
+
  
 
In case you use it in error, you can remove the incorrect formatting with '''Format > Default Formatting'''.
 
In case you use it in error, you can remove the incorrect formatting with '''Format > Default Formatting'''.

Revision as of 03:46, 12 January 2008

Template:Documentation/BeingEdited This is Chapter 7 of OpenOffice.org 2.x Draw Guide (second edition), produced by the OOoAuthors group. A PDF of this chapter is available from the OOoAuthors Guides page at OpenOffice.org.

<< User Manuals page
<< Draw Guide Table of Contents
<< Chapter 6 Editing Pictures   |   Chapter 8 Tips and Tricks >>

Creating 3D objects

Although OpenOffice.org does not match the functionality of the leading drawing or picture editing programs, it certainly offers a wide array of tools and methods to produce and edit very good 3D drawings and pictures.

Draw can render drawings using internal routines or it can use the OpenGL libraries if they are installed. The use of OpenGL can be switched on or off under Tools > Options > OpenOffice.org > View (see Figure 1).

Open GL option
Figure 1: Open GL option

Draw offers two different types of 3D objects: the ones carried forward from OOo version 1, 3D bodies, and the ones newly introduced in version 2, 3D shapes. Depending on which type has been chosen there are different possibilities for further editing of the object (rotation, illumination, perspective). Setting up and editing 3D shapes is simpler with 3D shapes than with 3D bodies, but the latter currently allows for more customizing than 3D shapes.

Creating 3D bodies

You can produce 3D bodies in several different ways: extrusion, body rotation, and using ready made objects.

Variation 1: Extrusion

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

The [[Image:]] icon is not usually visible on the Draw 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
Figure 2: 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. There are two methods available in Draw to do this:

  1. Click the icon [[Image:]] in the Draw toolbar (this icon is also usually not visible) or choose Modify > Convert > To 3D Rotation object. With this rotation method, the axis of rotation lies always on the left edge of the enclosing rectangle, through the green rectangle handles.

[[Image:|]]
Figure 3: Rotation body created using variation 2.1

  1. Click the icon [[Image:]] on the pulldown menu Effects on the Draw toolbar. Watch out – this icon has no large red arrow. The same icon can be accessed from the tearoff menu Mode, opened with View >Toolbars> Mode.
    This method allows you to change the location of the rotation axis.

Rotation body created using variation 2.2
Figure 4: Rotation body created using variation 2.2

Click one of the white endpoints with the mouse 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 will be carried out and the new 3D body produced.

Variation 3: Using ready made objects

Use the 3D Objects toolbar/pulldown menu – to activate this toolbar click View > Toolbars > 3D Objects; see Figure 5.

[[Image:|]]
Figure 5: The 3D Objects toolbar

If you add the icon [[Image:]] to the Draw 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 will appear. If you keep the Shift key pressed while dragging the mouse, you can change the height:width ratio of the object. These objects are constructed as rotation objects. Cubes and spheres are special types of 3D objects which are directly defined in the OOo program code.

3D Scenes

The above variations 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.

As mentioned in Chapter 6, you can access individual elements of the group from Modify > Enter group or the context menu. The status bar text will then change and show the type of each individual element selected, for example “Sphere selected”, “Extrusion object selected”.

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

Producing 3D shapes

With the release of Version 2.0 of OpenOffice.org, Draw contains a new type of drawing object – Shapes. A special method of extrusion exists for these shapes.

Variation 4: Extrusion of Shapes

[[Image:|]]
Figure 6: The Basic Shapes toolbar

You use the standard 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 of the Draw toolbar ([[Image:]]) will be active. A click on this icon can transform a 2D surface into a 3D object (see Figure 7).

If this icon is active, it changes the object view to 3D. Actually it does not create a new object type but changes only the appearance. With the same button you can also go back to a 2D view. It is a switch allowing both types of views to be shown. The actual object properties and settings are not lost in the switching operation from one view to another.

3D objects from basic shapes
Figure 7: 3D objects from basic shapes

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:|]]
Figure 8: 3D-Settings Toolbar

The first icon [[Image:]] corresponds to the icon on the Draw Toolbar. This icon also works as a switch. After changing to 2D, the 3D-Settings Toolbar is again hidden. To change the object again to 3D, you must use the icon [[Image:]] on the Draw 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. The Fontwork Gallery is opened with the icon [[Image:]] on the Draw Toolbar (see Figure 9).

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

Draw objects of the type “Shape” cannot be viewed with OpenOffice.org Version 1.x. They are simply missing from the drawing. If you save a document with extruded shapes in the older *.sxw format, the shapes will be converted to 3D scenes.

Editing 3D objects

Rotating 3D objects

Procedure for 3D bodies

With the Rotation command used for 2D objects, you can also edit 3D objects. Due to the additional axis, there are a few differences with the editing of 3D objects (see Figure 10). The selection of the object is identical to that used for a 2D object.

3D object rotation
Figure 10: 3D object rotation

You can rotate the object about each axis (X,Y,Z). The X and Y axes are 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 themselves are not shown directly, but the [[Image:]] symbol indicates the intersection point of all three axes.


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 shows the cursor 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 either on the 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 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 (as with 2D) object using Format > Position and Size > Rotation (shortcut key for Position and Size is F4) and giving in 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 will become active when you select the 3D object, and icons 2 to 5 on this toolbar (see Figure 8) rotate the object in 5 degree increments about the X and Y axes.

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 such a 3D 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. The buttons at the top of the window serve to bring up the appropriate dialog pages. In order to apply the settings you have altered on a dialog page it is necessary to click the Assign [[Image:]] button. This will apply all the changes you have made – on the current as well as on other pages of the dialog window – to the object.

Upper part of the 3D Effects dialog
Figure 11: Upper part of the 3D Effects dialog

Template:Documentation/Note

So that the Effects dialog can 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 as a sort of a transfer of “favorite” settings from one object to another as all the settings are brought over to the other object. In normal use, however, the icon should be left activated.

In the lower area of the dialog you will find another row of buttons (see Figure 12), which are available on each page of the dialog.

Buttons for geometric transformations
Figure 12: Buttons for geometric transformations

The first two buttons correspond to the menu commands Modify > Convert > To 3D / To 3D Rotation Object. When the 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 produces the object with three vanishing points. The parameters for central projection are set indirectly through the camera settings on the dialog page Shading.

Using central projection
Figure 13: Figure shown using central projection. For clarity the projection lines have been added.

Dialog page - Geometry

On this page (see Figure 14) 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.

The Geometry page
Figure 14: The Geometry page

In the first example, the depth (length) of a body is to be changed. This only makes sense if you created it through extrusion. Draw a circle and convert it according to variation 1 above into a 3D object (a flat cylinder) – see Figure 15 a and b.

If necessary, select the cylinder, change the parameter Depth to 3.5cm and click on the Assign icon [[Image:]]. The cylinder should now resemble the figure in Figure 15 c.

Conversion of a 2D object
Figure 15: Conversion of a 2D object (a) into a 3D object (b) and then changing its depth (c)

This parameter cannot be applied to a rotation body or one of the ready made 3D objects.

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

Edge rounding
Figure 16: Edge rounding of 0% (a) and 30% (b)

This parameter is also interesting if you convert text into a 3D object. The rounding process works also on objects which have been extruded.

The parameter Scaled Depth sets the ratio of the size of the front to that of the back of a 3D object produced using extrusion. The front side of a 3D object produced by extrusion 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 in the meantime been rotated.

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 the frustrum of a cone (see Figure 17).

Cylinder with 50% scaling
Figure 17: Cylinder with 50% scaling

The diameter of the front side is 50% that of the corresponding rear side. It is of course also possible to create the reverse effect, with the rear side smaller than the front side, by using a value of 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 is the figure 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%.

Scaling depth of a rotation body
Figure 18: Scaling depth of a rotation body

The parameter Rotation Angle 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°.

Hemisphere with a rotation angle of 270°
Figure 19: Hemisphere with a rotation angle of 270°

The parameters Horizontal and Vertical Segments define the number of segments out of which Draw builds spheres and rotation objects[1]. With rotation objects the horizontal segments are of more importance. The vertical segments have an influence on the degree of edge rounding.

In Figure 20 the left sphere is made up from 10 horizontal and vertical segments while the right sphere has 25 segments. The more segments you choose the smoother the surface will be 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.

Sphere from 10 segments (left) and 25 segments (right)
Figure 20: Sphere from 10 segments (left) and 25 segments (right)

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 is probably not what you expect. In this case the Double-Sided [[Image:]] tool, on the lower part of the dialog page, may be able to help. The effect becomes clear when one 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.

DG7-21.png
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 inner 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.

Normals (vectors) of a 3D sphere
Figure 22: Normals (vectors) of a 3D sphere with 10 segments

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

The three icons in the first row 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 setting is associated with an individual object – every object can have its own setting. The rest of the icons are “normal” On-Off switches. The following effects are available:


[[Image:]] Object specific: The object is so rendered, that independent of its shape the best result is generated. Single segments will not be changed but their “edges” will be hardly 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 will be 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 above (see Figure 23). Surfaces which meet at a point do not have 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 will also be 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 effects all objects in the scene.

Cylinder with 10 segments
Figure 23: Cylinder with 10 segments a= Object-specific b=Flat, c=Spherical

The following table shows the linkage between Double sided illumination and Invert Normals.


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

Dialog page - Shading

This dialog page (see Figure 24) offers functions for shading of the object surface, addition of shadows and “camera settings”.

DG7-24.png
Figure 24: The Shading dialog page

Shading is the rendering method, involving a consideration of the 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 will apply to all objects in the 3D scene.

  • Flat is the fastest and simplest method. For every individual segment a special color tone will be 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 second most time consuming method. With this method, every pixel of the normals associated with the normal of a segment edge are determined by interpolation. This causes the segment area to appear curved and the segment intersections are no longer visible.
  • 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).

Flat, Phong and Gouraud shading
Figure 25: Flat, Phong and Gouraud shading

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 different 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 button Shadow [[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 lies at right angles behind the object – while the right sphere has a surface angle of 45°. With 90° the paper would be directly under the object.

Shadows using different surface angles
Figure 26: Shadows using different surface angles

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

It is possible to set the shadow property for single objects using the property “Area”. The shadow will then be shown with the color selected in the shadow dialog, however again the representation of the lighting of the scene will determine the end result of the entire scene. In this way, colored shadows, with different distance to the object, color and transparency effects are possible.

In the field Camera 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. With the Distance parameter the spacing between the camera and scene is adjusted. The default value for an extruded body is equal to the predetermined depth. 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 an ordinary camera. Larger focal lengths work like a telephoto lens, smaller like a wide angle lens. The effect that changes in the camera settings have on an object are shown in Figure 27.

Effect of camera settings
Figure 27: Effect of camera settings

Picture a shows the 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

Dialog page - Illumination

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

Illumination (lighting) dialog
Figure 28: Illumination (lighting) dialog

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 shown in the form of eight small light bulbs. When you select this dialog page the first bulb “lights up” [[Image:]](1). This symbol functions like a 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).

(1) There must always be at least one light source active, otherwise the rendering and shading functions cannot function correctly.

Adjustment of light source
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, the button [[Image:]] will give access to a color palette dialog, with which you can define your own color. This dialog also allows the brightness to be adjusted (in the underlying colors dialog). 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 lightpoint with the mouse and drag the point as you please (see Figure 30). With a click on the small square in the bottom right the preview image can be changed from a sphere to a cube.

Moving the light source
Figure 30: Moving the light source

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

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

Lighting with three independent light sources
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 the color magenta and from the left underside also with yellow. The number and position of the light sources is shown in the window at the lower right. The light sources in use can be recognized by the “lit” symbol [[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 will “turn 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 to the scene.

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

Dialog page - Textures

Textures are raster graphics (bitmaps) which can be used as an object property for the surface of an object. Every object of 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 also is the case for Gradient and Hatching. More details are found in Chapter 4 of this Guide.

If the Fill setting on the Area dialog is “Color” then the texture dialog 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.

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).

The textures page
Figure 32: The textures page

Colors and textures
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.

Texture with and without lighting and shadow effects
Figure 34: Texture without (a) and with (b) lighting and shadow effects

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, will in general give the best result. Examples of the use of each button are shown below.


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

With a rotation body the turning axis is the Z axis and the wrapping in the X direction; with an extrusion body the extrusion direction is the Z axis and the surface, which was extruded, is the X direction. In this way different positions of the texture result, depending on how the object was produced.

[[Image:|]]
{| class="prettytable" | Area fill without tiling, with adjustments | Projection X | Projection X | Projection X |- | Projection Y | | | |- | Projection Y (Difference is small) | | Front and rear side | |} Figure 36: Cylinder as a rotation body

The button Filter [[Image:]] switches on an out of focus filter. It can often remove slight faults and errors in the texture.

[[Image:|]]
{| class="prettytable" | Area fill without tiling, with adjustments | Projection X | Projection X | Projection X |- | Projection Y | | | |- | Projection Y (Difference is small) | | Upper and under sides | |} Figure 37: Cylinder as an extrusion object

Dialog page - Material

On this page (see Figure 37) you can assign certain material properties to the 3D object.

The Material dialog page
Figure 37: The Material dialog page

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

The favorites
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. With all settings the material of an object is only simulated and it is sometimes a matter of trial and error to achieve the desired result.

Template:Documentation/Tip


The Illumination color brightens those parts of the object which lie in shadow. The body is thus a little more illuminated.

With textures 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:]]
With the Specular color the reflecting capability of the surface is simulated. 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 material is produced in this case through reflection. Such simulation is (at the moment) not possible to be calculated by OpenOffice.org.

3D settings for 3D-Shapes

The appearance of the shape object is changed using the 3D Settings toolbar (see Figure 8). The concept is totally different from that presented above for objects in 3D scenes. The dialog 3D Effects described above should not be used for shape objects and will in fact not give the correct formatting results when used on a shape object.

In case you use it in error, you can remove the incorrect formatting with Format > Default Formatting.

With the appropriate button of the 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 the individual functions are described by the tool tip. As opposed to the 3D Effects dialog used with 3D scenes, you do not need to “assign” the result of any of the functions to the object – every action is immediately applied and you can see its effect on the object in the main Draw window.


Note The program sometimes seems to generate the wrong formatting with shape objects. The exact cause is not known, but you can undo the action with Format > Default Formatting. One reason can be that you have used a function from the 3D Effect dialog on a 3D shape. (See also Issue 67732.)

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:]]

Produces “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 changes, the brightness only in 3 level, 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:]]

Also with surface are only 4 built in variations possible. At present only Wireframe and Matt 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:]] [[Image:]]

Here you can choose the color of the side(s) of the extruded surface.

The symbol shows the color of the most recently chosen shape object.

Combining objects in 3D Scenes

It was previously explained how 3D objects, produced by extrusion or rotation, lie in a group which is shown in the status bar as a 3D Scene. This gives you the chance to 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 Chapter 5, in the section “Grouping Objects”.

As an example a game piece will be produced:


[[Image:]] First produce both objects independently of each other. The subsequent joining together 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. In the status bar you will see “3D Scene selected”. Right-click and enter the group. You will see that, as usual elements which 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:]] In the old position of the sphere is now a new sphere which belongs to the scene. This new sphere can be moved over to the cone. Exit the group after moving the sphere.
[[Image:]] You can see here 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. Next the whole scene must be rotated 90 degrees.

[[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, should it not be possible with the mouse. Exit the group.
[[Image:]] [[Image:]] Now you can rotate the entire 3D scene and view your game piece from all sides.

Animation for your own experiments

All examples use objects in 3D scenes.


[[Image:]][[Image:]] Extruding a 2D object with text will generate letters as separate objects and they will have a larger extrusion depth.
[[Image:]] [[Image:]] 3D objects of the type “Shape” 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 will be 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 the option 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 will be 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.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).


Cite error: <ref> tags exist, but no <references/> tag was found

Personal tools