How to set up smartphones and PCs. Informational portal
  • home
  • Iron
  • Geometric models of three-dimensional objects. 3D graphics 3D rendering in games and applications

Geometric models of three-dimensional objects. 3D graphics 3D rendering in games and applications

CG geometric objects include:

  • a) point, segment, straight line, plane;
  • b) curved lines (flat and spatial);
  • c) polyhedra;
  • d) surfaces: ruled and curved;
  • e) elementary geometric bodies (volumetric primitives): parallelepiped, cone, cylinder, etc .;
  • f) composite geometric objects obtained from volumetric primitives using geometric synthesis operations: connection, intersection, difference, addition;
  • g) volumetric figures of arbitrary shape.

To reflect the various properties of geometric objects of CG, various geometric models are used: analytical, receptor, structural, kinematic, and composite.

Analytical models of geometric objects of three-dimensional CG

In the CG, it is assumed that the Z axis is directed perpendicular to the plane of the screen, and the x and y axes lie in the plane of the screen.

When describing geometric objects, two approaches are possible:

accurate analytical description of objects;

description of objects by approximate methods: interpolation and approximation.

Forms of specifying a straight line in space. In analytical geometry, a straight line passing through a point in a given direction is determined by the equation (Fig. 11, a).

where r1 - radius - vector of a given point on a straight line; a - unit vector specifying the direction; t is a parameter.

Example 4. The straight line passing through the point (1, 2, 3) and in the direction (1 /, -1 /, 1 /) is determined by the relation

The coordinates of the points of this line are determined

x = 1+, y = 2 -, z = 3+,

If the straight line passes through two points Р1 Р2, then for an arbitrary point of the space Р (Fig. 11, b) we write the equation

Hence r = r1 + t (r2 - r1),

and ultimately r = (1- t) r1 + tr2. (twenty)

Rice. eleven. Different ways to define a straight line

X = (1- t) + 5t = 1 + 4t;

Y = 2 (1- t) + 6t = 2 + 4t;

Z = 3 (1- t) + 7t = 3 + 4t

Forms for specifying the plane. Equation of the form

Ax + By + Cz + 0 = 0,

where A, B, C are not equal to zero at the same time, defines a plane.

The plane passing through the points A, B, C, given by the radius vectors a, b, c, (Fig. 12) is determined by the equation

r = a + u (b-a) + x (c-a),

where u, x are parameters.


Rice. 12.

Forms for defining curves. In volumetric CG, plane and spatial curves are used. Planar curves are treated as boundary curves of the surface compartment. Forms for specifying plane curves are discussed in 2.1.3 and 2.1.4. A spatial curve in three-dimensional space can be obtained as a line of intersection of two surfaces or as a trajectory of a moving point. In CG, the second option is preferable.

Parametric definition of the spatial curve has the form

where the functions x (u), y (u), z (u) are continuous on the segment.

Forms for specifying polyhedra. A polyhedron is a geometric figure of three-dimensional space, the surface of which consists of a finite number of flat polygons. Polygons are called polyhedron faces. Examples of polyhedra: cube, pyramid, rectangular parallelepiped, prism.

Polyhedra can be described in two different ways, each of which has its own advantages and disadvantages when constructing an image on a display.

The first option is a wire description, in which a polyhedron is specified by a list of edges: each edge is a straight line specified by two points in the local coordinate system (Fig. 13, a). The disadvantage of the wire model is that it does not contain enough information to construct an image with the removal of invisible contour lines.

The second option - a polygonal model - defines a polyhedron as a set of faces (polygons): each polygon is represented by a set of vertices with corresponding coordinates in the local coordinate system. In this case, it is easy to determine the visibility of the edges (Fig. 13, b).

Rice. thirteen. Polytope Representation

Representation of surfaces. As in the description of curves, in the process of machine representation of surfaces, problems arise of interpolation, approximation and smoothing of the initial data. When reproducing surfaces by means of CG, the volume of necessary computer resources in comparison with similar operations on lines increases sharply, therefore local piecewise continuous representation methods are most often the only possible ones.

One of the solutions to represent piecewise surfaces is to construct a surface section bounded by plane curves. Another method is to define the surface shape of the landmarks in the same way as it was done on the plane for Bezier curves.

The simplest interpolation tool in the three-dimensional case is a triangle defined by three points: P1, P2, P3. The surface of a triangle, the vertices of which are located at the indicated points, is determined by the equation

From equation (21) it follows that T (1,0) = P1; T (0,1) = P2; T (0,0) = P3.

In addition, T (u, 0) is a straight line connecting points: P1 and P2, T (0,) is a straight line connecting points P2 and P3; T (u, 1-u) is a straight line connecting points P1 and P2 (Fig. 14). Therefore, equation (19) defines a plane passing through points P1, P2, P3.

Rice. 14.

This method of interpolating a surface with triangles is called triangulation.

Example 6. Consider points P1 (1,0,0), P2 (0,1,0) and P3 (0,0,1). The x, y, z coordinates of each point of the plane are determined by the following expressions:

z (u,) = 1-u- or

More complicated is the case of interpolation, when the surface section is specified by four points: P1, P2, P3, P4 (Fig. 15).

Fig. 15.

The surface Т (u,) is determined by the equation

T (u,) = P1 (1-u) (1 -) + P2 (1-u) + P3u (1-) + P4u. (22)

If four points are coplanar, then Т (u,) is a flat quadrilateral, otherwise - a surface of the second order.

Example 7. Consider points P1 (0,0,0), P2 (0,1,0), P3 (1,0,0), P4 (1,1,1). The coordinates of each point of the interpolation surface are determined by the equations obtained by substituting the coordinates in (22)

x (u,) = u, y (u,) =, z (u,) = u, or

If in the equation of the straight line (20) we replace the vectors r1 and r2 by P (0,) and P (1,) - the equations of spatial curves, then we obtain the equation of the ruled surface. Such a surface is formed by a straight line sliding along two curves, called guides. The equation of the ruled surface (Fig. 16) is determined

T (u,) = (1-u) P (0,) + uP (1,). (23)

Rice. sixteen.

