Interior lighting system in mental ray. Fragment of the book: Daylight system About direct lighting

Hi all. My name is Maxim Ganzha, today, after numerous requests from my friends, I decided to write a short article about how I create my interiors. Let's consider all of us on one of the latest works with crazy lighting and awesome composition =), which I did in MentalRay.

"Livingroom"

Have you ever wondered why some works are more interesting on the forums than others? I'll tell you a little secret. It's all about beautiful lighting and strong composition. We will talk about this, as well as many other things, in this article. =)

I think we will skip the modeling process otherwise the article will be very long and boring. So let's go!

1. Setting up and setting up lighting.

In order to get started, first of all, you need to open the scene, and select the Mental ray renderer from the list of available renderers.

We open the stage.

Go to render settings F10, in the "Assign renderer" tab, click the "Choose renderer" button and select Mental Ray.

Once we have selected a render, mental ray shaders and materials will become available in the material and map browser. Select the "Arch & Design" Material and adjust the RGB diffuse color around 0.8 0.8 0.8 as follows, rest of the settings in the screenshot. I would also like to note that you should not forget to include "AO" in the materials. With this setting, the shadows will look more realistic. and the darkening characteristic of real light will appear in the corners. "Max Distance" always put about 3 meters (distance from floor to ceiling).

Open the render settings, In the "Translator Options" tab, enable the Eneble checkbox on Material Override and throw our prepared gray material into the slot. This will ensure that all objects in the scene are painted with the same material. This will make it easier for you and your computer to adjust the lighting. Rendering will be fast and not time consuming. We will look at the materials of all objects in the scene later.

After assigning a gray material to all objects, we need to create a "Daylight System"

create and place the sun It's okay if it shines in the other direction. go to the system settings and, as shown in the figure below, check the "Manual" box, after which we can set the sun as we please without setting the time and date. Place the sun as shown in the picture.


During the creation of the daylight system, 3ds max will offer us to put "mrSky" as the environment, we agree and move on.

after we have installed the daylighting system, we take up the windows. You need to put "mr Sky Portal" in them, it is located next to the photometric lamps.

press the button and set as shown in the figure below.

as you noticed the portal is directed by the arrow in the wrong direction. We need the arrow to point into the room. To do this, simply click the Flip Light Flux Direction checkbox. And everything will fall into place as in the figure below. =)

we select our portal, hold down the "Shift" key and move it to the left to the second window. 3ds max will offer us a copy type. Select "Instance"

Finally put the daylight. Now we just need to set it up. Press "F10" turn on Final Gather (FG) Global and Illumination (GI). The settings are shown below. I just turned on the FG & GI checkboxes and lowered the quality of the FG Precision Preset.

We set the image resolution to 450 by 338 and make a test render.


Press the 8 key and in the "Environment" settings in the "Exposure Control" tab, set "mr Photographic Exposure Control".

Press render and see what we got =)

This render has the following exposure settings:

As you can see, nothing remarkable happened. The light is dim and ugly. In order to make beautiful lighting, we will have to twist the exposure control a little. Then I remembered that I wanted to use artificial light. Turn on the floor lamp next to the sofa. The sun would obviously interfere with this and I turned it off. We go into the settings of the Daylighting System and uncheck the "On" checkbox in the "mr Sun Basic Parameters" tab.

Now press the "8" key again and set the exposure control as shown in the figure below.


And here's what we got.

Well, that's a completely different matter. The light became like daylight. =)
Now let's start setting up the lighting of the floor lamp. In artificial lighting, I like to use photometric fixtures. Choose this lamp:

And put the bulbs in place in the floor lamp as shown in the figures below.


in the settings of the lamp, turn on the shadows "Ray Traced Shadows" In the "Shape/Area Shadows" tab, set the disk with a radius of 30 mm. Turn on the "Light Shape Visible Rendering" checkbox and set 64 samples. These settings will allow us to achieve beautiful realistic shadows from the lamp.

let's see what happened.

We see that the light from the lamp turned out to be white. And I would like to make it more like a simple light bulb. To do this, we need to lower the temperature of the light. We also see that the light is too intense. With such a shutter speed of the camera and such daylight, it should be practically invisible. and he is like a spotlight. =)

Open the settings of the photometric lamp again and adjust the temperature with intensity.

Let's see what happened:

This is what we need. Perfect light! I don't know about you, but I really like it. Yes, and whoever plays orange light with blue is a win-win option in architectural visualization. =)

I would like to add some special effects. To do this, go to the render settings, and in the "Camera Effects" tab, turn on the "Output" checkbox DefaultOutputShader (Glare) take the shader with the mouse and throw it in the "Material Editor", after that 3ds max will offer us the copy type, We put "Instance" click " ok".


Behind the windows, as in the figure below, we put the "plan" object, which will play the role of a background for us.

in the settings of the "plan" object, turn off the checkboxes as follows.


And assign it the material "Arch & Design"

Once again, press the render button and see what we got. =) For a quick rendering, I assigned a gray material to all objects except the background.

Well, here we have good picture. A slight haze from the glow effect gives the picture a lively atmosphere. You can stop with the render settings and start looking at the materials.

2. Customization of materials.

