Explaining reflections and using array function in 3ds Max

Explaining reflections and using array function in 3ds MaxRecently I was confronted with one question from our users regarding a picture made from small boxes which were forming a larger box together with reflective material to this surface. The overall modelling by this case isn’t any problem and the inbuilt array function will create this kind of object without problems but the reflections on this flat surface is a different story. But let’s take it step by step. The inbuilt array functions inside 3ds Max is used for creating one-, two-, and three-dimensional arrays. For example, a row of five objects is a single-dimension array, even though it takes up three-dimensional space in the scene. An array of objects that's five rows by three columns is a two-dimensional array, and an array of objects that's five rows by three columns by two levels is a three-dimensional array. As you can see, using this function you can create very simple but also very complex objects where repeating of the same objects is required.

Let’s do few exercises with it.

Before we start the actual modelling we need to set-up 3ds Max. Go to “Rendering – Render Setup” and change the rendering resolution to 1024x568px and the default renderer to “MentalRay”. Next to these settings we will change the default units to “cm” from “generic units”. Go to “Customize – Units Setup” and change the unit setup to “metric”. After these initial settings we can start. Create a box with these dimensions “40x12x6”. The initial object has the pivot cantered inside his center, but we want to move it to one corner. Click on the “Hierarchy” tab and choose “Affect pivot only”. You will immediately see how the pivot representing the axis change, move it from the front view to one corner and click again on “Affect pivot only” to turn it off. As you can see the pivot is now moved and we can apply the “Array” function on this object. Inside the “Tools” menu choose “Array”, a new window will pop-up with the actual array settings. Hit “preview” and leave the “1D count” on the value 10. Now, click on the small arrow next to move and change the value of the “z-axis” to 60. Our object is multiplied by 10 and moved in the “z-axis” by a value of 60 creating an array of our initial object in a column. Click again on the small arrow but this time next to rotate and change the value for the “z-axis” to 100 degrees. Our array will rotate according our value and create a basic shape of a stair in a 1D array.

Let’s create few more examples. Create a sphere anywhere in the perspective view with a radius of “8”. Change the pivot of the sphere using the same method we applied before on the box to something you see on the image below.  Start the “Array” window, change the 1D “Count” to 30 and hit preview. Change the “z-axis” in the rotate menu to 360 degrees for creating a ring of our spheres. Now, we still have a 1D array, so click on the 3D dimension and set the “Count” to 3 and the “z-axis” value to 30. Our array will be instantly multiplied by 3 and moved up in the “z-axis” by the value of 30 creating a 3D dimensional array. This method you can use for distributing objects on a cylinder our any similar object.

Our last example will be coming out from a real-world example. We will create again stairs, but this time some which we could actually use in an interior. Create a cylinder anywhere in your perspective view and set the initial values according to the image below. Right click on our cylinder and convert it to “editable poly”. Select the top polygon and extrude it with a value of “5” creating two identical cylinders on each other.

From the “front” view select four polygons from our top cylinder where will keep the symmetry of the object and select two polygons on the left side from the center and two from the right side. Hit the “extrude” function with a value of “30” and with “Local normal” method, hit ok. Select one “edge” of the new extruded shape and ring it. Select “connect” and move the connection to the edge of the shape with a value around 90. Select the bottom polygons which we created using the connection and extrude them down using the value of “5”. I performed some chamfering on the shape and I advise to you to practice that. Chamfering is crucial in many cases and mastering the chamfer without generating triangles isn’t so easy.

This would be our initial shape on which we will apply the “Array” function. Start array and place into the 1D “Count” a value of 8 and set the “z-axis” next to move to “80” and next to rotate to “300”. The array function will create for us a 1D array forming a round stairs. Click on the 3D option and change the value from 1 to 2 together with the “z-axis” to 80. The array function will copy our stairs and create one more level. As you can see there is an option of manually achieving this result but using the “Array” function it’s more accurate and faster.

Using the knowledge and experience we got following the exercises above we can easily create the desired object which I mentioned before. The object is very simple and made from boxes, so we can create a 3D array from one box as a starting primitive and we are done. Together with this object we will do a similar one using spheres as the starting primitive. The reason for this is to create a different object to be able to compare the reflections. The way how to create those objects is very simple and you should be able to do them without any help. I used a diameter of “10” for the sphere and “20x20x20” for the box. In my case i also applied a small chamfer on the outer edges of the box to make it smoother and not so sharp. The array settings were the same for both the box and sphere where the actual values applied are on the image below. Before we do the materials and set-up the scene for rendering and reflections we will add some “movement” to our objects. Hit the “n-key” on your keyboard. This will start the “auto-key frame” function inside 3ds Max. Now move the time slider to the maximum value, in my case by default its 100. While the slider would be on the maximum value and the “auto-key frame” will be on we will select randomly few boxes and spheres and move them randomly away from our objects. After we are done we will turn off the “auto-key frame” function and we can slide back the time-slider to 0. You will notice that the objects will move, we have done the most simple animation ever :).

Now, we want to render a static image but the parts which are coming out will be looking strange without any “blur” effect. Using your right mouse button click on the object properties of our moving objects and set the “Motion Blur” settings to “Image” and the value to 7. Go to “Render Setup-Enviroment” and select the “Effects” tab. Add a new effect called “Motion blur” and keep the settings on default. Move the time-slider to a value of 85. If you render the scene right now you will see our blur effect on our objects.

Now we need to create a “plane” on which we will snap our objects. The „plane“ will be used not only as a ground for our objects but also as a background. Rotate the perspective view to an angle as i have. If you are happy with the current settings go to “Views-Create Camera From View”. This will create a camera from our current view and we can work again inside the perspective view and come back to our camera anytime. After creating the camera, creating lights will follow. Together with „MentalRay“ we will use „Photometric Lights“, to be specific the “Free lights”. Place one light into the scene, a pop-up window will appear with a note that together using this type of light we need to set-up also „exposure“, click ok. Change the light properties according to the settings below and rename it to „main light“;

  •  Shadows: On
  • Ray Traced Shadows
  • Light Distribution: Uniform diffuse
  • Intensity (cd): 500
  • Emit light from shape: Rectangle

Copy the main light and position the copied light similar to my set-up. Select the secondary light source and rename it to „secondary light“, change the light properties according to this;

  • Shadows: Off
  • Light Distribution: Uniform diffuse
  • Intensity (cd): 150
  • Emit light from shape: Rectangle

As you can notice on the images below I also changed the appearing of the “plane” and curved it a bit at the end and applied “turbosmooth” to make it smooth. We will change some settings including intensity and size later, but for initial set-up is this enough.

After creating the lights we need to create materials for our objects. The materials are pretty simple and the settings are displayed on the images below. We are using only “Arch & Design“ materials with one „Standard“ material for the plane. We will also use a texture for the “gold” material which you can find in the *.zip file attached to this tutorial at the end. You can also use our “Material library” and choose pre-defined materials from there. Apply the materials to our objects where

The last step before we do our first test render is to place and set-up the environment for reflections. For this we will go to “Rendering-Environment” click on “Environment map” and choose „bitmap“, select any hdri map you want and click ok. Open the „material editor“ by pressing „m“ key on your keyboard and drag the map from the environment tab to the material editor. Select „instance“ and change the “Mapping” to „Spherical environment“.

Before we will try our test render I will change few things. Add a new light into the scene and set the parameters for the third light together with the position as I have on the image below. Change also the “curved” part of our plane by moving it away from our model. Move the slider on the „time-frame“ to 85 and go to “Rendering-Render Setup” . Keep everything on default and click render. Go to “Rendering-Exposure Control” and click render preview. Change the exposure value to „1,5“ and click ok. At this point you can tweak your render to achieve the best result changing the materials, lights and exposure. After we are done with the testing we can set-up the render settings to higher parameters. Go to “Rendering-Render Setup”  and click on the tab “Renderer”. Change the values next to “Samples” to 4 and 16. Go to the tab “Global Illumination” and change “Initial FG Point density” to 0,8 and “Rays per FG Point” to 300. Do the render again. You will notice the difference between the reflections on the „box“ model and the „sphere“ model. But why?

Reflections in theory

High reflective materials like metal have highly specular surfaces, and hence a lot of their color comes from a specular reflection of their environment. On a curved surface, any given area is able to reflect more of the environment since the surface points are capturing in several different directions more of the environment. On a flat surface, the surface is pointing in a single direction, and so capturing less of the environment in its reflection. It's actually reflecting just like the sphere, but reflecting so little of the environment that it appears to be one solid flat color. In real life the metal surface isn’t probably flat, but it’s slightly wrapped due the manufacturing, heat or water damage.

Images are courtesy of: Neil Blevins, http://www.neilblevins.com/cg_education/flat_metallic_surfaces/flat_metallic_surfaces.htm

To able to simulate real life condition we need to “damage” our material a little with a bump map. Subsequently the bump map will damage our surface on our box and help us to achieve better and more interesting reflections on a flat surface. Clone our materials and rename them. These new materials we will apply only on our box model because the sphere model is fine we don’t need to change the material there. Scroll down to “Special Purpose Maps” and click on the bump map. Choose “noise” and change the size “70”, keep everything else on default. Change the bump value to “0,5” and apply our new material to our box model. Render it again and compare. You will see that the reflections changed. At this moment you can experiment and try to achieve settings you like at most.

Tip: You can render an Ambient & Occlusion map and apply it after in Photoshop for better shadows.

bt reflection max files.zip [128.16Kb]
Uploaded Monday, 27 March 2023 by Administrator
bt reflection textures.zip [1.41Mb]
Uploaded Monday, 27 March 2023 by Administrator