As a generalization of surface interpolation by four points, one can consider surface interpolation by S. Inaba's method, in which four points and values ​​of partial derivatives are given and at these points (Fig. 17).

Rice. 17.

Equation (24) has 16 coefficients. To determine them, the coordinates of four points and the values ​​of the partial derivatives and at each point are given. Each corner thus gives three parameters. The missing four parameters give the setting of the coordinates of four points lying inside the surface.

In 1960, Koons developed a method for surface interpolation from four boundary curves (Fig. 18).

Rice. eighteen.

Considering the curves P (0,) and P (1,) as guides, we can write in accordance with (23) the equation of the ruled surface:

T1 (u,) = (1-u) P (0,) + uP (1,). (25)

Linear interpolation in the -direction produces a ruled surface

T2 (u,) = (1-) P (u, 0) + P (u, 1). (26)

Their sum T1 + T2 defines a portion of the surface, each of the boundaries of which is the sum of the boundary curve and the segment connecting the end points of this curve. This is easy to check: if we substitute = 0, then the boundary is determined not by P (u, 0), but by the expression

T (u, 0) + [(1-u) P (0,) + uP (1,0)].

Therefore, to obtain the interpolation surface, it is necessary to subtract the equation of four straight lines connecting the end points, similar to (22), from the sum of surfaces T1 and T2:

T (u,) = (1-u) P (0,) + uP (1,) + (1-) P (u, 0) + P (u, 1) -

P (0,0) (1-u) (1-) -P (0,1) (1-u) - P (1,0) u (1-) - P (1,1) u. (27)

Successive substitutions u = 0, u = 1, = 0, = 1 confirm that the portion of the surface (27) has four given curves by its boundaries.

Helper functions u; (1-u); ; (-1) are called offset functions because they connect four separate boundary curves together. Formula (27) can be generalized by using the merge functions instead of u (1-u), v (1-v) (Fig. 19).

Rice. nineteen.

Often in the CG, reference points, rather than boundary curves, act as input data for surface design. Generalizing the forms of writing the Ferguson curve (13) and the Bezier curve (15) for n = 3, we obtain, respectively, the equations of surfaces, assuming the dependence of a0, a1, a2, a3 on the second parameter:

where are the vertices of the characteristic polygon (Fig. 20).

Rice. twenty.

The shape of the polyhedron gives a good idea of ​​the shape of the surface, and changing one or more landmarks will modify it in a predictable way. Note that the Bezier surface only passes through the points

In addition to surfaces obtained by interpolation methods and using characteristic polyhedra, objects that are surfaces of revolution are widely used in CG. The surface of revolution is obtained by rotating a plane curve, which is called a generatrix, around some straight line, called the axis of rotation. Each point of the generator during its rotation around the axis describes a circle. The conical surface is obtained by the rotation of the straight line l around the i-axis. In this case, the generator and the axis have an intersection point (Fig. 21, a). A cylindrical surface is obtained if the generatrix l is parallel to the i-axis (Fig. 21, b).


Rice. 21. Examples of surfaces of revolution

If the y-axis is taken as the axis of rotation, which is denoted by f (u), then the equation of the surface can be written (Fig. 22)

r (u,) = f (u) (cose1 + sine2) + ua0, (30)

where e1, e2 are unit vectors along the z and x axes; a0 is the unit vector in the direction of the rotation axis.

If the generator is given by the equation

then from equation (30) with a0 = 1 we obtain the equation of the conical surface of revolution (see Fig. 21, a) in the parametric form:

r (u,) = u.

Rice. 22.

Representation of volumetric primitives. In CG, the volume primitives (elementary geometric bodies) are understood as bodies: a cone, a cylinder, a sphere, a parallelepiped, a torus, a pyramid, a prism. In order to write down the equation of a volumetric primitive, it is necessary to go to inequality in the surface equation instead of equality. For example, the equation

x2 + y2 + z2 = R2

is the equation of the sphere, and the inequality

defines a volumetric primitive, also called a sphere.

The synthesis of composite geometric objects (CGO) from volumetric primitives is performed using geometric operations similar to operations on sets. The purpose of geometric synthesis is to obtain a description of a complex object. The operations of geometric synthesis include: union, intersection, difference, addition. Figure 23 shows examples of geometric synthesis operations.

To implement these operations, the methods of contact connection and penetration connection are used.

The contact connection method is used to synthesize objects from elementary GO, the connection of which is carried out along flat contours. An example of a contact connection will be the union of objects shown in Fig. 23, b.

The penetration connection method involves the following sequence of steps:

  • a) definition of volumetric primitives V1 and V2;
  • b) determination of pairs of potentially intersecting surfaces;
  • c) analytical determination of the intersection curve for any pair of intersecting surfaces and the removal of those segments of the curve that do not lie inside the intersecting surfaces;
  • d) segmentation of surfaces in accordance with the resulting line of intersection;
  • e) removal of surface segments.

Rice. 23.

Representation of volumetric figures of arbitrary shape. The kinematic principle is used to represent them. You can define solid volumetric shapes in several ways.

Thickness assignment: S = F1 (C, P, D, L). Reference contour C is moved in the P plane (by default, this is the z = 0 plane); the second contour is defined by moving the contour C in the direction of the vector D to the distance L.

Rotation reference: S = F2 (C, A). With the help of the contour C (open or closed), a solid body is formed by rotation around the axis A.

Specification by a list of contours: S = F3 (LC, LP, LR, LS), where LP (i) is the plane in which LC (i) is the contour, LR (i) is the first of the objects to be connected, LS (i) is direction of traversing the contour.

General kinematic task. Generalization of this method is that a surface defined by rigid contours moves along a more complex trajectory. Subsequently, this method was further developed, which consisted in the fact that objects, moving along a complex trajectory, could deform.

Geometric models describe objects and phenomena that have geometric properties. The need to describe spatial objects arises when solving many problems of computer graphics.

In the general case, an actually existing object cannot, of course, exactly correspond to its description. This would require an infinite number of triplets of coordinates ( x, y, z) - one for each point of the object's surface.

Currently, when modeling objects, several basic types of geometric models are used.

