Ambient occlusion 3ds max
Перейти к содержимому

Ambient occlusion 3ds max

  • автор:

Что такое Ambient Occlusion (AO), для чего он нужен и как его использовать

В сборниках текстур нередко можно встретить различные дополнительные текстуры в том числе, Эмбиент Оклюжен. Ambient Occlusion — это черно-белая текстура, в которой хранятся тени от рассеянного света (своеобразная карта). Они могут подчеркнуть рельеф изображенный на основной текстуре. AO использовать не обязательно, но материал без нее может смотреться более плоским.

Как использовать Ambient Occlusion

  1. В слот Diffuse Color помещаем текстуру Composite из раздела General. Принцип работы этой текстуры как у слоев в Фотошопе.
  2. В текстуре Composite в правом верхнем углу нажимаем кнопку добавить слой (Add A new Layer).
  3. В Layer 1 назначаем нашу обычную Diffuse color-текстуру на левый квадратик (можно просто перетащить на левый квадратик в нужном слое из папки с текстурами)
  4. В Layer 2 назначаем карту Ambient Occlusion на левый квадратик.
  5. У Layer 2 переключаем режим с Normal на Multiply.

Как использовать ambient occlusion

Как использовать ambient occlusion
Готово. Результат на скриншоте.

Что такое ambient occlusion

Что такое ambient occlusion

Силу Ambient Occlusion можно ослабить с помощью настройки Opacity в Layer 2. А если вдруг AO слишком слабое, то можно создать сверху еще один такой же слой с текстурой AO.

Подробнее узнать 3D-визуализации и научится работать с графикой можно на нашем бесплатном курсе.

Two Easy Methods for Rendering Ambient Occlusion Passes in 3ds Max

1600x500_Featured

Rendering Ambient Occlusion (AO) is a key component in your final render and is often part of the many rendering passes. Not only is it great to use in conjunction with other rendering passes but it also looks pretty great by itself and can often be used to represent a model’s wireframe. Rendering ambient occlusion is a vital technique to master because it can serve many different purposes. Whatever you decide to use it for, you’ll learn step-by-step the different methods for setting up an AO pass in this article. If you want to learn more about Ambient Occlusion and how it works be sure to check out Understanding Ambient Occlusion.

Rendering AO with a Shader

As with most other 3D applications you can setup an ambient occlusion pass through a shader, so let’s walk through that method first as it’s probably the easiest of the two. The first thing you’ll need to do is open up the Material Editor in 3ds Max. So go up to Rendering>Material Editor>Compact Material Editor. mental_ray_1This ambient occlusion is going to be applied as a map to a new material. So select one of the default materials and scroll down to the Basic Parameters. For this you can plug it in to the Self-Illumination color. Now, you could map it to the diffuse color but mapping it to the Self-Illumination ensures it receives no direct illumination. Go ahead and check the Color box and select the box next to the Self-Illumination color. This will open up the Material Browser. mental_ray_2By default the only materials that are visible are the standard materials, which show the materials available to us based off the default render engine in 3ds Max. Since you’ll be rendering through mental ray, select the drop down menu in the Material Browser and choose Show Incompatible. mental_ray_3This will show all the available materials. Scroll down until you find the mental ray materials and choose the Ambient/Reflective Occlusion material. mental_ray_4You may notice that the material hasn’t changed appearance in the material editor, that’s because you’ve plugged in a mental ray material. To fix this simply go to your render settings and scroll down until you find Assign Renderer and choose mental ray. Now you should see a completely white material. mental_ray_6You could simply drag this AO material directly onto your model, but if you’re using this as a separate AO pass to composite onto the final render then you probably don’t want to override the materials that are already on your object or scene. To avoid this you can temporarily apply a material override to objects in your scene by changing the render settings. So open up your Render Setup and under the Processing tab check the Enable box under Material Override. Now select the «None» button. mental_ray_7This opens up the Material Browser again. Scroll down toward the bottom until you find Sample Slots. Choose the Ambient Occlusion shader you’ve created. mental_ray_8Now run a test render. You should see a decent looking ambient occlusion pass. However, it’s probably not as smooth as it could be. So let’s go back into the material editor. mental_ray_firstpassSelect the box next to the Color in the Self-Illumination parameters to open up the setting for the ambient occlusion shader. mental_ray_9One of the first things to adjust is the Samples. The higher the samples the smoother the results are going to be. For this the samples have been bumped up to 256. If you run another render you should see right away that the AO pass is much smoother. Of course, it increases render time so you might need to find a happy medium between fast render and good results. mental_ray_samplesIf you find that you’re getting pretty blown out results go back into your material by selecting the Go to Parent button and select the Diffuse color. You can darken this value, the darker this color the less blown out your AO pass is going to be. You can play around with the diffuse color until you get the results you want. mental_ray_10Not bad, right? You can take this AO pass and throw a wireframe on it for a breakdown in a demo reel or composite it onto the final render in a program like Photoshop. mental_ray_final