It's time to break down the most basic materials that I used in this scene. Let's start with the most interesting.

Carpet.

As you can see from the grid, the geometry is very simple.

the carpet used a simple material "Arch & Design" with the following parameters:

Diffusion map.

"Displacement" used the following texture.


Sofa.

The mesh of the sofa is quite complex. On this model I used two materials. Fabric and wood legs.

Let's look at the fabric material first.

in the diffuse slot we throw the shader "Ambient / Reflective Occlussion" and in it we place two fabric textures of the same type. The only difference is that one is darker than the other. The settings are in the picture below.

the following parameters are ambient ok and bump.

now wooden legs.

In diffuse I used a simple parquet map. The settings are in the picture below.

bump settings.

Coffee table.

The material and mesh of the coffee table is as follows.



everything is simple with glass, select the material "Arch & Design" and select the finished material in it as shown in the figure below.


Magazines.

I wanted to make "Arch & Design" a glossy magazine, I didn't really bother with material settings. Therefore, I used a simple glossy plastic.

magazine grid.


settings look like this.

I colored the pages with the same material, only with white in the Diffuse color.

Newspaper.

The magazine rack itself is made of lacquered wood. Decided to color it with "ProMaterials" Hardwood.


Newspaper grid.

Promaterial Hardwood settings.


I also used the second material to color the newspapers themselves and made it matte.

newspaper material settings.

Flower.

At this stage, I used the same, my favorite material "Arch & Design".

You can see the settings in the pictures below.


Curtains.

I had to experiment a little with curtains. And finally, I came to this option.

Mesh curtains.

In the diffuse as shown in the image below, I naturally used the fabric texture. Also, do not forget about the AO parameter. =)


Walls.

The walls were made of old plaster, which was later painted with paint. And that's what I got, again my favorite "Arch & Design".

The map looks like this on the wall.

Reflection settings look like this.

Parquet material (floor covering).

Settings.



Floor lamp.

On the floor lamp, I used three materials. These are a lampshade (fabric material), a rack (metal material) and an electric wire (plastic material).

let's start with my favorite material "Arch & Design" is the fabric on the lampshade of the floor lamp.

He's pretty simple. Diffuse color, slight transparency and bump. We will see this in the settings in the pictures below.

To make the metal material of the rack, I used ProMaterials: Metal.

Floor lamp plastic wiring material ProMaterials: Plastic/Vinyl

I would also like to advise you one resource that is directly related to Mental Ray materials. He helped me many times. Thanks to those who founded the site. http://www.mrmaterials.com/

That's probably all, with the materials finished. Now we can discuss composition.
3. Final render settings.

It's time to increase the render settings and make the final render. You can see the settings in the picture below.

Turn on render and wait =)

4. Composition.

There are 10 composition rules worth learning.

1. Contrast.



ms_Dessi

How to draw the viewer's attention to your render? There should be contrast in the frame: A lighter object is shot against a dark background, and a dark one against a light one.

2. Accommodation.



Morro

Important plot elements should not be randomly placed. It is better that they form simple geometric shapes.

3. Balance.

Objects located in different parts of the frame must match each other in volume, size and tone.

4. Golden section.

The golden ratio was known in ancient Egypt, its properties were studied by Euclid and Leonardo da Vinci. The simplest description of the golden ratio is that the best point for the location of the subject is about 1/3 of the horizontal or vertical border of the frame. The location of important objects in these visual points looks natural and attracts the viewer's attention.

5. Diagonals.



FeodorIvaneev



FeodorIvaneev

One of the most effective compositional techniques is diagonal composition. Its essence is very simple: we place the main objects of the frame along the diagonal of the frame. For example, from the top left corner of the frame to the bottom right. This technique is good because such a composition continuously leads the viewer's eye through the whole picture.

6. Frame format.



Morro


FeodorIvaneev

If the render is dominated by vertical objects, use the vertical frame format. If the objects are horizontal, take horizontal shots.

7. Shooting point.



FeodorIvaneev

The choice of shooting point directly affects the emotional perception of the picture. Let's remember a few simple rules: For character rendering, the best point is at eye level. For a full-length portrait - at waist level. Try to crop the frame so that the horizon line does not divide the photo in half. Otherwise, it will be difficult for the viewer to focus on the objects in the frame. Adjust the camera angle at the object level, otherwise you risk getting distorted proportions. When viewed from above, an object appears smaller than it really is. So, drawing a character from the top point, on the render you will get a character of small stature.



Dmitry Schuka

Our brain is used to reading from left to right, so we also evaluate the picture. Therefore, the semantic center is better placed on the right side of the frame. Thus, the eye and the subject seem to be moving towards each other. When building a composition, always keep this in mind.

9. Color spot.


If there is a spot of color in one part of the frame, then there must be something in the other that will attract the attention of the viewer. This may be another color spot or, for example, an action in the frame.

10. Movement in the frame.


Aleksandr1

If you decide to draw a moving object (car, cyclist), always leave free space in front of the object. Simply put, position the subject as if it had just "entered" the frame, not "left" it.

Perhaps we will focus on the composition and proceed to the post-processing of the render.

5. Post processing.

Now it's time to do a little post-processing on the resulting image. Usually I always resort to this in my daily work. Since some things are still easier to achieve in Photoshop than by means of rendering. So what do we have =)

If you look closely, the possibilities of Mental Ray are very wide, the picture practically does not require effects. But it's still worth adding a few lens effects. To get the feeling of a real photo.

It seemed to me that the picture lacks the effect of a blue glow around the windows, so we open our renderer in the excellent program "Fusion" and apply a glow effect to the existing image. Speaking in common, we cling to it the "SoftGlow" node

click the polygon and draw a window as shown in the figure below. Thus, we drew a mask in fusion on which the glow effect will be applied.


now click on the SoftGlow node and configure as follows.

we will have a pleasant glow at the windows.

add the SoftGlow node again and apply the effect to the whole picture. Set it up as follows so that the whole picture has a slight blue glow.

turn off the checkboxes Red, Green and Alpha and move the Gain slider a little to the right. The picture below shows both options. Left before, right after applying the effect.

Close Fusion and open the image in Photoshop.


In Photoshop we open the image with the Magic Bullet Photo Looks plugin... and apply the Anamorphic Flare effect with the following settings

there was a very beautiful glow characteristic of a real camera. Next, apply the Vignette effect and add a slight darkening around the edge of the picture. The settings are also shown in the lower right corner.


Adding a very interesting effect called Shutter Streak adds small rays to the top and bottom of our image.

now my favorite step =)
Add the Chromatic Aberration effect and set it up as shown in the image below.


at a high resolution of the picture, it will almost not be visible, but it will add realism to the picture.

Click the button

and save the picture.

That's what I did.

So my lesson has come to an end, I want to wish you all good luck and fast renderings. Always your Maxim Ganzha.

Lesson taken from 3dmaks.com

Create volumetric light in Mental Ray using 3D Max.

First step. Installing the Mental Ray Renderer.

First you need to install mental ray to our editor. This is done as follows, open Rendering (from the main menu) > Render Setup... > Common tab > Assign Renderer Stack > Production > mental ray Renderer. Everything is now the basic Scanline renderer replaced with mental ray.

Second step. Geometry to render.

Volumetric light in an empty scene will not look, you need to create a simple blank. Let it be a model of a house with small windows. Let's start with a basic Box primitive, go to Create panel > Geometry > Standard Primitives > and select Box. Now we can give it the following parameters:

Third step. Let's create windows.

Windows are essential for volumetric light to enter our home! Now let's add modifiers to the Box object. Follow the path Modify panel > Modifier List > Object-Space Modifiers > activate Edit Poly here. In the Right window, you can activate editing at the polygon level, do this and delete two polygons on our house, these will be the windows.

It's time to activate the geometry change at the vertex level, let's change our house a bit, making the windows lower and wider. You can do as we have in the picture or experiment on your own.

In fact, the geometry is ready, it remains to flip the normals, this is done as follows:

1) Activate the polygonal mode.

2) Select all polygons by hotkeys CTRL + A.

3) Open the modify panel, look for the Edit Polygons stack there and click on the Flip button.

After flipping the normals, outwardly our structure turned black, but this is normal, because working area we will have an interior.

Fourth step. Let's add a camera.

Now we need to add the main camera to the scene. Open Create panel > Cameras > Target, set the camera. It is best to mount the camera in a top view window, but you can use any window for this. You need to rotate the camera so that the windows are visible.

Also, the camera needs to be adjusted, set the Lens parameter to 20mm. It remains to change the view to the picture from the camera, just go to the perspective window and press the C key.

Fifth step. Working with materials.

We need to assign the necessary materials, for this we open the Material Editor, just press M on the keyboard. We will have a list of materials in front of us, we advise you to immediately learn how to name them exactly, for example, call it warehouse. As long as you have few materials, this is not very important, but then, when there are 20-30 materials, you will get confused.

  1. First of all, click Get Material or Standard, in the list that opens, select the Arch & Design (mi) material.
  2. Now let's activate the warehouse by selecting it in the viewport and applying our material to it.
  3. Adjust the Reflectivity parameter by setting it to 0. After all, glitter is inappropriate in our house.

You can add a bump for a more realistic display.

  1. In the properties of the material, look for Bump and set the Composite parameter in the Standard rollout.
  2. Let's add a layer, the button is located near Total layers. Usually the first layer (Layers 1) is the Smoke basemap. However, it is necessary to correct the parameters:

# Iterations: 20

Color #1 - black

Color #2 - dark gray in RGB 50, 50, 50

  1. Add a second layer with the Speckle map, also fix the parameters:

Color #1 - light gray by RGB 180, 180, 180

Color #2 - black

Now you need to set up the Diffuse map, go to Maps > Standard > Bitmap > concrete-texture-high-resolution.jpg.

In fact, the main volume is done, you can create a render and enjoy the result. While it is intermediate, but you should get it like in the picture.

Sixth step. Set up lighting.

It's time to add light to our structure. To do this, you need to open mr Area Spot, it is located at Create panel > Lights > Standard > mr Area Spot. Create the light in the Front window, so it is better to position it from the point that it passes into our windows. Having set the light, we will achieve better results by editing the following parameters:

In the Spotlight Parameters suite, set Hotspot/Beam: 24 and Falloff/Field: 26.

In the General Parameters rollout, set Shadows: On (Ray Tractored Shadows).

You can do another intermediate render.

Seventh step. Creating an environment.

It's time to start creating the environment. You need to open Rendering > Environment and go to the background section:

  1. We click on "None", in the drop-down menu we activate the Glow card.
  2. Press M to open the material editor and drag our Glow map there. To drag, hold down the left mouse button. We use an empty slot, in the dialog box that appears, select Instance. So we will link the cards.

It remains to adjust the color, for Glow we select pure white, set the brightness parameter (Brightness) to level 4, however, you yourself can adjust the brightness according to the situation.

You can do another intermediate render. If everything is done as it should, then the result will be as follows.

As you can see, gradually our scene becomes more and more interesting. However, much more needs to be done. First, let's apply shaders to the camera, go to Renderer > Camera Effects > Camera Shaders > Output > Glare. In other words, we applied a Camera Shader to our Glare glow.

If you wish, you can make another render in order to commit the changes.

By the way, if you want to get a more intense glow, then just link the Glare card to the slot in the material editor (M) and increase the Spread parameter.

Eighth step. Adding ambient lighting.

Right now the only source of light on stage is our windows. It is necessary to add third-party lighting, for better visibility of the scene. You need to go along the path Create panel > Lights > Standard > Skylight, creating a light. We immediately change the parameters in Make a selection > Modify panel, we are interested in Multiplier, it is better to set it to 1.5, however, small deviations from this value are possible, try it!

Now go to Create panel > Lights > Photometric > mr Sky Portal and add some more lights. Here some difficulties are possible, it is necessary to make our lamps exactly the size of the windows and turn them with light inside the room. Oh, and don't forget to make Multiplier 1.5 or whatever you did to Skylight.

As you can see, the light will become more natural, it will illuminate the space surrounding the window, namely, part of the ceiling and wall.

And despite everything, the room is still too dark. You need to fix this by adding more light, go to Rendering > Render setup... > Indirect Illumination tab > Final Gather stack. Here you need to set the following parameters Multiplier to 2, and Diffuse Bounces to 5. You can do another intermediate render to evaluate the results. Recall, if you are not satisfied with the intensity or brightness, you can safely change, adjusting everything to your vision.

As you can see, it has become even brighter, the whole scene is already visible.

Ninth step. Create volumetric light.

Actually, finally, we come to the topic of our today's lesson. All preparations are completed, you can work on volumetric light! We will use the Volume Light effect, which is included in the render. Activate it along the path Rendering > Environment ... > Atmosphere, now follow this order of actions:

  1. By clicking on Add, you must select Volume light.
  2. Now click on Pick Light, and select the mr area spot we set up earlier. On more complex scenes, in order not to search for a luminaire in the list of objects, just press the H key.
  3. Let's play with the light density by setting the Density parameter to 20.

You can render and enjoy volumetric light while in preview.

Tenth step. Final Light Settings in the Mental Ray Render

It is necessary to carry out the final adjustment of all our light. You can do it a little differently, setting other parameters or leaving everything as it is, but we did it in the following way. In Rendering > Render setup... > Indirect Illumination > Final Gather we lowered the Multiplier slightly from 1.5 to 1.4. However, these are games with light, they are individual, you can set completely different settings.

It is also necessary to improve the quality of the render. To do this, go to Rendering > Render setup... > Renderer > Sampling Quality and set there:

Samples per pixel

Parameter Minimum to 4

Parameter Maximum at 64

Filter choose Type: Mitchell

Actually everything! You can carry out the final render, enjoying a great picture!

In this tutorial, we will cover the basic principles of setting up lights for interior lighting and creating a global illumination effect in Mental Ray. We will also look at some of the problems that can arise when illuminating a textured scene, and how to solve them.

To complete the lesson, we first need to create a room.

In the projection window Top create a spline Rectangle. Select it and go to the tab Modify command panel. Select a modifier from the list of modifiers Edit Spline. In a scroll Selection click on the button Spline(the red curve is like this) and then in the scroll geometry click on the button outline and in the window Top move the spline outward a bit. Now again from the list of modifiers select extrude and extrude a 3D object of suitable height from the spline. These will be the walls.

Now make a floor and a ceiling from a regular plane.

Next, cut out the window. Create Box. Position it in the wall so that all corners stick out of the wall. Select it and in the category drop-down list geometry tabs Create command bar select line Compound Objects. Click the button Boolean, then, in the rollout that appears, click the button Pick Operand B. Select a wall object in any window. Set Type operations B-A. The window is ready, just like the stage itself. Although no! Add a couple more beauty objects to the room. It will be something like furniture. Put the ceiling on the walls and everything else with the usual standard gray material.

Position the camera indoors and focus properly.

Point a light source at the window mr Area Spot.


Adjust the light source. When working with photons, the parameter hot spot in a scroll Spotlights Parameters light source. These parameters should be adjusted as precisely as possible to the size of the window through which light enters the room in order to avoid the loss of photons, the maximum number of which depends on the size of your PC's RAM. Since the window is rectangular, then you need to specify the shape Rectangle and adjust the cone to fit the window. To make it easier to change the direction and taper, switch one of the windows to view from the light source. In a scroll Area Light Parameters check the box On and specify the type of scattered light Disc with a scattering radius of 40. Although, you can set a much larger value. I have never seen the sharp outline of a window opening in the shadows when no sunlight enters the window. From this we can draw conclusions. If you want the sun's rays to fall through the window in your scene, then setting blurry shadows will be a big mistake. Another situation is when the light of heaven.

With the creation of the scene like everything. Submit the scene for rendering. Dark isn't it? It's time to deal with global illumination in Mental Ray. Opening the window Render Scene, select as a visualizer mental ray. Go to tab Indirect illumination and in the scroll Caustic and global illumination in the GI block, check the box enable. Render the scene. Virtually nothing has changed. Not without fine tuning.

So, let's start setting up the lighting of our test scene. Set value Maximum Sampling Radius equal 4 . The Radius value is the photon search radius. It is the photon search radius, not the size of the photon! Photons have no size in terms of computer graphics. The absence of the Radius checkbox means that the photon search radius is approximately 110 parts of the scene. Maximum Num value. Photons is the number of samples for calculating the illumination of a point. Meaning Average GI Photons set equal to 10 000 . As you already understood, the GI Photons value determines the number of photons from the light sources, it is this number of photons that is stored in the photon map. The Decay value determines the attenuation with distance, a value of 2 is considered physically correct. The Global Energy Multiplier value is a kind of regulator with which you can control the overall illumination of the scene.

The Trace Depth value sets the level of reflection and refraction of surfaces in the scene. Photon Map - installation of a photon map. Please note that some parameter values ​​in the result may differ depending on the coordinate system. This applies to all parameters that specify dimensions, distances, radius, etc. We consider all values ​​in Inches, not in millimeters or meters, etc.

Render the scene again.


Bright spots of light with a radius of 4 indicate that photons are being generated, that the photon search radius is 4 inches, and the presence of large unlit black areas in the scene indicates that there are not enough photons for this scene. Change the number of photons from 10,000 to 500,000.


Already better, but still dark and there is noise. There are two ways to get rid of the noise and make the lighting more intense. To reduce noise, you can further increase the value of Average GI Photons, but this will lead to an increase in rendering time, and you will not achieve excellent results. The Average GI Photons values ​​are limited by the PC memory and you cannot use very large values. The second option is to increase the photon search radius, which will smooth the picture. But then the secondary shadows will be calculated ugly, which will look completely unnatural. The best option is to adjust these values ​​so that there is no noise and the shadows are normal. Here is a good image.


Here I used Average GI Photons = 1500000, Maximum Sampling Radius = 13, and Global Energy Multiplier = 6500. In fact, the picture is still terrible. Lights appeared due to too high Multiplier value. This can often be seen in galleries, when window sills, window frames and, sometimes, ceilings are highlighted in interior images. It is not right!

Despite the fact that the photon map method gives the most physically accurate results of scene illumination, the number of photons to obtain high-quality illumination with a minimum photon search radius should be too large. Modern PCs and 32-bit operating system will not allow to calculate such a number of photons.

The most realistic competent lighting in interiors gives the combined use of photons and Final Gather. What does it represent Final Gather? A hemisphere of unit radius is constructed above the point, and rays are emitted through the surface of the hemisphere in random directions. The more such rays, the more accurate the calculation and the less noise. In practice, the number of rays is the number of samples in Final Gather. For each ray, the intersection with the nearest surface is found. The beam is being processed. There is no further ray tracing. Final Gather ray tracing depth is always set to one. I recommend using only one Final Gather in scenes using HDRI maps in the global environment or exteriors.

And so we turn on Final Gather and set the values ​​as shown. But first return the values Average GI Photons = 10000.

Checkbox preview serves for fast rendering in low quality. Render the scene.


As you can see, there is noise, but not the same as when Final Gather is disabled. Just increase the value Average GI Photons before 200000 and samples in Final Gather with 50 on the 500 , and get a very acceptable picture.


Apply textures. I used standard materials and Max's bitmaps (*.jpg). Render the scene again.


Not a very pleasant sight? Here! Now is the time to talk about the problems that can arise when using Mental Ray GI. As you have already noticed, the scene has a rather strong color transfer from the walls and floor to the ceiling, and indeed to each other. This effect is called . You can deal with this in different ways. For example, controlling color bleeding with photon shaders. But I think the best option is the following. We calculate the photon map and Final Gather in the scene with gray material, as in Figure 9, and save it to a file. Next, we assign the necessary materials to the scene objects and render by loading photons and Final Gather from the file. To be honest, I don't understand why the developers didn't make the color bleeding option like in finalRender, for example.

Let's finish the job. Here is a picture rendered in this way.


For the sake of example, I threw a couple of models of chairs with a carpet and one wall into the scene. I am not an interior designer and this is not a competitive entry, so please do not criticize me for such an incomprehensible attempt at arranging furniture.


A good picture without glare on the window and with uniform illumination and with only one light source. Some might argue that the stage is a bit dark. Stop! And where did you see in reality a well-lit room through such a small window? Do not overdo it with the intensity of light. This is where the highlights appear, and the scene looks unrealistic. A well-lit scene is when it is not bright and without highlights, when all objects and angles in the camera's field of view are clearly distinguishable. To correctly illuminate the scene, use the SkyLight light source.

Finally, I want to give some tips that will help you avoid mistakes in your work with Mental Ray.

1. Never make walls, floors and ceilings with zero thickness! Mental Ray will simply ignore the rotated wall normals and let light into the room as if it were open space. This is also true for other renderers.

2. Use the SkyLight light source for illumination. To add light, realism and highlight the places of window openings that are in the shadow area, SkyLight is best suited. In large interiors with many windows, instead of skylight in window openings, you can use a photometric light source - TargetArea.

3. I recommend using only "native" materials in all external renderers. This applies to a lesser extent to Mental Ray because both standard and ray tracer and architectural materials work quite well in Mental Ray. But, despite this, only the use of "native" materials, which include DGS material, mental ray, Glass (physics_phen) and Lume shaders, gives the most physically accurate correct results. When using (in interior scenes using photon maps) a mental ray material in the Photon slot, you must definitely use a photon shader. When used in the Surface slot - DGS materiala, in the Photon slot it is better to use DGS material Photon. When using Lume shaders in the Surface slot, for example, Metal(lume) in the Photon slot, it is better to use Photon Basic.

4. Photon rendering, Final Gather, and rendering progress can be monitored visually by enabling the Mental Ray Message Window.

5. Adjust the lighting in the scene by assigning a gray material to all objects. Remember that textures and materials tend to hide GI imperfections. And only after you find optimal settings GI in the scene, assign materials to objects, adjusting materials to lighting, and not vice versa. Remember also that in Mental Ray photon shaders have a direct effect on the lighting in the scene, and if you want them not to affect the overall lighting set up in the scene with gray material, set the photon shaders to the same parameters that they had when setting up lighting in a scene. Now let's talk about radii in Final Gather. Max Radius is the distance between points for which GI (Global Illumination) is calculated. The smaller the distance between the points, the more accurate the calculation and the more time it will take. Min Radius is the distance used in the interpolations and extrapolations of the illumination of intermediate points. In practice, to get normal quality GI Min Radius should be 10 times less than Max Radius. Increasing the values ​​of the radii leads to a decrease in the quality of the secondary shadows, a decrease leads to a more accurate calculation of GI and, as a result, an increase in the rendering time. The smaller the radii, the more samples you have to put in Final Gather. The number of samples required for smoothing, with the above values ​​of the radii ranges from 500 to 3000 depending on the scene. The bigger, the better. But do not get carried away by increasing this value, as the rendering time will increase greatly.

Lesson taken from RENDER.RU

I continue the theme of lighting in Mental Ray. In this lesson I want to talk about simulating artificial light sources to illuminate rooms. Photometric light sources will be used, which 3D MAX 2009 puts at our disposal. Photometric exposure control will also be considered.

It is assumed that readers of this tutorial are familiar with the tutorial on indirect lighting: posted earlier.

Let's start

When choosing any photometric light source, Max insistently suggests turning on the photometric exposure control, so I will start the lesson by describing this type of exposure.

Exposure control:

After creating a light source according to its physical characteristics (brightness, color, ...), it is understood that lighting the scene with it is the most correct and we only have to globally change the brightness of the image (render) using exposure control.

Photometric exposure control is made in MR by analogy with the operation of a camera.

Answering yes to the warning when first creating the photometric:

we consent to the inclusion of appropriate exposure.

The exposure control menu is accessed from the main menu:

or through the "Environment" item (key 8).

in the mr Photographic Exposure Control rollout, you are prompted to select preset exposure parameters:

for exterior scene (day\night) and interior (day/night) scene, but they are usually very rough and it is still better and more correct to adjust manually:

Those who use cameras know that the main parameters (for lighting) when shooting are film / matrix sensitivity (ISO), aperture and shutter speed (shutter speed). The brightness of the picture depends on the setting of these parameters.

For example, pictures that include a table lamp with a light bulb with the following settings:

that is, the brightness is 370 lm, and the color of the light flux is 4500-5000K (halogen)

Due to the setting of different shutter speeds, the brightness of the picture is different. Similarly, in MR, by setting different exposure parameters, we change the brightness of the render image, without changing the parameters of the light sources .

For example, I made a very simple scene where there is a light source with the same physical parameters as in the photo, and only the shutter speed in the exposure changes:

Options:

Shutter Speed- this is the shutter speed or shutter speed, the value by which 1 second is divided is set - the larger the set value, the darker the picture

Aperture- aperture size - the larger, the brighter the picture

film speed- film sensitivity - the higher, the more sensitive the film to light and the brighter the picture.

In 3d MAX, it is not necessary to edit all three parameters, a parameter is created based on them exposure value which is used by the renderer, so it is enough to either set EV, or, as I usually do, set only the shutter speed.

Below exposure settings are image processing options, similar to digital cameras or film filters. - gamma adapted to the type of light sources.

Actually, there is nothing complicated in using the exposure, the main thing to remember is that you should not change the intensity of the light sources, thereby introducing an imbalance into the scene - just adjust the exposure for a darker/lighter image on the render.

Now, in fact, the light sources

When creating an artificial light source, the editor divides them into targeted and free ones:

no matter what source is created, you can make it either targeted or free at any time by checking the target checkbox in the main source parameters tab.

From my own experience, I can advise you to first create a targeted source, for the convenience of placing it on the stage, and then turn off the target, so that later there are no problems with the orientation of the emitter in sources other than point sources.

For the correct calculation of shadows, it is proposed to use traced shadows "Ray Traced Shadows", which are created taking into account the characteristics of the material of the object.

depending on the requirements of the scene, or the effects being created, you can use Shadow Maps, which are calculated faster, but do not take into account all the characteristics of the materials.

Shadow examples:

Traced shadows:

shadow map with default settings:

as you can see, the transparent material is not taken into account, the shadows are created based on the mesh of the object. The quality of the shadow depends on the quality of the shadow map creation and is configured in the "Shadow Map Params" rollout of the light source settings. For example, by increasing the map size or sampling quality, you can achieve sharper shadows.

Since the lesson is aimed at creating artificial light sources for the interior, I will not dwell on creating a shadow map, since in interiors (in my opinion) it is more relevant to use traced shadows.

As for traced shadows - sometimes when using Thin Geometry, Glass (lume) glass, some artifacts appear on the object, in the form of separate spots (look at the first figure with traced shadows - the right cube has spots on the inner shadow). Improving the sampling parameters in the render is useless here. You need to enable the two-sided shadows option in the light source settings:

Photometric Web- a light source whose configuration and intensity is calculated on the basis of the "photometric web" most accurately conveys the parameters of light and saves a lot of time when creating scene illumination.

Spotlight- a light source of the "spotlight" type is usually used for global illumination of the scene, in interior solutions its use is irrelevant (again, my opinion), except for imitation of projectors or special effects.

Uniform Diffuse- a light source illuminating in the direction from the emitter to the target.

Uniform Spherical- a light source that illuminates in all directions from the emitter.

Uniform Diffuse and Uniform Spherical

The settings of these types of sources are identical, with their help you can simulate almost any light source - fluorescent lamps, light bulbs and ceiling panels:

In the settings, you are prompted to select the type of emitter:

and if the emitter is different from the point (Point) then it will be possible to include it in the rendering process

Consider some of the nuances of creating specific light sources:

Daylight lamps:

When creating a fluorescent lamp, its intensity, based on the entered data, will be calculated as from a conventional light source, but for fluorescent lamps (especially older models), the light distribution will be visually slightly different. Due to the fact that the luminescent layer is irradiated with ions with a certain frequency (and in old lamps with a frequency of 50 hertz) and due to the peculiarities of our vision, the light intensity will decrease faster than from a source with a filament (this applies only to the visible image, physically , over a period of time, light attenuation is quite normal).

So let's increase the damping:

Pre-render with normal settings:

set the attenuation to 50% (I didn’t find any information about the exact values, but on the example of the Soviet LB’eshka, testing showed just that)

It would seem that you can simply reduce the brightness at the source, but when using ready-made source profiles from IES, it is more convenient and the calculations are more correct:

Incandescent lamps:

Incandescent lamps also have an additional effect of changing light with distance, but it is expressed in the shift of the source spectrum to the red region:

To enable this effect, you just need to check the box:

for example, I slightly increased the attenuation value so that there is a more visual effect:

pre-render with light source at 4000K:

and attenuation is on:

examples of scenes using these source types

in this scene, emitters are not involved in the rendering process, but highlights on surfaces still correctly take into account the presence of sources:

on the second scene of the object of the "public MeJo" type, the sources are visualized and imitate the surface of the lamps:

Photometric Web

In the real world, the flow of light from lamps is extremely rarely uniform, due to the fact that the lamp bulb itself is a lens, and, as a rule, reflectors and additional optics in the lamp change the flow.

For example, here is a photo of a random light source that I came across at lunch:

to create such a picture of the light flux, you need additional constructions near the source, or draw a map for the "Projector Map", which requires additional time and distracts from the creative process.

They will simplify the procedure for creating light sources, using the type Photometric Web:

When choosing of this type in the source settings, a scroll will appear to select the settings map:

by clicking on the file selection button, a dialog for selecting a map will open:

the "IES information" section presents a diagram of the propagation of light on the "web" and information about the light source.

IES files can be downloaded from the net, as a rule, lighting equipment manufacturers provide such maps, or interior design archives can be found. There are also IES generators with which you can create your own sources.

After applying the IES map, the light source icon takes on the source configuration:

in the Photometric Web settings there are three-axis rotation options, these settings are relevant when the source is other than a point source. If the source, for example, is linear (Line), and the map has a complex configuration, then the method of positioning the map becomes relevant:

in the figure at the right source, the map is rotated 90 degrees in Z.

Here is an example of applying a map to a point light source to simulate a lamp

Some time ago, in the days of 3D Max 6.0, I had a problem with simulating the illumination of the road by car headlights. Then the use of IES would save me a lot of time.

With the help of IES' juice, you can simulate not only individual light sources, but also groups of sources, in fact, this is their most wide application.

For example, ceiling lights consist of several fluorescent lamps and are additionally divided into several cells by reflectors. To simulate such a light panel, it is enough to create one light source and apply desired card. In the description of the map, the parameters of light and what generates it are described in sufficient detail. IES files can be opened with notepad.

For example infa:

IESNA:LM-63-1995 / GPA22-3t

Photopia 1.10 PHOTOMETRIC REPORT

L.A. LIGHTING MFG. CO.

GPA520-3-2TH-S9

2X2, 3-LAMP, T-BAR, 9 CELL PARABOLIC.

FO17/31K

17 WATTS T8 FLUORESCENT LAMP

indicates that a panel of 3 fluorescent lamps with a power of 17 watts, enclosed in 9 parabolic cells, is being simulated.

An example of simulating LSD lights with two separate lamps:

on the wall, the darkening under the light source is clearly visible, which gives a stiffening rib between two lamps as part of the entire lamp.

Well, that's all I wanted to tell you about simulating artificial light. Perhaps I missed something, because I write about the things that I use in my work and what is relevant in my opinion.

3ds Max 2013 has several lights designed to work with the renderer. mental ray:

mr Area Omni;

mr Area Spot;

mr Sky Portal.

Note. Sources mr Sky (Sky mr) and mr Sun (Sun mr) mut applied in daylight system Daylight (Daylight).

All specialized sources contain a scroll of parameters mental ray Indirect Illumination (Indirect lighting of mental ray). This scroll is available in the panel Modify (Change)(Fig. 23.11).

With the checkbox checked Automatically Calculate Energy and Photons pro-

gram will use the general lighting parameters to calculate.

Rice. 23.11. Scroll mental ray Indirect Illumination

Parameter group Manual Settings is intended for setting lighting settings manually and contains the following parameters:

Energy (Energy) - sets the initial energy of emitted photons;

Decay - determines the degree of energy dissipation by photons when moving in space;

Caustic Photons - regulates the level of caustic photons;

GI Photons (Global Illumination Photons) – determines the number of photons to calculate global illumination.

Algorithms for calculating visualizer lighting mental ray based on the physical properties of light particles - photons. Each light source emits a stream of photons that will propagate in space and reflect from objects, losing some of the energy. At the end of its path, the photon is absorbed by the surface. This algorithm is called Global Illumination (Global Illumination).

Another important property of illuminance calculation algorithms mental ray is the creation of caustics. caustics Opta refers to the chiaroscuro created by the refraction of light on the surfaces of opaque objects. In the real world, caustics are easy to spot on the walls and ceiling of the pool.

In the dialog box imtsa tab mental ray to set special lighting parameters (Fig. 23.12).

In the parameter group Caustics and Global Illumination (Caustics and global illumination) contains the following object properties:

Exclude Caustics (Exclude caustics);

Generate Caustics (Create caustics);

Receive Caustics;

Exclude from GI (Exclude from global illumination);

Generate Global Illumination (Create global illumination);

Receive Global Illumination.

Rice. 23.12. Tab Fragment mental ray dialog box

Object Properties

Note. In complex scenes, to speed up rendering, you can turn off the indirect lighting properties for some objects.

Use the tab to configure general settings for global illumination, caustics, and render filters. Indirect Illumination dialog box Render Setup. This tab contains a scroll to configure image filtering (Fig. 23.13) and scroll to set special lighting parameters (Fig. 23.14).

In the parameter group FG Precision Presets scroll Final Gather (Final assembly) The following sets of filtering settings are available: Custom, Draw (Draft), Low, Medium, high

(High), Very High (Very high). These sets are modified by moving the slider.

Parameter group Basic (Basic) contains the basic settings for calculating illumination. Field Multiplier is for setting the intensity and hue of reflected light.

Rice. 23.13. Parameter Scroll Final Gather (Final assembly)

Rice. 23.14. Parameter Scroll Caustics and Global Illumination (GI) (Caustics and global illumination)

This rollout also contains additional options for tracing depth and image filtering.

Note. When the visualizer is activated mental ray The main rendering quality settings appear at the bottom of the Rendered Frame dialog box.

Scroll Caustics and Global Illumination (GI) (Caustics and Global Illumination) contains a parameter group Caustics to customize the generated caustics.

Checkbox Enable includes the caustic parameters in the visualization aorhythms (Fig. 23.15).

Rice. 23.15. Teapot with caustics

Parameter Maximum Num. Photons per Sample (Maximum number of photons per sample) determines the number of photons counted for each sample. With an increase in the value of this parameter, the rendering time of the scene increases significantly, but the image is smoother.

Field Maximum Sampling Radius sets the photon propagation radius.

Group Global Illumination (Global Illumination) contains similar options for setting global illumination.

Parameter group Geometry Properties contains a checkbox All Objects Generate & Receive GI and Caustics (All objects generate and receive global illumination and caustics). When this checkbox is checked, the calculation of global illumination and caustics parameters will be performed for all objects in the scene, ignoring the settings of the properties of the objects in the dialog box Object Properties.

When creating open scenes with global settings and source Daylight (Daylight) it is recommended to use a card as an external environment mr Physical Sky (Physical sky mental ray). This map allows you to create a realistic background that displays the horizon, the vault of heaven and the sun (Fig. 23.16).

Rice. 23.16. Scene with map applied mr Physical Sky (Physical sky mental ray)

Share with friends or save for yourself:

Loading...