For description wireframe (wire) model first-order geometric objects are used - lines or edges. Wireframe models are used, as a rule, to define objects that are polyhedra, i.e. closed polyhedra of arbitrary shape bounded by flat faces. In this case, the wireframe model contains a list of coordinates of the vertices of the polyhedron with an indication of the connections between them (that is, indication of the edges bounded by the corresponding vertices).

When using a wireframe model to describe objects bounded by surfaces of more than first order, such surfaces are interpolated with planar faces.

The wireframe representation of an object is often used not in modeling, but in displaying models as a rendering method.

The advantages of the wireframe model are low requirements for computing resources, the disadvantage is the impossibility of constructing highly realistic images, since the set of segments is not an adequate description of the object - the segments themselves do not define surfaces (Fig. 7.1).

Rice. 7.1. The same wireframe model (a) can describe both a cube (b) and a box open from above (c).

The development of the wireframe model is piecewise analytical face model, which is specified by listing all individual faces. An object is specified by a set of bounding edges and a normal directed from the object; each face is specified by a cycle of its bounding edges; each edge - two points (vertices) bounding it; each point is a triplet of coordinates in three-dimensional space. Those. a face model represents a 3D object as a closed surface.

The set of faces, represented by flat polygons and bounded by rectilinear edges, forms polygon mesh... The faces can be of any shape, but in the overwhelming majority of cases, convex polygons with a minimum number of vertices (triangles and quadrangles) are used. their calculation is easier.

The main disadvantage of a polygonal mesh is the approximate representation of the shape of an object when describing curved surfaces. To improve the piecewise linear approximation of such objects, the number of faces is increased, which leads to additional memory costs and an increase in the amount of computation.

Within a face model, faces can also be curved surfaces bounded by curved edges. The most commonly used edges are parametric bicubic chunks bounded by parametric cubic curves.

When using bicubic chunks, significantly fewer faces are required to represent an object with a given accuracy than when approximated by a polygonal mesh. However, the calculations when working with bicubic surfaces are much more difficult than when working with flat faces.

Unlike the edge model, volumetric-parametric model treats the object as a solid body. An object is described as a collection of some basic volumetric form elements (volumetric primitives). Each primitive in the model is specified by two groups of parameters:

· Dimensional parameters - define the geometric dimensions of the primitive;

· Position parameters - set the position and orientation of the primitive relative to the world coordinate system.

Simple geometric bodies are used as primitives: a cylinder, a cone, a truncated cone, a parallelepiped, a ball, a torus.

The coordinates of the central point of the primitive and the coordinates of the unit vector directed along the height of the primitive are usually used as position parameters.

In addition to these parameters, operations on primitives are specified, which are three basic operations of set theory - union, intersection and subtraction. The union of the two primitives is an object that includes all the points of the original primitives. The intersection of two primitives is an object, all points of which belong simultaneously to the first and second primitives. Subtraction of two primitives results in an object consisting of those points of the first primitive that do not belong to the second primitive.

The disadvantage of the volume-parametric model is the absence of explicit boundaries of the face compartments in the case of interpenetration of primitives.

Within the framework of kinematic In the model, an object can be specified by a set of volumetric elements, each of which is a volume, "cut out" in space when moving along a certain trajectory of a closed flat contour. The path of the contour can be either straight or curved.

The type of an element is determined by the shape of the contour and the path of its movement. For example, a cylinder in the framework of a kinematic model can be described as the movement of a circle along a segment representing the height of the cylinder.

To model elements of complex shape, you can use the change in the size of the contour or its position relative to the path during movement.

The advantage of the model is the virtual absence of restrictions on the complexity of the object being formed. The disadvantages include the complexity of specifying elements.

3D graphics do not necessarily involve projection onto a plane ...

Collegiate YouTube

    1 / 5

    ✪ 3D Graphics Theory Lesson 01 - Introduction to 3D Graphics

    ✪ Computer graphics in cinema

    ✪ Lecture 1 | Computer graphics | Vitaly Galinsky | Lectorium

    ✪ 12 - Computer graphics. Basic concepts of computer graphics

    ✪ Lecture 4 | Computer graphics | Vitaly Galinsky | Lectorium

    Subtitles

Application

Three-dimensional graphics are actively used to create images on the plane of a screen or sheet of printed matter in science and industry, for example, in design automation systems (CAD; to create solid elements: buildings, machine parts, mechanisms), architectural visualization (this also includes the so-called "Virtual archeology"), in modern medical imaging systems.

The widest application is in many modern computer games, as well as as an element of cinema, television, and printed materials.

3D graphics typically deal with a virtual, imaginary three-dimensional space that is displayed on a flat, two-dimensional surface of a display or sheet of paper. Currently, there are several methods for displaying three-dimensional information in a volumetric form, although most of them represent volumetric characteristics very conditionally, since they work with a stereo image. From this area, one can note stereo glasses, virtual helmets, 3D displays capable of showing a three-dimensional image. Several manufacturers have demonstrated production-ready 3D displays. However, 3D displays still do not allow creating a full-fledged physical, tangible copy of a mathematical model created by three-dimensional graphics methods. Rapid prototyping technologies that have developed since the 1990s are filling this gap. It should be noted that rapid prototyping technologies use the representation of a mathematical model of an object in the form of a solid (voxel model).

Creation

To obtain a three-dimensional image on a plane, the following steps are required:

  • modeling- creation of a three-dimensional mathematical model of the scene and objects in it;
  • texturing- assignment of raster or procedural textures to the surfaces of models (it also implies setting the properties of materials - transparency, reflections, roughness, etc.);
  • lighting- installation and configuration;
  • animation(in some cases) - giving motion to objects;
  • dynamic simulation(in some cases) - automatic calculation of the interaction of particles, hard / soft bodies, etc. with the simulated forces of gravity, wind, pushing, etc., as well as with each other;
  • rendering(visualization) - building a projection in accordance with the selected physical model;
  • compositing(layout) - image refinement;
  • output of the resulting image to an output device - a display or a special printer.

Modeling

The most popular packages for purely modeling are:

  • Robert McNeel & Assoc. Rhinoceros 3D;

To create a three-dimensional model of a person or a creature, a sculpture can be used as a prototype (in most cases).

Texturing

SketchUp

3D rendering in games and applications

There are a number of software libraries for rendering 3D graphics in application programs - DirectX, OpenGL, and so on.

There are a number of approaches to representing 3D graphics in games - full 3D, pseudo-3D.

Such packages do not even always allow the user to operate a 3D model directly, for example, there is an OpenSCAD package, in which the model is formed by executing a user-generated script written in a specialized language.

3D displays

3D or stereoscopic displays, (3D displays, 3D screens) - displays, by means of stereoscopic or any other effect, creating the illusion of real volume in the displayed images.

Currently, the vast majority of three-dimensional images are shown using the stereoscopic effect, as the easiest to implement, although the use of stereoscopy alone cannot be called sufficient for volumetric perception. The human eye, both in pairs and alone, equally well distinguishes volumetric objects from flat images [ ] .


Alekhina G.V., Kozlov M.V., Spivakova N.Ya.

Alekhina G.V., 2011

Kozlov M.V., 2011

Spivakova N.Ya., 2011
Moscow Financial and Industrial University "Synergy", 2011

Part 2. Basics of 3D Scene Modeling in 3D Studio MAX

BY STUDYING THE TOPIC, YOU WILL

Know:

· 3D Studio MAX program interface;

· stages of creating a complete 3D project;

· assignment of window control buttons;

· methods of geometric modeling of three-dimensional images;

· stages of creating an image in three-dimensional graphics;

· the concept and purpose of modifiers;

· the purpose of the base materials.

Be able to:

· manage projections;

· manage 3D Studio MAX windows;

· simulate three-dimensional images;

· edit entire forms;

· perform boolean operations on graphic objects;

· work with a material editor.

Possess skills:

· building static and animation scenes using 3D Studio MAX software;

· cloning, aligning and creating arrays;

· editing individual splines;

· drawing deformations;

· work with groups of objects;

· creating special effects;

· visualization of scenes.

BASIC TERMS AND CONCEPTS

Modeling

· creation of materials

· NURBS modeling

Master object

Modification

· parametric object

· compound object

Scene object

· wireframe objects

· patchwork objects

Subobject

Primitive

· axonometric projection

· central projection

Rendering

Visualization

· global coordinate system

· local coordinate system

Spline

· spline shapes

· modifier stack

Transformation

Shading

THEORY

2.1. Stages of creating a complete 3D project

One of the most popular 3D graphics editors, both for amateurs and professionals in the design and creation of games, is 3D Studio Max. There are many software products that can compete with it, and sometimes even surpass it in something, but the intuitive ease of use makes 3D Studio Max an indispensable tool. 3D Max is ideal for the first steps in working with 3D graphics, and for many it becomes the main tool.

The creation of a complete 3D project usually consists of stages such as: modeling, creating materials, lighting, animation, rendering and post-processing. The order of going through these stages of creating a 3D project may vary depending on the goal and its complexity.

Let's consider the main stages in more detail:

1. Modeling- at this stage, objects are created in the projection windows. They can also be imported from another graphics package. By controlling the parameters of the object, transforming and modifying it, ultimately you should get the required 3D model. There are several modeling techniques, ranging from simple creation of objects from polygons (triangular faces into which the surface of an object is divided) to modern NURBS modeling (creating precise surfaces that are described by three-dimensional curves).

2. Material creation (shading)- the stage during which the appearance of objects is set, the properties of their surface are set. Editing a material involves defining its texture as well as modifying its properties such as gloss, roughness, reflection, etc. Then the required material is applied to the object in the scene. Special effects such as Combustion, Atmosphere, Foq can also be added at this stage.

3. Lighting. You can add light objects to the scene to create shadows and lighting, as well as adjust their properties: color, intensity, shadows.

4.Animation. Once the scene is set up and the objects are in place, it can be played back and eventually animated. To do this, using the tool Animation(Animate), you must select an object in the scene, after which you can move, rotate or set more complex paths, indicating its location in different frames. You can also change the parameters of the object after a while, which will act as an animation effect. Most of the animation effects can be seen in the viewports. There are several techniques for animating objects. The simplest of them is "animation by keys" - keyframes are created, and the movement of objects between them is calculated automatically, you can adjust the animation frame keys either automatically or set them manually. For more complex animations in 3D Max, it is possible to use mathematical expressions or links to other objects. Motion controllers and constraints can be added to help reproduce more realistic animations.

5.Visualization (rendering). Once the animation is ready, you can render it all, i.e. render. This is usually the final, often the longest, stage of creating a three-dimensional picture or three-dimensional video. During rendering, the image is calculated using all the specified properties of the materials of objects and light sources, shadows, reflections, refractions, etc. are calculated. The duration of rendering depends on many parameters, such as resolution, presence and amount of shadows, motion blur, rendering of secondary reflections. The file is recorded in video format or sequentially saves images as separate rendered images. 3D Max supports most file formats.

6.Post-processing. After the scene has been rendered, the render frames may need to be tweaked - adding effects such as glare, blur, shine, depth of field, or changing colors.

2.2 Geometric modeling in 3D Studio MAX

3D MAX is an object-oriented program, therefore the term “object” is fundamental for it. In fact, everything that is created is an object. These are geometric shapes, light sources, curves and planes, as well as modifiers, controllers, etc. Such a variety of objects often leads to some confusion, so for objects created using the Create panel, the qualification "scene object" is often used.

When objects are created, they contain information about what functions can be performed for them and what the behavior of each object can be. Such operations remain active, all other operations become inactive or simply hidden.

Most of the objects are parametric. Parametric an object is called, which is determined by a set of settings or parameters. Such an object can be changed at any time by simply changing these parameters. Keep in mind, however, that some operations convert parametric objects to nonparametric (explicit) objects.

Examples of such operations are:

1.Combining objects with one of the Edit modifiers.

2. Destruction of the modifier stack.

3.Exporting objects to another file format, while only objects in the exported file lose their parametric properties.

In general, it is necessary to preserve the parametric definition of objects for as long as possible for their possible change.

To create a new parametric object, you can combine two or more objects, and the resulting object will be called composite... Composite objects are parametric and can also be modified by specifying the parameters of the objects of which they are composed.

In 3D MAX, you can manipulate not only whole objects, but also parts of objects, which are designated by the term "subobject". Sub-objects of geometric shapes, such as vertices or faces, are the easiest to grasp, but this concept also extends to objects outside the scene.

Examples of subobjects are:

1. vertices, segments and splines of shape objects;

2. vertices, edges and faces of wireframe objects;

3. vertices, edges and elements of surfaces of patchwork objects;

4.gizmo and modifier centers;

5.Key trajectories of movement;

6.operands of boolean objects;

7.forms and paths of loft objects;

8.the targets of morf objects;

In turn, the listed subobjects have their own subobjects, thus forming a multi-level hierarchy of subobjects, the depth of which is practically unlimited.

As mentioned above, the first step in creating a full-fledged 3D project is to create scene objects, which will subsequently be rendered. When building a scene object, a process is created that determines the method of assigning properties to the object, modifying and transforming its parameters, distorting the object in space, displaying the finished object in the scene. This process is called streaming scheme.

A flowchart can be thought of as a set of instructions for assembling an object. The main steps of an object flow diagram are:

1.creation of a master object;

2.modification (modifiers are calculated in the order in which they were applied);

3.transformation;

4. distortion of space;

5. definition of properties;

6. the inclusion of an object in the scene.

The term "master object" includes the parameters of the original object, which is created using the Create panel, and is an abstract definition of a non-existent object. The master object contains information about the object such as:

1. type of object;

2. object parameters;

3. origin of coordinates;

4. orientation of the local coordinate system of the object;

All objects have unique properties such as: name, color, assigned material. These properties should be considered as independent, since they are neither the basic parameters of the object, nor the result of modifiers or transformations.

2 . 3 . Converting objects

Transformation of scene objects can be performed using two groups of tools: "Transformations" and "Modifications". Often, similar transformations of objects can be achieved both by applying modifiers and by transforming an object. Which method to use to transform an object depends on how the object is built and what you plan to do with it later. Let's consider both possibilities of transforming objects in more detail.

With the help of transformations, objects are placed in the scene, i.e. their position, orientation and size change. Transforms include three types of object transformations:

1. Positioning - determines the distance of the origin of the local coordinates of the object from the origin of the world space.

2.Rotation - defines the angle between the local coordinate axes of the object and the world coordinate axes.

3. Scale - determines the size of the division value of the axes of the local coordinates of the object relative to the division value of the world coordinate axes.

The combination of these three types of object transformation constitutes the transformation matrix, and their characteristics can be summarized in the form of three theses:

1.determine the location and orientation of objects on the scene;

2. affect the entire object;

3. are calculated after all modifiers.

The third point requires clarification, namely: regardless of whether the modifiers are applied first, and then the transformation, or vice versa, the calculations of the modifiers are always performed first, and only then the transformations are calculated.

When performing any transformation of an object, the transformation axes will be displayed in the projection windows. Using them, you can restrict actions along an axis or plane, as well as make the interactive transformation of an object more accurate. For each of the three transformation groups, the transformation axes have their own form:

- "Move" - ​​positioning (Fig. 4.1).

1.Box(Box) - cubic or rectangular.

2.Sphere(Sphere) - is a polygonal object, i.e. is built on the basis of quadrangles.

3.Cylinder(Cylinder).

4.Thor(Torus).

5.Kettle(Teapot) - is a classic element of three-dimensional graphics.

6.Cone(Cone).

7.Geosphere(GeoSphere) - unlike a sphere, it is built on the basis of triangles.

8.Pipe(Tube) is a hollow cylinder.

9.Pyramid(Pyramid).

10.Plane(Plane).

All primitives have editable parameters to control their defining characteristics. This allows you to create primitives both interactively and explicitly by specifying precise parameter values.

If you apply the EditPatch modifier immediately after creating the primitive, then it will be considered as a set of patches. When any other modifiers are applied to primitives, they are converted to wireframes. The result of modifying patchwork and wireframe objects may look different because the vertices of the wireframe are explicit and the flap is the result of the computation.

In the previous paragraph, we considered the use of modifiers to get rendered objects based on spline shapes, using the cup model as an example. By editing the wireframe objects, a handle can be created for this cup:

1. On the command bar, select Create -> Geometry -> Box (Fig. 4.27).

Rice. 4.28. Create a Cup Handle by Editing Wireframe Objects (Step 2)

3. Go to the Modify tab and apply the Edit Mesh modifier (Fig. 4.29).

Rice. 4.30. Create a Cup Handle by Editing Wireframe Objects (Step 4)

5. After that, all the vertices will be highlighted in blue (Fig. 4.31).

Rice. 4.32 Create a Cup Handle by Editing Wireframe Objects (Step 6)

7. On the main toolbar, select "Move" (Fig. 4.33).

Rice. 4.33. Create a Cup Handle by Editing Wireframe Objects (Step 7)

4. Move the selected vertices as shown below (Fig. 4.34, Fig. 4.35).

Rice. 4.35. Create a Cup Handle by Editing Wireframe Objects (Step 9)

9. Then smooth the surface with the Mesh Smooth modifier. As you can see from the picture, the modifier applied last is at the top of the stack (Fig. 4.36).

Rice. 4.38. Cup and handle connection

Rice. 4.39. Viewing the result

2.12. Setting up and conducting visualization in 3D Studio MAX

In 3DS MAX, the Render Scene dialog box provides the user with the tools needed to render still images and create animated video files. The Render Type drop-down scroll on the main toolbar allows you to select one of eight ways to render the scene (Fig. 4.120).

"Projection window" (View) - the entire projection window is rendered.

"Selected" - only selected objects are rendered. If there is an image in the rendered frame window, the selected objects are rendered on top of it. The command "Erase" (Clear) resets the window of the rendered frame.

Region - Renders a user-selected rectangular region.

"Crop" - a rectangular area is rendered, and all other data is placed in the rendered frame window.

Blowup - The rectangular area is first rendered and then enlarged to the size of the current image.

Box Selected - only objects that are within the volume of the current selection's bounding box are rendered. With this visualization option, the resolution of the resulting image is set.

Region Selected - Renders the region specified by the selection's bounding box. In this case, cutting is taken from the general rendering settings.

Crop Selected - Renders the area defined by the bounding box of the current selection, and cuts everything else.


Rice. 4.68. Choosing a way to render the scene

During the rendering of a 3D scene, the Rendering window displays frame-by-frame and temporal progress bars and the rendering time of the last frame. The Rendering dialog box displays the high resolution scanline tenderer settings for the final renderings (Figure 4.69).

Rice. 4.69. Rendering Dialog Box

You can set the process parameters in the "Render Scene" dialog box (Fig. 4.69). To open this window, click on the Render Scene button in the main toolbar or select the "Rendering" - "Render" command (you can also use the F10 key on your keyboard).

The window consists of several tabs, the "Common" tab contains parameters and options that are used by all visualizers. In the Options section, various rendering options are set:

· Video Color Check - Checks if the pixel intensity values ​​are within the limits of the PAL or NTSC video standards;

· Force 2-Sided - Renders surfaces on both sides of objects regardless of material settings;

· Atmospherics - Renders atmospheric effects;

· Effects - includes rendering effects, configurable in the Effects tab;

· Super Black - limits the blackness of pixels in video mode;

· "Displacement" - turns on the rendering of displacement maps;

· Render Hidden Geometry - renders hidden objects;

· Render to Fields - Regardless of frame usage, renders two fields of alternating lines for video. Used to smooth motion.

Rice. 4.70. Render Scene Dialog Box
Common tab

The Advanced Lightning section contains options for indirect lighting.

The "Render Output" tab contains settings that are responsible for the files and dialog boxes that will be used for rendering.

The "Render Elements" tab contains tools that allow you to render different elements separately (Fig. 4.71).

Elements Active - enables the rendering of the selected elements to various files. The elements are selected with the Add and Merge buttons and are shown in the box below.

Display Elements - enables the display of the selected elements in various windows of the rendered frame.

Rice. 4.71. Render Scene Dialog Box, Render Elements Tab

The "Renderer" tab contains the controls for the active renderer (Fig. 4.71). Switching renderers is done in the "Assign Renderer" section in the Common tab. By default, Scanline Renderer is enabled, as indicated in the window title. The following line-by-line renderer settings are available.

The Default Scanline Renderer rollout is intended for setting parameters that are specific to the line-by-line renderer only.

For other renderers, this section looks different:

· "Overlay maps" (Mapping) - turns on the visualization of maps;

· "Shadows" - turns on the rendering of shadows;

· Auto-Reflect / Refract and Mirrors - turns on the Reflect / Refract map rendering;

· Force Wireframes - only wireframes are displayed regardless of material settings;

· Wire Thickness - Sets the thickness of the wireframe if the Force Wireframes option is enabled.

Smoothing the jagged contours of surfaces during rendering is essential for the final, high-quality images. It can be disabled for test pictures. Anti-aliasing is configured in the AntiAliasing section.

AntiAliasing - smooths out raster irregularities in contours.

Filter Maps - enables pyramidal filtering of images and filtering by total area.

In the “Object Motion Blur” and “Image Motion Blur” sections, the Apply options turn on the rendering of the corresponding blur.

Conserve Memory - When enabled, located in the Memory Management section, memory consumption is reduced by 15-25% by increasing render time by approximately 4%.

Rice. 4.72. Render Scene Dialog Box,
Renderer tab

To start rendering, click on the Render Scene button. In the Render Output group, click on the "..." button next to the "Save File" caption. The Render Output File dialog box appears.

Select a file format from the Save as Type drop-down list and specify a name for the image (Fig. 4.73).


Rice. 4.73. Render Output File Dialog, Save as Type drop-down list

To save the results of the next rendering in a file, select the Save File checkbox in the Render Scene window (Fig. 4.74).

Rice. 4.74. Saving rendering results to a file

In the Render Scene dialog, the Output Size section defines the rendered image resolution in terms of width and height in pixels. The default resolution is 640x440. Click the button to apply the Render Scene command (Fig. 6.74).

In the Output Size section of the Common tab, select the size of the output image by clicking on the appropriate button or setting values ​​in the Width and Height fields.

Now the image size is set, and rendering will be performed in the image of the specified resolution.

Rice. 4.75. Determining the resolution of the rendered image

For training, a low resolution will be enough, for example 320x240. By clicking the lock icon next to Image Aspect, the aspect ratio of the picture can be disabled.

Right-clicking one of the standard definition buttons will bring up the Configure Preset dialog box. The drop-down list in this group contains the resolution and aspect ratio standards used in various applications. From the list Output Size the user can select the parameters of various photo, film and video standards (Fig. 4.76).


Rice. 4.76. Settings

So, let's try to render our picture with a vase. Open the file with this scene in 3DS MAX and press the Render Scene button. In the Render Scene dialog box, set the parameters for the rendering process. Click the button Render , rendering will start, the rendering time directly depends on the complexity of the scene, the size of the final image and inversely proportional to the computing power of the computer (Fig. 4.77).


Rice. 4.77. Rendering an image with a vase (step 1)

The image will open in a separate window. In our case, we see only a vase and black space, since there are no other objects on the scene and cannot be (we did not create them). In order to save the resulting image in a file, you need to click on the "Save" button (Fig. 4.78).


Rice. 4.78. Rendering an image with a vase (step 2)

In the dialog box that opens, enter the file name (bitmap) and its format (for example. jpg ). By clicking on the "Save" button, you will save the rendering result in the desired directory.

By the way, a more realistic transfer of information about color and light intensity can be achieved by saving the result in HDR format. HDRI (High Dynamic Range Image) has a wider dynamic range than other graphic formats. In 3D graphics, HDRIs are often used as an environment map to create realistic reflections. To add an environment map to 3DS Max, you need to execute the Rendering> Environment command, in the Common Parameters rollout, click the Environment Map parameter button, in the Material / Map Browser window that opens, select the Bitmap map and specify the path to the file in HDR format (Fig. 4.79).


Rice. 4.79. Rendering an image with a vase (step 3)

2.13. Create special effects

Rendered image post-processing is used to create various effects that go beyond 3D graphics. Effects in 3DS MAX allow you to control colors, distort images, add grain, add highlights, and more.

To add effects to a 3D scene, you need to execute the command "Rendering" - "Effects", and then go to the "Effects" tab. In the Environment and Effects window, click the Add button and select the desired effect. After adding the effect below in the window Ambience and Effects the effect settings appear.

Click the Delete button to remove the effect. Using the settings in the Preview area under the Effects list, you can control the rendering of the effects.

When Interactive is checked, the scene will be rendered whenever the effect parameters are changed. This function is convenient to use when you need to set a certain type of effect (Fig. 4.80).

Rice. 4.80. Effect display settings window

Let's take a closer look at some of the post-processing effects. Very often, to add realism, you need to simulate the light flare that occurs when shooting real objects and is caused by the shape of the lenses.

There is a special group of effects in 3DS MAX that allows you to simulate such reflections, it is the group of effects "Lens Effects" (Lens Effects).

There are several basic forms of lens flare.

· "Glow" - a flare that creates a glow around the bright areas of the image.

· "A circle"( Ring) - a flare in the form of a circle located around the center of the glow.

· "Ray"( Ray) - an effect in the form of direct rays emanating from the center of the glow.

· Auto Secondary - creates an additional flare in the shape of a circle, the position of which depends on the position of the camera.

· Manual Secondary - Applies to the Auto Secondary effect and allows you to add highlights of different sizes and shapes. With this effect, only one lens flare is added to the image. The Manual Secondary effect can be used alone.

· Star - Adds a star-shaped flare. This effect is similar to Ray, but uses fewer rays (from 0 to 30).

· "Flash of light" (Streak) - a flare in the form of a two-sided direct ray, emanating from the center of the glow and decreasing in size with distance.

When adding Lens Effects, select the effect in the Lens Effects Parameters rollout, the right list shows the effects that are used in the scene (Fig. 4.81). When you select them in this list, the parameters of each of them appear.

Using the options on the Lens Effects Globals rollout, you can select the light source to which the effects will be applied. The source can be specified by clicking the Pick Light button and selecting it in the scene.

Sets of lens effects with specified parameters can be saved as files with the LZV extension for use in different projects.


Rice. 4.81. Lens flare display

CONTROL QUESTIONS

1. What the stage consists of 3DS MAX ?

2. How is the 3D scene displayed on the screen?

3. What is the mesh of the body and what standard elements does it consist of?

4. How can you simply animate a scene?

5. What is the general procedure for designing a scene?

6. How many command lists are included in the main menu3DS MAX and what is the purpose of each of these lists?

7. What are the different types of context menus and how do they expand?

8. What is a quarter menu?

9. What are the projection windows for and where are the buttons to control them?

10. What is the purpose of the command panels, how many and where are they located?

11. How many toolbars are used in the program, what is the fundamental difference between the main panel and the additional ones?

12. Where are the publicly available animation tools located, and what three groups of elements are they made of?

13. How do modal dialogs differ from modeless ones?

14. What are geometric bodies and what are their varieties?

15. What are contour objects, what are their varieties and how do they differ from each other?

16. What types of projections are used in 3DS MAX ?

17. What is a scene view?

18. What operations can be performed when configuring projection windows?

19. What are the two most common scene display modes, what are they called and what are they?

20. How is transparency displayed in projection windows set?

21. How are the parameters of the scene view in the projection windows adjusted?

22. What commands can be used to restore the previous settings of the scene view or the previous view?

23. When do you need a display mode for the inner surface of bodies?

24. What means of the program can be used to configure the scene lighting parameters in the projection windows with built-in illuminators?

25. How many coordinate systems are used in the program and where are they selected?

26. What is the purpose of the current and system units of measure?

27. What are the three types of grids used in the program?

28. What is the processing technology using modifiers?

29. What are the two alternative ways of attaching modifiers to the processed object?

30. What is the modifier stack and where is it?

31. What operations can be performed with the mouse in the modifier stack window?

32. What is meant by the operation of folding modifiers?

33. When should you set a high resolution of the mesh of the processed object?

34. When is the Warning information bar displayed?

35. What is a particle system and what are the main parts of it?

Computer graphics- a science that studies the methods and methods of creating, forming, storing and processing images using software and hardware computing systems.

Three-dimensional graphics (3D graphics) - section of computer graphics, a set of software and hardware techniques and tools designed for the spatial image of objects in a three-dimensional coordinate system.

Model - an object that reflects the essential features of the studied object, phenomenon or process.

3D modeling - study of an object, phenomenon or process by building and studying its model.

3D graphics editors- programs and software packages designed for three-dimensional modeling.

Polygon mesh - a set of vertices, edges, faces that define the shape of a polyhedral object in three-dimensional graphics.

Polygon- the smallest element of a polygonal mesh, can be a triangle, quadrilateral or other simple convex polygon.

Spline- a two-dimensional geometric object that can serve as a basis for constructing three-dimensional objects.

Graphics engine ("renderer"; sometimes "render")- software, the main task of which is the visualization (rendering) of two-dimensional or three-dimensional computer graphics.

Methods for creating 3D objects

According to their form, objects of the real world are divided into simple and complex. An example of a simple object is a brick, and a complex one is a car. For any object in the real world, regardless of its complexity and nature, you can create a three-dimensional model. There are various methods of 3D modeling:

· Modeling based on primitives;

· Spline modeling;

· Use of modifiers;

Modeling with editable surfaces: Editable mesh(Editable surface), Editable poly(Editable polygonal surface), Editable patch

· Creating objects using boolean operations;

· Creation of three-dimensional scenes using particles;

· NURBS-simulation (modeling based on inhomogeneous irrational B-splines).

When creating an object on the scene, it is necessary to take into account the peculiarities of its geometry. Typically, the same object can be modeled in several ways, but there is always a method that is most convenient and takes less time.

In this thesis, objects are created for an interactive system, which imposes some restrictions on their complexity. You cannot create photorealistic objects (high-polygonal objects), since they require a lot of computer resources on which the final program will be launched, and also, the more objects on the scene, the greater the load on the graphics engine. When working on three-dimensional objects for interactive systems, these restrictions must be taken into account and it is necessary to create objects as optimized as possible, but not at the expense of the quality of appearance. The balance between quality and optimal complexity is one of the main problems when creating objects for interactive systems.

Modeling with primitives

This method is used in cases where you can mentally split an object into several simple primitives connected to each other. It is necessary to have good spatial thinking, to constantly imagine the object, all its main details and their location relative to each other. Using primitives, it is possible to depict almost any object, but when modeling complex objects, after a certain large number of primitives, the use of this method is impractical.

Rice. one.

The process of creating objects based on primitives can be divided into stages:

· Mental division of the original object into primitives;

· Creation of primitives;

· Arrangement of primitives relative to each other according to the shape of the created object;

· Correction of the sizes of primitives;

· Texturing, that is, material overlay.

Primitives are best used when depicting relatively simple objects. Their use for displaying complex objects is undesirable.

Spline modeling

One of the most effective ways to create 3D models. Creating a model using splines is reduced to building a spline wireframe, on the basis of which a three-dimensional geometric surface is created.

Most 3D editors have spline modeling capabilities, and the toolkit for these programs includes the following shapes:

Rice. 2.

· Line

· Circle

· Arc (Arc);

· Ngon (Polygon);

· Text (Tex);

· Section

· Rectangle

· Ellipse (Ellipse);

· Donut (Ring);

· Star (Polygon in the form of a star);

· Helix

· Egg

By default, spline primitives are not displayed at render time and are used as construction objects, but they can be rendered as needed.

From spline shapes, you can create complex geometric three-dimensional objects. This method is most often used when modeling symmetric objects by rotating a spline profile around a certain axis, as well as asymmetric objects, giving volume to the section of a selected spline shape.

Using modifiers

A modifier is a special operation that can be applied to an object, as a result of which the object's properties are changed. All three-dimensional graphics editors have a large number of modifiers that affect the object in different ways, for example, bending, stretching, smoothing or twisting it. Modifiers can also be used to control the position of a texture on an object or change its physical properties.

Rice. 3.

In professional full-featured products for 3D modeling, for example "Autodesk 3ds Max" it is possible to quickly go to the settings of the object and applied modifiers to it, disable or enable the actions of modifiers, as well as change the order of their impact on the object.

Modeling with editable surfaces

Common way to create 3D models. Most modern 3D editors allow you to work with the following types of editable surfaces:

· Editable mesh(Editable surface);

· Editable poly(Editable polygonal surface);

· Editable patch(Editable patch surface);

All of the above methods for constructing surfaces are similar to each other, and the differences lie in the modeling settings at the sub-object level. In objects like Editable poly the model consists of polygons, in Editable mesh- from triangular faces, and in Editable patch- from patches of triangular or quadrangular shape, which are created by Bezier splines.

Rice. 4.

An example of a software package that has modeling capabilities using editable surfaces can be "Autodesk 3ds Max". When working with objects like Editable poly, the user can edit the vertices ( Vertex), edges ( Edge), boundaries ( Border), polygons ( Polygon) and elements ( Element) of the object being edited. Editing capabilities of Editable Mesh objects are distinguished by the ability to change edges ( Face) and the absence of a border editing mode. To work with Editable patch you can use the modes of editing vertices, edges, patches ( Patch), elements and vectors ( Handle).

Rice. 5. Surface editing capabilities Editable poly For example "Autodesk 3ds Max"

It should be noted that "Editable Poly"- the most common modeling method, used to create both complex models and low-poly models for interactive systems.

Creating Objects Using Boolean Operations

One of the most convenient and quickest ways of modeling is to create 3D objects using boolean operations. The essence of this method is that when two objects intersect, you can get a third, which will be the result of addition ( Union), subtraction ( Subtraction) or intersection ( Intersection) of the original objects.

Rice. 6. Applying a boolean operation Substraction

This method is well suited for working with architectural and technical elements, but not desirable for working with organic objects such as people, animals and plants.

Despite the prevalence of Boolean operations, they have drawbacks that lead to errors in the construction of the resulting model (distortion of the proportions and shape of the original objects). For this reason, many users use additional modules to avoid errors in the geometry of the final objects.

Creating 3D Scenes Using Particles

Particle system - way of presentation 3D objects that do not have clear geometric boundaries. Used to create natural phenomena such as clouds, fog, rain, snow. The means of animating the properties of particle systems available in powerful software products make it possible to significantly simplify the creation of various atmospheric phenomena, special effects, which would be impractical and ineffective to achieve by non-procedural methods. A particle system consists of a fixed or arbitrary number of particles. Each particle is represented as a material point with attributes such as speed, color, orientation in space, angular velocity, and others. In the course of the work of the program that simulates the particle, each particle changes its state according to a certain law common to all particles of the system. It should be noted that a particle can be exposed to gravity, change size, color, speed. After performing the necessary calculations, the particle is visualized. A particle can be rendered as a point, triangle, sprite, or even a full 3D model. Particles often have a specified maximum lifespan, after which the particle disappears.

Rice. 7.

Modeling particle systems requires high computer performance. V 3D applications, it is usually assumed that particles do not cast shadows on each other and on the surrounding geometry, and that they do not absorb, but emit light, otherwise the particle systems will require more resources due to a large amount of additional calculations: in the case of light absorption, sorting particles away from the camera, and in the case of shadows, each particle will have to be drawn several times.

NURBS modeling

NURBS (Non-uniform ration B-spline) - a mathematical form used in computer graphics to generate and represent curves and surfaces. NURBS-curves are always smooth. Most often this method is used for modeling organic objects, animation of characters' faces. It is the most difficult method to learn, but at the same time the most customizable. Present in professional packages 3D modeling, most often this is implemented by including in these applications NURB-graphic engine developed by a specialized company.

Rice. eight. NURB-curve

Top related articles