Rendering AO with Scanline Renderer

This next method is a little easier to setup than the first technique, but might not produce the most accurate or flexible results because it’s done through the render settings. However, it’s still a good way to render out an AO pass and depending on your workflow either technique will get the job done. The first step is to open up your material editor and select one of the default materials. Scanline_01Select the Diffuse color and change it to completely white. This will act as the AO material. Next select the objects in your scene and apply this new material. Scanline_02Now select the Render Setup button to open up the render settings and navigate to the Advanced Lighting tab. You want to make sure you’re using the Default Scanline Renderer for this method. Scanline_03Open the dropdown menu in the Advanced Lighting tab and choose Light Tracer. You should now see the AO parameters displayed. Before doing any adjusting to these settings there’s one more key element to this method in order to properly create an AO render and that’s to drop in a light. Scanline_04Go to Create>Lights>Standard Lights>Skylight and drop the skylight anywhere in the scene. The skylight will provide even illumination throughout the entire scene, which is what you want. Scanline_05Now run a test render and see the fruits of your labor! You can go back into the render settings and adjust the Light Tracer attributes to fine-tune the AO results. One of the most important parameters to keep in mind is Global Multiplier which basically controls the brightness and the Rays/Samples. Scanline_finalIf you find that the white material you created is a little dark you can open up the material editor and bump up the Self-Illumination color to brighten the color of the material. Scanline_06You can see that this method is quite a bit faster and easier to setup but it doesn’t give you as much flexibility because you have to render with the Default Scanline Renderer and the AO results are fine-tuned based on the render settings. You’ll also need to hide any lights you have in your scene and setup just the skylight. Either one of these methods is a great way to quickly render an AO pass for your models. While the first method gives you more control over the AO and is best used when compositing your AO pass, the second technique is faster to setup. For more great tutorials visit the Digital-Tutors library to learn the entire 3D production pipeline with in-depth tutorials from the creative professionals who know the industry.

How do you adjust the intensity and color of ambient occlusion in 3ds Max?

Ambient occlusion is a technique that simulates the natural shading and softening of edges and corners in a 3D scene. It can enhance the realism and depth of your 3D models by adding subtle shadows and contrast. In this article, you will learn how to adjust the intensity and color of ambient occlusion in 3ds Max, a popular 3D modeling software.

Найдите ответы экспертов в этой коллективной статье
Эксперты, вносящие высококачественный вклад, получат шанс быть рекомендованными. Подробнее
Получите эмблему топ-эксперта сообщества

Вносите свой вклад в коллективные статьи, чтобы получить в профиле признание за ваше профессиональное мнение. Подробнее

Начать вносить свой вклад
Узнайте, что публикуют другие

1 What is ambient occlusion?

Ambient occlusion is based on the idea that surfaces that are close to each other or have low angles of incidence block more light than surfaces that are far apart or have high angles of incidence. This creates a gradient of darkness and lightness that defines the shape and volume of the objects in the scene. Ambient occlusion is not affected by the direction or color of the light sources, but only by the geometry of the scene.

Выскажите свое мнение
Помогите другим, рассказав подробнее (не менее 125 символов) Отмена
Добавить Сохранить

2 How to enable ambient occlusion in 3ds Max?

To enable ambient occlusion in 3ds Max, you need to use a render engine that supports it, such as Arnold, V-Ray, or Mental Ray. You also need to assign an ambient occlusion map to the materials of your objects, or use a global ambient occlusion setting that applies to the whole scene. You can find the ambient occlusion map in the material editor, under the maps tab, in the standard or mental ray category. You can find the global ambient occlusion setting in the render setup dialog, under the indirect illumination tab, in the ambient occlusion rollout.

Выскажите свое мнение
Помогите другим, рассказав подробнее (не менее 125 символов) Отмена
Добавить Сохранить

3 How to adjust the intensity of ambient occlusion in 3ds Max?

The intensity of ambient occlusion can be adjusted by changing the parameters of the ambient occlusion map or the global ambient occlusion setting. The most important parameters are samples, spread, max distance, and brightness. Samples determine the number of rays cast from each pixel to calculate the occlusion, while spread is the angle of these rays. Max distance is the maximum distance that the rays can travel before they stop, and brightness is the color and intensity of the unoccluded areas. Increasing values for these parameters will result in smoother and wider occlusion with more contrast and brightness, but also increase render time and noise.

