• Daylight in 3d max. Stage lighting

    Understanding lighting in 3D graphics
    In any three-dimensional graphics editor (Lightwave 3D, Maya, Softimage, 3ds Max, etc.), the realism of the rendered image depends on three main factors: the quality of the created three-dimensional model, well-made textures and scene lighting. The same scene, rendered under different lighting, can look completely different. When the position of light sources in the scene changes, the coloring of objects and the shape of cast shadows are distorted, and areas appear that are too flooded with light or too dark.
    Creating realistic lighting in a scene is one of the biggest challenges in 3D graphics development. In reality, an incident ray of light undergoes a huge number of reflections and refractions, so it is very rare to find sharp, unblurred shadows. Another thing is computer graphics. Here, the number of incidences and reflections of the beam is determined only by the hardware capabilities of the computer. Until a certain point, 3D graphics were dominated by harsh shadows. The scene the designer works with is only a simplified physical model, so the rendered image does not always resemble the real thing. But despite this, the lighting in a 3D scene can still be brought closer to the real one. To do this, you need to follow two rules:
    * install light sources and select their brightness (parameters) so that the scene is evenly illuminated;
    * set lighting visualization settings.

    NOTE
    Despite the fact that light sources are most often used to illuminate objects in a scene, sometimes light is used as an independent object, for example, to simulate a distant light in the night, a lighthouse, a star in the sky, etc.

    The problem of lighting in images arose long before the advent of 3D graphics. Artists and photographers were the first to solve the problem of proper lighting, later - cinematographers, and now it has become vital for developers of three-dimensional graphics.
    The most common method is lighting from three points (three-point system). This approach is successful when lighting a single object (for example, portraits in a photo studio); it may not be suitable for complex three-dimensional scenes. The choice of lighting depends on the number of objects, the reflective properties of their materials, and the geometry of the scene.
    For lighting, it is also important what type of light source is used. For example, a directional light source allows you to concentrate attention on a specific object, while an omnidirectional point source allows you to illuminate the entire scene.

    Stage lighting
    So, for 3D models to look natural in a rendered image, they need to be properly lit. By default, 3ds Max 8 uses its own system, which evenly illuminates objects in a 3D scene. With this lighting system, there are no shadows in the final image, which looks unnatural. To make objects cast shadows, you need to add light sources to the scene. As soon as light sources appear in the scene, the lighting system used by 3ds Max 8 automatically turns off.
    Light sources in 3ds Max 8 are divided into directional (Spot) and omnidirectional (Omni). The first category includes Target Spot, Free Spot, and mr Area Spot (used by mental ray). BCCHI etched lights include Omni and mr Area Omni (used by the mental ray renderer).
    Directional sources are used primarily to illuminate a specific object or area of ​​the scene. Using directional light sources, you can simulate, for example, the light of car headlights, the beam of a spotlight or flashlight, etc. Omnidirectional light sources emit light evenly in all directions. Using them, you can simulate, for example, lighting from electric lamps, lanterns, flame light, etc.
    Regardless of which light source is used in the scene, it is characterized by such parameters as Multiplier (Brightness), Decay (Attenuation) and Shadow Map (Type of cast shadow) (Figure 13.1). By default, the Multiplier of any light source is 1, and the Decay option is turned off.
    Since in real life light from sources obeys the laws of physics, the intensity of light propagation depends on the distance to the light source. If you need to simulate a realistic light source, then in the light source settings you need to set the Decay function, which is determined by the inverse dependence of light on distance or the square of the distance. The second option most accurately describes the propagation of light.
    When creating scene illumination in relation to light sources, the following effects are often used.
    * Volume Light - the light created by the source colors the space in the color of the source. In real life, this effect can be observed in dark, dusty or smoky rooms. A beam of light breaking through the darkness is clearly visible.
    * Lens Effects - resembles the effect that is obtained in real life on an image when using special lenses with different lens systems. These can be highlights of various shapes, reflections, etc.
    To use an effect, in the light source's Atmospheres & Effects settings rollout, click the Add button and select the desired effect in the Add Atmosphere or Effect window.

    ADVICE
    You can also add an effect to the scene by running Rendering --> Environment or pressing the 8 key. In the Environment and Effects window, go to the Environment tab (to add the Volume Light effect (Volume Light) or to the Effects tab (to add Lens Effects), then click the Add button to add one of the effects to the scene.

    To configure the effect, use the Setup button in the light source's Atmospheres & Effects settings rollout. This will take you to the Environment and Effects window. In order for the program to calculate the effect, you must specify in its settings which light source the selected effect is applied to. Click the Pick Light button and then click on the light source in the projection window.

    Rules for placing light sources in the scene
    There are many techniques you can use to light a scene to hide minor imperfections and highlight important details. For example, to give volume to a three-dimensional model, it is enough to light it from behind. This will create a clear border, visually separating the object from the background. Another example: if you want to illuminate half of an object, then the other half should also be illuminated by a light source with low intensity. Otherwise, the shaded area of ​​the 3D model will be unnaturally hidden in absolute darkness. This will be especially noticeable if the object is located with its dark side facing the wall. In this case, the light should be reflected from the wall and weakly emphasize the contour of the shadowed side of the object (this happens in reality).
    Along with such techniques, there are also general recommendations on how not to light a stage. For example, the light source should not be located much lower than the illuminated object, as this will give the model an unnatural appearance. In reality, most often we see objects illuminated by a chandelier or the sun, so in 3D scenes the light source should be located from above. This gives the scenes realism.
    Light sources with high intensity should be used very carefully. Lighting created with their help can cause strong highlights and distort the texture of the object. By default, the Multiplier parameter of all lights in 3ds Max 8 is set to 1. Try to avoid values ​​​​exceeding this number if possible, and use the Decay parameter.

    Realistic light sources, artificial and natural, emit light whose intensity decreases as you move away from these sources. All standard light sources in 3ds Max 8 can use varying degrees of attenuation - Inverse or Inverse Square. It can be selected from the Type list of the Intensity/Color/Attenuation settings rollout of the light source. The degree of attenuation that best corresponds to reality is Inverse Square, but it is not always convenient to use due to the fact that too strongly illuminated areas may appear near the source, and completely dark ones at a distance from it. A solution to this problem is to increase the Multiplier value while increasing the distance between the light source and the subject.
    To illuminate the stage, it is convenient to use one main light source and several auxiliary ones. As the main source, you can use, for example, one of the 8 directional light sources available in the 3ds Max arsenal. The intensity of auxiliary light sources should be significantly less than the main one. In addition, auxiliary sources should not create shadows from objects in the scene. A lot of shadows can make a scene look cluttered.

    ADVICE
    When working on lighting, do not forget that in the properties of any light source you can specify which objects it will illuminate and which it will not. To do this, click the Exclude button in the General Parameters settings rollout and make the necessary settings in the window that opens. This feature is needed in order to rationally use program resources and not overload the already complex visualization process. Excluding objects from the area of ​​influence of light sources can be considered a kind of scene optimization.

    Thus, choosing the position of light sources in a scene is a rather difficult task. Poor placement of light sources can create too dark areas in the scene, and the objects themselves can be difficult to see due to insufficient lighting or, conversely, too bright light. Because each 3D scene has its own unique geometric characteristics, the location of the sources will be different for different scenes. For this reason, it is difficult to develop specific rules that can be followed to optimally illuminate a scene. Regardless, there are a few general tips to follow to avoid ruining your 3D composition with poorly placed lighting.
    * You should not set the brightness value of light sources to greater than or equal to 1 unless absolutely necessary, as this may result in overexposed areas and unwanted glare.
    * Keep in mind that objects illuminated from behind will appear slightly more three-dimensional in the final image.
    * If there are several light sources in the scene, the brightness at a single point is equal to the total brightness of all sources in the scene.
    * Having a lot of light sources in a scene can cause a lot of chaotic shadows, which will be unnecessary in the rendered image.
    * If you want to achieve photographic realism, then to visualize the scene it is better to use special plug-in photorealistic visualizers, which in terms of rendering accuracy are an order of magnitude higher than the standard visualization module (Default Scanline Renclerer).

    Characteristics of Light and Shadow Rendering Techniques
    Light has three main characteristics: brightness (Multiplier), color (Color) and shadows cast from the objects it illuminates (Shadows).
    When arranging light sources in a scene, be sure to pay attention to their color. Daylight sources have a blue tint, but to create an artificial light source you need to give it a yellowish color. It should also be taken into account that the color of the source simulating street light depends on the time of day. If the scene involves evening time, the lighting may be in the reddish shades of a summer sunset.
    Various renderers offer their own shadow generation algorithms. The shadow cast from an object can say a lot - how high it is above the ground, what is the structure of the surface on which the shadow falls, what kind of source is the object illuminated, etc. In addition, a shadow can emphasize the contrast between the foreground and background, as well as “ display” an object that was not in the field of view of the virtual camera lens. Depending on the shape of the shadow cast by the object, the scene may or may not look realistic.
    As we said above, a real beam of light undergoes a large number of reflections and refractions, so real shadows always have blurry edges. In 3D graphics, a special term used to describe such shadows is soft shadows. Achieving soft shadows is quite difficult. Many renderers solve the problem of soft shadows by adding a non-point light source, rectangular or other shaped, to the 3ds Max 8 interface. Such a source emits light not from one point, but from every point on the surface. Moreover, the larger the area of ​​the light source, the softer the shadows are when rendered.
    There are different approaches to rendering shadows - using shadow maps(Shadow Map), traces(Raytraced) and global illumination(Global Illumination). Let's look at them in order.
    Using a shadow map allows you to get blurry shadows with unclear edges. The main Shadow Map setting is the size of the shadow map (the Size parameter in the Shadow Map Params settings rollout). If the map size is reduced, the clarity of the resulting shadows will also decrease.
    The tracing method makes it possible to obtain ideally shaped shadows, which, however, look unnatural due to their sharp outline. Tracing is the tracking of individual light rays from a light source to a camera lens, taking into account their reflection from scene objects and refraction in transparent media. The tracing method is often used to render scenes that contain specular reflections.
    Starting with 3ds Max 5, the Area Shadows method, which is based on a slightly modified tracing method, is used to obtain soft shadows. Area Shadows (Shadow distribution) allows you to calculate shadows from an object as if there was not one light source in the scene, but a group of point light sources evenly distributed in a certain area.
    Although ray tracing accurately reproduces the fine details of the generated shadows, it is not an ideal rendering solution due to the sharp outlines of the resulting shadows.
    The global illumination method (Radiosity) allows you to achieve soft shadows in the final image. This method is an alternative to lighting tracing. If tracing visualizes only those areas of the scene that are illuminated by light rays, then global illumination calculates the dispersion of light in unlit or shadowed areas of the scene based on an analysis of each pixel in the image. This takes into account all reflections of light rays in the scene.


    ADVICE
    Global illumination can produce realistic images, but the rendering process is very taxing on the workstation and also takes a long time. Therefore, in some cases it makes sense to use a lighting system that simulates the effect of diffused light. In this case, light sources must be placed in such a way that their position coincides with the places of direct light exposure. Such sources should not create shadows and should have low brightness. This method certainly does not produce as realistic an image as can be obtained using a true global illumination method. However, in scenes that have simple geometry, it can be quite useful.

    There are several algorithms for calculating global illumination; one of the methods for calculating reflected light is Photon Mapping. This method involves calculating global illumination based on creating a so-called photon map. Photon map represents scene illuminance information collected using tracing.
    The advantage of the photon tracing method is that once saved as a photon map, the photon tracing results can later be used to create global illumination effects in 3D animation scenes. The quality of global illumination calculated using photon tracing depends on the number of photons, as well as the tracing depth. Using photon tracing, you can also calculate the caustic effect.

    V-Ray is one of the most popular plugins for creating photorealistic renderings. Its distinctive feature is ease of setup and the ability to obtain high-quality results. Using V-Ray in 3ds Max, you create materials, lighting, and cameras that interact in a scene to quickly create a naturalistic image.

    In this article we will explore lighting settings using V-Ray. The right light is very important to create a visualization correctly. It should bring out all the best qualities of objects in the scene, create natural shadows and provide protection from noise, overexposure and other artifacts. Let's look at the V-Ray tools for adjusting lighting.

    1. First of all, download and install V-Ray. We go to the developer’s website and select the version of V-Ray designed for 3ds Max. Let's download it. In order to download the program, register on the site.

    2. Install the program following the prompts of the installation wizard.

    3. Launch 3ds Max, press the F10 key. Here is the render settings panel. On the “Common” tab, find the “Assign Renderer” rollout and select V-Ray. Click “Save as defaults”.

    Lighting comes in different types depending on the features of the scene. Of course, the lighting for object rendering will be different from the lighting settings for the exterior. Let's look at several basic lighting schemes.

    Setting up light for exterior rendering

    1. Open the scene in which the lighting will be adjusted.

    2. Set up the light source. We will imitate the sun. In the Create tab of the toolbar, select Lights and click V-Ray Sun.

    3. Specify the starting and ending points of the sun's rays. The angle between the beam and the earth's surface will determine the morning, afternoon or evening type of atmosphere.

    4. Select the sun and go to the "Modify" tab. We are interested in the following parameters:

    — Enabled — turns the sun on and off.

    — Turbidity — the higher this value, the more dusty the atmosphere.

    — Intensity multiplier — a parameter that regulates the brightness of sunlight.

    — Size multiplier — the size of the sun. The higher the parameter, the more blurry the shadows will be.

    — Shadow subdivs — the higher this number, the better the quality of the shadows.

    5. This completes the sun setup. Let's adjust the sky to make it more realistic. Press the "8" key and the environment panel will open. Select the DefaultVraySky map as the environment map as shown in the screenshot.

    6. Without closing the environment panel, press the "M" key to open the material editor. Drag the DefaultVraySky map from the slot in the environment panel into the material editor while holding down the left mouse button.

    7. Edit the sky map in the material browser. After selecting the map, check the “Specify sun node” checkbox. Click "None" in the "Sun light" field and click on the sun in the model view. We have just connected the sun and the sky. Now the position of the sun will determine the brightness of the sky, completely simulating the state of the atmosphere at any time of the day. We will leave the remaining settings as default.

    8. In general terms, the exterior lighting is set. Run renders and experiment with light to achieve the effects you want.

    For example, to create the atmosphere of a cloudy day, turn off the sun in its parameters and leave only the sky or HDRI map shining.

    Setting up light for object visualization

    1. Open a scene with a finished composition for rendering.

    2. In the Create tab of the toolbar, select Lights and click V-Ray Light.

    3. Click in the projection where you want to place the light source. In this example, let's place the light in front of the object.

    4. Let's configure the light source parameters.

    — Type — this parameter specifies the shape of the source: flat, spherical, dome. Shape is important when the light source is visible in the scene. For our case, let Plane remain the default.

    — Intensity — allows you to set the color strength in lumens or relative values. We leave relative ones - they are easier to regulate. The higher the number on the Multiplier line, the brighter the light.

    — Color — determines the color of the light.

    — Invisible — the light source can be made invisible in the scene, but it will continue to shine.

    — Sampling — the “Subdivides” parameter adjusts the quality of rendering of light and shadows. The higher the number in the line, the higher the quality.

    It is better to leave the remaining parameters at default.

    5. For object visualization, it is recommended to install several light sources of different sizes, illumination intensity and distance from the object. Place two more lights in the scene on either side of the subject. You can rotate them relative to the scene and adjust their parameters.

    This method is not a “magic pill” for perfect lighting, but it simulates a real photo studio, and by experimenting in it, you will achieve a very high-quality result.

    Purpose of the work: learning the basic techniques of creating and setting up light sources in 3D Studio Max.

    Creating a Light Source

    Create a plane to simulate the surface. Install an object of type on it Teapot.

    We will look at the sources first Spotlight. They happen Target(directional) and Free(free). The difference is that the directional source has an auxiliary object Target, which seems to “target” the light source. We will use a directional light source because... it is easier to direct it in the right direction.

    Using the menu Create -> Standard Lights -> Target Spotlight Create a "directional spotlight" source and set it as shown in Figure 1.
    Figure 1. Creating a scene.
    Visualize the scene. The visualization result can be seen in Figure 2.

    Figure 2. Rendering a scene using a light source.
    Now let’s raise the light source up so that the spotlight covers a larger area and increase the plane under the teapot (Fig. 3). After that, to change the parameters of the light source, select it and go to the tab Modify.

    Figure 3. The light source now covers the entire teapot, and the plane is enlarged.

    In a scroll Shadows check the box On(enabled) and set the shadow rendering method to Adv. Ray Traced. Visualize the scene - you will see that our teapot has begun to cast a shadow (Fig. 4).

    Figure 4. Rendering with shadows enabled.
    But, as a rule, in order to properly illuminate the scene, it is necessary to illuminate the object with a second light source with shadows turned off. So create a light source like Omni and position it as shown in Figure 5.

    Omni- is a point omnidirectional light source and is very convenient for creating global scene illumination.

    After that, in the light source parameters, activate the scroll Intensity/Color/Attenuation and set the parameter Multiply equal 0.77 .

    Visualize the scene.

    As can be seen from Figure 5, the scene has become more juicy, bright and realistic.

    Figure 5. Rendered scene with a second light source as backlight.
    Remove the light source Target Spotlight and set the light source Directional.

    Object Directional Light in 3D Studio Max is something like a hybrid between a traditional parallel and a point light source.

    Directional Light similar to a point light source in that it has a bright point ( Hotspot) and the lighting action limit ( Falloff). This helps control the extent to which shadows can be rendered in the scene and the size of the lighting boundary. When the bright point is minimized, Directional Light becomes similar to a photographic light source, casting soft local light (Fig. 6).

    Figure 6. Installed Directional light source.
    Visualize the scene. The visualization result is shown in Fig. 7.

    Figure 7. Rendering using the Directional light source.

    Lighting a scene requires just as much effort as modeling it, because in most cases it is necessary to ensure a realistic effect. This is not an easy task at all, because in the real world light sources work completely differently than in the virtual one. For example, light is not reflected from the surfaces of objects - as a result, if in fact a single light bulb can illuminate an entire room, including areas hidden from direct light rays (diffuse scattering), then in 3D Studio MAX such areas will remain completely dark. This means that diffuse light scattering will have to be simulated using additional lighting. And vice versa, virtual light sources can be configured so that they will not increase, but decrease the illumination of the scene, which is basically impossible in reality, etc.

    Properly selected lighting is one of the most significant factors in ensuring the realism of a scene when rendering it. It creates contrasts between objects, makes the materials used more vibrant and expressive, and allows you to adjust the shadows of objects. In addition, lighting determines the overall mood of the scene - for example, diffused light creates the effect of tranquility, dim lighting can cause fear, flickering light - a feeling of anxiety, etc. We will look at some of the simplest techniques for setting up lighting now, and we will look at more complex aspects of working with lighting in one of the upcoming lessons.

    Theoretical aspects

    Setting up scene lighting involves creating light sources in it and determining their position and parameters. Light sources (like any other objects in the scene) vary in type - each of them has its own properties and scope. Work with sources is carried out in parallel with the creation of geometry objects, however, the final adjustment of their parameters is carried out in the process of creating and assigning materials, since lighting is closely related to texturing and can affect the display characteristics of materials, as well as lead to the appearance of shadows. When you create a scene, objects in the scene are automatically lit, but adding the first light source overrides the default lighting. When you delete all the created lights, the scene is re-lit with the default lights.

    The main light sources include the following (Fig. 1):

    • Omni(Omnidirectional) - casts rays evenly in all directions from a single point source, like a light bulb without a lampshade;
    • Target Spot(Target spotlight) and Free Spot(Free spotlight) - propagate rays from a point in a certain direction in a conical flow and illuminate the area inside the cone. The difference between these two sources is that the direction of the light rays in the first of them is strictly determined by the target point ( Target), and the second source does not have such a target point and therefore the direction of the light rays in it can change when the source rotates;
    • Target Directional(Aimed Direct) and Free Directional(Free Direct) - propagate rays from a plane in a parallel flow in a certain direction and illuminate the area inside a straight or inclined cylinder. These sources differ from each other in that the direction of the light rays in the first of them is bound to the target, while the second is directed freely (the direction of the light rays thrown by it changes when the source rotates).

    The category is responsible for creating light sources Lights(Light sources) panels Create(Create), when selected, all the above-described types of sources become available (Fig. 2). The technology for their creation is reminiscent of the creation of geometry objects. You need to select the source type and either simply click on the point of its creation in one of the projection windows (for all sources except types Target), or drag the mouse while holding down the left button, thus indicating not only the location of the source, but also its Target point. The created sources (as well as geometry objects) are assigned names: Omni01, Spot01, etc., which are best immediately replaced with more informative ones. Any light source can be moved, rotated, and scaled in viewports just like any other standard object.

    Source parameters are either set immediately when they are created on the panel Create, or changed later via the panel Modify. The list of parameters is quite impressive, and in this tutorial we will look at just a few of them. All parameters are divided into scrolls, the main ones being the following:

    • General Parameters(General parameters) - allows you to change the type of source, enable or disable the ability to generate falling shadows and exclude individual objects from the sphere of influence of the source, which is important when simulating special lighting effects (such as flashes) or when selectively illuminating one or a group of objects;
    • Intensity/Color/Attenuation(Intensity/Color/Attenuation) - designed to control the intensity, color and spatial attenuation of the light flux, allowing for illumination heterogeneity characteristic of real-world objects;
    • Shadow Parameters(Shadow Options) and Shadow Map Parameters(Shadow map parameters) - are responsible for the nature of shadow generation. They allow you to adjust the clarity of the border, change the color of the shadow, increase/decrease the distance from the object to the shadow, add a texture map to the shadow map, adjust shadows when introducing atmospheric effects, simulate blurry shadows in foggy lighting or sharp shadows created by the bright midday sun, etc. d.;
    • Advanced Effects(Advanced effects) - allow you to control the clarity of the transition from areas of the object illuminated by the source to those not illuminated, enable or disable glare on the object from the light source, assign a texture map to the source, etc.

    Omni light source

    Prepare a simple scene of two objects: a plane and a ball (Fig. 3). Create a light source like Omni by opening the category Lights panels Create, click on the button with the name Omni, and then point the mouse in one of the projection windows to the location of the source - an object will appear that looks like an octahedron, which represents the created light source. Tool Select and Move adjust the position of the source so that in the projection Front it was located to the right of the ball and was located much higher than it, and then (with the source highlighted) in the scroll General Parameters panels Modify enable the checkbox Shadows to generate shadows (Fig. 4). Render - the ball will be illuminated from the right and will cast a shadow (Fig. 5). Try moving the light source around the ball and you will see that depending on the position of the source, one or another part of the ball will be illuminated. At the end of the experiment, return the source to its original position to the right of the ball.

    Rice. 4. Initial light source setup Omni

    Rice. 5. Ball with one Omni-source

    Now let's learn how to control the light intensity. To do this, with the light source selected, activate the panel Modify and in the scroll Intensity/Color/Attenuation increase the parameter value Multiplier(Coefficient), for example, up to 2 - the scene lighting will become much brighter (Fig. 6). In the same scroll (in the dialog box Color Selector: Light Color, opened by clicking on the field located to the right of the parameter Multiplier) you can change the color of the light rays. For example, try changing the default white color, for example, to yellow - when rendered, the scene will appear illuminated by a “yellow light bulb” (Fig. 7).

    Add another Omni source to the scene and place it on the projection Front to the left of the ball, but so that it is much lower than the first source (Fig. 8). Reduce the intensity of the second source to approximately 0.7, and leave its color white - now the ball will be illuminated from both sides (Fig. 9).

    Rice. 8. Adding and setting up a second Omni-source

    Rice. 9. Ball with two Omni-sources

    Light source Free Directional

    Removing both Omni lights will not darken the scene as the default lights will be turned back on. Create one type light source Free Directional(to do this, the easiest way is to select this type of source and click in the center of the ball on the projection Top- then the source will immediately be directed towards the ball). Then move it as needed with the tool Select and Move and adjust its angle of inclination with a tool Select and Rotate(Fig. 10). If you render, it turns out that the ball is illuminated together with a fragment of the plane, and quite intensely, while the other part of the plane is not visible at all (Fig. 11). It turns out that the brightness of the source is too high, but the coverage area of ​​the light flux is clearly insufficient. The situation is easy to change. First, let’s figure out what parameters the coverage area of ​​the light flux depends on. By adjusting parameter values Hotspot/Beam(defines the size of the light cone for the inner, extremely saturated beam) and Falloff/Field(sets the size of the outer limits of the beam fade to the edges) in the rollout Directional Parameters, you can change the size of the light spot appearing from the light beam and the nature of its boundary, which can be clear or, conversely, blurry. By default, the spot has a clear boundary, which is far from reality. Do Hotspot/Beam equal to 25, and Falloff/Field- 50, as a result, the spot of light will become blurry (the values ​​of these parameters in each specific case will be different, it is only important that the value of the first parameter is approximately twice the value of the second) - fig. 12. And vice versa, if the values ​​of these parameters are close, then the boundary will be clear. As for the size of the light spot, they directly depend on the value of the parameter Hotspot/Beam- the higher it is, the larger the spot size. If desired, in this scroll you can also change the cross-sectional shape of the light cone (and therefore the shape of the light spot) from round ( Circle) to rectangular ( Rectangle). When selecting the latter, it becomes possible to adjust the aspect ratio of the light rectangle with the parameter Aspect.

    Rice. 10. Source setup Free Directional

    Rice. 11. Single source scene Free Directional

    Now expand the boundaries of illumination so that inside the light cone there is not only a ball, but also a b O most of the plane, and do not forget that the parameter values Hotspot/Beam And Falloff/Field should differ sufficiently so that the decrease in illumination towards the edges of the plane occurs gradually. Reduce light intensity ( Multiplier) to about 0.6 and enable the checkbox Shadows to generate shadows - the scene will be illuminated more naturally, although the lighting level will be insufficient (Fig. 13). To increase the light level, try creating two additional light sources (Fig. 14). For the first one (the task of which is to create general lighting of the scene), select the type Omni, yellow color and intensity of the order of 0.8-0.9. The purpose of the second is to provide the effect of secondary lighting, which occurs due to the reflection of incident light from light surfaces (in this case, a plane). In our example, this effect should appear on the lower surface of the ball in the form of some kind of colored highlight. To imitate a similar effect, install a weak colored light source under the plane that does not cast a shadow - for example, a source like Free Directional. In our case, it is set to a color similar to the hue of the plane, the intensity of which is approximately 1.1, and the size is such that the plane is completely within the boundaries of the internal light cone Hotspot/Beam. The final view of the scene is shown in Fig. 15.

    Target Spot Light Source

    Create a scene by placing a ball, cylinder, and cube on a plane and assigning a material to the plane based on the marble texture (Figure 16). Before creating a new light source, first zoom out the scene to place the source at a sufficient distance from its objects. Activate in category Lights source type Target Spot, switch to projection Front, place the mouse pointer in the upper left part of this window, click the left mouse button at this point and, without releasing the mouse, point it towards the objects - a targeted spotlight will be created (Fig. 17). If you immediately render, the result will be very far from the desired one (Fig. 18): the plane under the objects will be illuminated, and the objects themselves will be practically invisible.

    Rice. 17. Creating a light source Target Spot

    Rice. 18. Initial illumination of the scene by the source Target Spot

    Let's try to change the situation and ensure that the sides of the objects facing the viewer are illuminated. As noted above, targeted light sources differ from free ones in the presence of a target ( Target) - an empty object towards which the axis of the beam of rays of the light source is directed. Changing the characteristics of illumination of objects with such a source is possible both by influencing the source itself and its dummy object. For example, when you move a dummy object, the light source will automatically change its orientation, but will continue to be aimed at the dummy object. Try it by alternating the tool Select and Move on the source and on the dummy object, position the source so that the edges of the objects located in the foreground are illuminated (Fig. 19). Visualize the scene (Fig. 20).

    Rice. 19. Correction of source position Target Spot

    In a scroll General Parameters increase the intensity of the source by setting the parameter Multiplier equal to 1.25, and check the box Shadows- the scene will become brighter and objects will now even cast shadows, albeit too dark (Fig. 21). So open the scroll Shadow Parameters(Shadow Options) and reduce the shadow density by setting the counter Dens(Density) equal to 0.5 - shadows will look more natural (Fig. 22). If desired, in this scroll you can also change the color of the shadow in the field Color(Fig. 23) or make the shadow color take into account the color of the source - for this in the menu Shadow Parameters you will need to enable the checkbox Light Affects Shadow Color(Fig. 24).

    And finally, to improve the appearance of the scene, try adding two more light sources to it: an Omni-yellow source with an intensity of about 0.3-0.5 to create a general light background and a source like Target Spot pink color with an intensity of about 2 to simulate the effect of secondary lighting (Fig. 25). Additionally, assign the plane a new material type Raytrace and connect the already used texture to it, trying to create an imitation of polished marble. The final view of the rendered scene is shown in Fig. 26.

    Free Spot light source

    Free spotlight Free Spot different from the source just discussed Free Directional the fact that its rays do not diverge in a parallel beam, but in a conical beam, like the light of real spotlights, theatrical spotlights, flashlights, etc. Let's try to create three such sources to illuminate the plane with the torus (Fig. 27) approximately in the same way as it could be illuminated by multi-colored theater spotlights. First, set up a weak Omni source for general lighting of the scene (Fig. 28). Then add the first free spotlight, for example with blue beams and small light cones (in this case the parameter Hotspot/Beam is equal to 10, and Falloff/Field-20) - fig. 29. It is most convenient to create a spotlight in projection Top by clicking directly on the object it should be aimed at. As a result, the rendered scene will resemble a picture. 30. In exactly the same way, create two more color spotlights (red and green) with the same parameters, and then adjust the position of all three spotlights in the projection windows, for example, as shown in Fig. 31. Select the checkbox for each source Shadows to generate shadows and render the scene (Fig. 32). Because the shadows look too black, reduce their density ( Dens) in a scroll Shadow Parameters to approximately 0.3-0.4 (Fig. 33).

    Rice. 28. Adding a light source Omni

    And finally, let's try to use the interesting possibility of assigning a texture map to the spotlight Projector Map(Projected map), which allows you to either combine the display of a light spot with the image of an arbitrary image (if, for example, a regular photograph is used), or modify the boundary of the light spot in a certain way (if a black and white image is used, playing the role of a mask). We will use the second option and assign the textures shown in Fig. 34, 35 and 36 respectively - this must be done in a scroll Advanced Effects(Fig. 37). A possible result of assigning texture maps is shown in Fig. 38, to achieve which the torus was additionally assigned a new material that imitates plastic.

    Daylight sources Sunlight And Daylight located on the tab Systems panels Create. Their distinctive feature is the spatial orientation of light sources relative to geographic location and time of day.

    An auxiliary object is used for spatial orientation Compass, which specifies geographic directions (north, south, west and east). This object disintegrates into the scene along with the light source and is not rendered (Fig. 17.20).

    Rice. 17.20. Object Compass on the grid plane

    To create a source of sunlight, you need to do the following:

    1. Choose a light source Sunlight.

    2. In the projection window Top left-click on the location where the object is installed Compass and, holding the button, stretch it to the desired size.

    3. Move the mouse up or down the screen to set the height of the light source (the orbital distance will be set).

    4. In the light source parameters rollout in the parameters group Location press the button Get Location.

    5. In the dialog box that opens, set the geographic location on the map (Fig. 17.21).

    Rice. 17.21. Dialog box Geographic Location

    6. In the parameter group Time set to field Time Zone time shift, then set the date and time in the appropriate fields (Fig. 17.22).

    Rice. 17.22. Source parameters scroll Sunlight

    Parameter Azimuth determines the angle between the current position and the direction north. Parameter Altitude indicates the angle between the current position and the horizon.

    Values Latitude And Longitude can be inserted manually.

    You can change the position parameters of the created solar system in the panel Motion.

    Daylight sources are widely used in case of anemia of daily intervals (Fig. 17.23).

    Rice. 17.23. Application of solar light source

    Source Daylight combines a combination of sunlight and heavenly light. It is created in the same way as a sunlight source, the lighting parameters are configured in the same way (geographic location, date and time are set).

    In addition to the sunlight settings, rollouts of light source parameters Daylight contain settings for the sky light source.

    Rice. 17.24. Illumination with a daylight source (sunset)

    In the parameters rollout Daylight Parameters You can change the types of lighting parameters for sunlight and sky light in the corresponding drop-down scrolls. Currently, parameters are widely used to configure daylight sources mr Sky (Sky mr) And mr Sun (Sun mr) together with activated parameters mr Physical Sky(Fig. 17.24).

    For daylight sources, there is a function for setting weather conditions based on weather data files Energy Plus Weather(EPW).

    In the parameters rollout Control Parameters source, a switch has appeared that determines the method of specifying source coordinates: Manual, Date, Time

    and Location (Date, time and location) And Weather Data File(Fig. 17.25).

    Rice. 17.25. Scroll fragment Control Parameters

    Rice. 17.26. Dialog box

    When you click the button opposite the option Weather Data File a dialog box will open Configure Weather Data(Fig. 17.26).

    Pressing a button Load Weather Data Opens a standard browser window to select a weather data file. Weather data files are available for downloading on the Internet.

    After selecting the appropriate file, information appears about the location, period of data recording and the number of periods.

    Based on this data, you can set the animation modes of the daylight source, its orbit of movement, light intensity, nebula, etc. (Fig. 17.27).

    Rice. 17.27. A frame of an animation sequence of a daylight source (dawn)