Выскажите свое мнение
Помогите другим, рассказав подробнее (не менее 125 символов) Отмена
Добавить Сохранить

4 How to adjust the color of ambient occlusion in 3ds Max?

The color of ambient occlusion determines the hue and saturation of the occluded areas. You can adjust the color of ambient occlusion by changing the parameters of the ambient occlusion map or the global ambient occlusion setting. The most important parameters are Color, Filter color, and Filter strength. Color allows you to choose any color that suits your scene and mood, or use a grayscale value for a neutral occlusion. Filter color lets you tint or desaturate the occlusion, or create a color contrast between the occluded and unoccluded areas. Filter strength is the amount of filter color that is blended with the original color of the materials in the occluded areas; higher values result in more color influence from the filter color, but also reduce the original color and texture of the materials.

Three Ways to Generate Ambient Occlusion in 3ds Max

Final product image

I have made a very simple scene for this demonstration. This scene contains a teapot, a box and a sphere. I have also applied some materials and set the rendering engine to Mental Ray.

Step 2

I have also added and positioned several Omni lights in the scene.

Step 3

I have chosen Mental Ray Shadow Map as the shadow type. And in the Mental Ray Shadow Map rollout, I have set the Map Size to 2048 and the Samples to 24.

Step 4

Press the F10 key to open the Render Setup window. In the Renderer tab, set the Minimum value to 4 and the Maximum value to 16. And select Mitchell for the Filter Type.

Step 5

Now render the scene. It looks nice, but the depth is still missing. However the shadows are soft. We can enhance the overall look by adding an Ambient Occlusion pass while compositing.

Step 6

In general words, Ambient Occlusion (AO) is a method of creating soft shadows around the corners where objects meet. It gives an extra sense of depth and realism. Look at the image below for a before and after comparison.

Step 7

Let’s see how we can generate an Ambient Occlusion pass using Mental Ray. Press M to open the Material Editor. Pick an empty slot and click on Standard, then choose Mental Ray from the list.

Step 8

Click on the Surface map slot and select Ambient/ Reflective Occlusion from the list.

Step 9

Set the Samples to 128, Spread to 1 and the Max Distance to 20. You can play with these values in your case.

Step 10

Press F10 to open the Render Setup. Go to the Processing tab and enable the Material Override option. Then select the Ambient Occlusion material slot and drag and drop it onto the Material Override channel.

Step 11

Now press F9 to render the frame. This is the rendered frame with the Ambient Occlusion pass. You can see the soft shadows around the corners where the objects meet.

2. AO with the Scanline Renderer

Step 1

If you want Ambient Occlusion using the Scanline renderer, then you need to use a trick. First, disable all the lights in the scene. To do this, go to Tools > Light Lister.

Step 2

This opens the Light Lister window. Here turn off all the lights by unchecking the boxes under On.

Step 3

Go to Lights >Standard Lights and generate a Skylight in the scene by clicking and dragging in the viewport. Turn on its Cast Shadow option.

Step 4

Press M to open the Material Editor. Pick an empty slot and select a pure white for the Diffuse color. And then apply this white material to all the objects in the scene.

Step 5

Press F9 to render the frame, and you’ll get the Ambient Occlusion map.

3. AO through MAXScript

Step 1

Michele Marcelli has written a very useful script for creating Ambient Occlusion. You can go to www.scriptspot.com to get the script. The best thing about it is that the script is FREE to use.

Step 2

Download and install the script. Normally you have to put the script into the Scripts folder of the 3ds Max root directory. Now back in 3ds Max, go to MAXScript > Run Script. This opens the browser, here select the script and click on Open.

Step 3

The script window opens with a warning message. It says that you need to change the renderer from Scanline to Mental Ray. Click on OK. It will automatically change the rendering engine to Mental Ray.

Step 4

With the default values selected, click on the Preview AO button. It will immediately show the preview in the small window.

Step 5

If you are satisfied with the preview, click on the Render VFB button. This will show you the final result. The output result looks good, but is a bit grainy. So we need to tweak some values.

Step 6

Increase the Sample rate to 256. Now, first click on Preview and then click on the Render VFB button. The rendered frame is much clearer and smoother than it was before.

Step 7

Previously this script was only capable of rendering a single frame, but with the updated version, you can now render all of the active timeline frames.

Conclusion

I hope you have enjoyed these three ways to create Ambient Occlusion in 3ds Max. The script written by Michele Marcelli is the fastest way to get the Ambient Occlusion. The script is totally FREE to use, however if you find it useful, you can donate an amount to the creator of the script as a return gesture. This is only a matter of choice.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *