Archive for the ‘texturing / materials’ Category

In my last post on iridescence, I explained using the shellac shader, which is a physically correct way to create iridescence for animations. This example is how I create iridescence in things like oil spills, liquids, bubbles. This technique here is a non-physically correct method, but visually it looks correct…after all, isn’t 3D just smoke and mirrors anyway trying to simulate reality?

Iridescence shader on bubbles

To create the bubble material I use the tried and true Arch & Design Shader. The diffuse color is a non-issue here. The reflection is set to 1.0 (white), refraction is set to 0.95 with an IOR of 1.4.

The trick to this shader is the map in the reflection color slot. I use a swirl map. Initially, I set the base color to red, and the swirl color to green so I can see the swirl mix easily. Then when I got all of my swirl settings to look convincing, then I applied a gradient ramp map into into each the base and swirl slots. The idea was to create a rainbow spectrum, again, just using the colors red, green, and blue. For the base gradient ramp, I blended red to green. For the swirl gradient ramp, I blended green to blue. The end result of the swirl provides the whole mix with a rainbow type effect.

Finally to get the swirls to move around the bubbles, I just rotated the spheres, and keyed the rotation. This can also be achieved with a uvw map modifier with a animated gizmo to move the swirl around the sphere, but I opted for the rotation keying to give me variation among spheres.
Iridescence. We all know what it is, and never knew what it was called. Technically it is the physical effect of a color changing based on its viewing angle. We see this in CD’s, insects, bubbles, cars and so on. Here I’m going to explain how you can do this in 3DS Max.

Iridescence shader on torus knot

When I started thinking about the shader, I began to think of how iridescence works in reality. This effect happens due to objects having multiple layers with different reflections. So the shader that would work best for this would be a multi-layered shader. The one I used here was Shellac for the controlled layering. Essentially I created 3 A&D materials that were highly reflective and layered them. Each with different reflection colors, red, green, and blue. The real trick to getting that iridescent color is by rotating the anisotropic reflection in each shader with a different rotation amount. Just enough to blend the rgb values gives a believable rainbow spectrum.

But just how do you get that cd reflection to scatter from the center out? This is where the gradient ramp comes in. Choose a radial spread to get the right results. It’s placed in the bump map slot, and this is what scatters the reflection in a beliveable way. And as always you have to apply a UVW map onto your object so it knows where the radial gradient is starting from.

Happy texturing!

I constantly hear people say, “Sketch-Up to 3DS Max doesn’t work.” This statement just isn’t true. In fact, this is the process our company uses for 3D modeling and rendering, and it’s a very efficient, clean process on a number of levels. If you want to see some rendering that were modeled in Sketch-Up, check out my renderings on cgsociety. They were all modeled in Sketch-Up. I will go through the nuances of how to do this, and hopefully I can convert some of you to sketch-up modeling. Before I begin, here are some reasons the sketch-up to max process is effective:

• Modeling in Sketch-Up is darn fast. I don’t care how fast of a 3D Max modeler you are, anyone who knows sketch-up well will beat you every time!

• Sketch-Up keeps the mesh very clean. You can push and pull walls all day long, and your mesh is exactly what you see. The geometry is super light.

• Materials transfer from Sketch-Up to Max. There’s no need to reapply materials after importing your geometry. There are great tools (paint bucket + shift / ctrl / alt) for coloring geometry that saves plenty of time and is much faster than changing ID’s or shaders.

I could go on, but look into Sketch-Up. Before you purchase the Pro version, you can download the free version and try it out. The free version has everything the Pro version has, except for the export options (which you will need if you decide you like this method).

Alright enough of the sales pitch, let’s jump into the process. It really all starts with sketch-up and understanding how the materials work. When you create geometry in Sketch-Up, it has a default material. You will notice that the default material is white on one side and purple on the other side. This material is showing the direction of the normals, so white should be the front and purple should be the back. This is very important. When you import your model into max, only the white sides will render. So as you model be sure the faces are white.

To get your faces in the right direction, select the face, then right click and select reverse face. If you have the default material on the geometry, you will notice the purple will change to white and vise versa.

Now that your model is done, let’s take a look at materials. Because our faces are all in the right direction we won’t worry about coloring purple faces (face in the wrong direction). Coloring is as simple as clicking on your faces. When you name a material, be sure it describes the type of material and not what color it is…we can see that it’s red! Also keep the names short. Max will truncate the names, so be sure you can tell what it is with just a few letters. Here are some useful Sketch-Up coloring tips/shortcuts:

Paint bucket + CTRL (colors all of the faces with the same current material touching each other)
Paint bucket + SHFT (colors all of the faces with the current material in that current group with the new material)

After coloring your model, you can always go back to view the normals by changing the face style of the model. This is helpful when a Sketch-Up model is already textured, but you want to flip the faces. Note, you will have to re-apply the material to the newly flipped face.

Now that our scene is modeled and colored let’s talk about exporting. With Sketch-Up Pro, you can export as various formats (3ds, dwg, vrml, obj, etc). I typically export as .3ds format. Before you hit export, let’s look at the options button. Every export format will have different options, but I will only discuss the options for the .3ds format. You can change Export to 4 different types: Full hierarchy, By layer, By material, Single object. The only two that I recommend using are “By material”, and “Single object.” And of those two, I prefer “Single object”.

If you export with “By material” sketch-up will break your model into different meshes according to their material. So you may have one object in Sketch-Up, but when you import the .3ds into Max, there will be a mesh for every material. This doesn’t just make a mesh for each material, but it creates a mesh for each material being surrounded by another material, so even though you only have one brick material, for example, you may have several meshes with that same material. The advantage of this method is that you have one shader for each material. So it keeps your materials simple. The disadvantage is that it may take longer to export to .3ds, and in Max your viewport may be a little sluggish if your scene is large and complex.

If you export with “Single object” Sketch-Up will export your entire scene as one mesh, and with that one mesh it will create a multi / sub-object material with a shader for each material from Sketch-Up. Because there is a limitation in the .3ds format that meshes can only have 65,536 vertices and faces, if this limit is exceeded, more than one mesh will be created with the emphasis on keeping the number of meshes to the minimum amount necessary. Here’s where this one gets a little complex though. Because every mesh has its own sub/object material, you may have some sub shaders that have the same material. A good trick is to clean these up by making them instances of each other, before you start tweeking them. The advantage of this method is that the scene no matter how much geometry there is, is incredibly fast and efficient. This, as I already said, is the method that I prefer. The disadvantage is that it does take some time to go through the mulit / sub-object materials to make sure that there is only one copy of each material, and the rest are all instances. These are the only export functions I will cover now, but the image on the left are the settings that I usually use.

Now let’s talk briefly on importing the .3ds file into Max. Use File-> Import. It will first ask you if you want to Merge with the current scene, or replace the current scene. I always merge with the current scene. I also always uncheck Convert units (I do all of my Sketch-Up modeling in feet and inches). This will keep the real-world scale. It will also ask you if you want to change the animation length. I always say no. Now your Sketch-Up model should be nice and tidy in Max. I think it’s important to state this even though to many max users this may be obvious: Just because your material editor is empty does not mean there aren’t any materials in your scene. There is no correlation. The material editor is just a holding place to tweek your materials. If you open the material map browser, this window will show you what you have in your scene, and you can add that to the material editor. You will notice on the image on the left that there is one multi / sub-object shader, that contains the 4 materials that we created in Sketch-Up. So there is no need to apply the materials…they’re already applied! I usually use Arch&Design materials, and I always add a UVW map modifier to my meshes. I use Real-World Map Size, and adjust the scale of my maps in the shaders accordingly.

That’s it! I know this was very exhaustive, and sounds complex, but the process is truly quick and simple once the understanding sinks in. I hope that now you all know that you can model in Sketch-Up and imported beautifully into Max. Stick a fork in me, I’m done!

Earilier I wrote about vray dmc glossy samples, so I figured I would do one with mental ray glossy samples as well.

This chart for mental ray takes the combination of samples per pixel vs. A&D material glossy samples.

You decide which one is best for the amount of rendering time. I also found it interesting to compare with the v-ray test and see what overall gave the best performance results.

Check out the pdf, and decide for yourself what are the best settings.

Here’s the max file (max 2008, mental ray) if you’re interested in the rest of the settings. I was using an hdr map, so you will notice a broken link to that map.

There’s alot of talk about what are the best sampling settings in v-ray, but without the results to look at. So I sat out to put together a chart to help me and others understand how to get the most out of the Adaptive DMC sampler in v-ray.

This chart takes the same 3D model with baked light calculations (irr. map and light cache), to keep the render times just for sampling. I compared the combination of the DMC min, max values with the materials reflection glossiness samples to see what would give optimum results.

I also went a step further and compared these settings while tweaking the global DMC Sampler adaptive amount with the noise threshold to get some interesting results.

Check out the pdf, and decide for yourself what are the best settings.

Here’s the max file (max 2008, vray 1.5 sp1) if you’re interested in the rest of the settings. I was using an hdr map, so you will notice a broken link to that map.

Happy April 10th! I was going to do a series of describing different V-ray procedural shaders, but instead, I decided to post the max file on here for everyone’s enjoyment. If there is a need for other versions, I can post them on here as well. There are 10 different shaders in this file.

The nice thing about these shaders being procedural is that there are no texture maps to link to. So as long as you have max, they will work. Enjoy!

V-ray shaders (v-ray 1.5 SP1 max 2008)

•Wood Panels
•Brushed Metal
•Painted Concrete Masonary Unit
•Frosted Glass
•Split-Face Concrete Masonary Unit

A lot of people have a hard time understanding how to use Tiles as a procedural map for bricks, getting them to course properly and fit the model. Firstly, model your building to course! If you know you’re using modular brick be sure your windows and masonry units course at 4” increments. If you’re using king-size brick be sure your model courses at 3”. The following is my attempt to explain how to create accurate bricks to scale, that work every time.

First thing to note is that my geometry in 3DS Max always has a UVW map modifier applied to the mesh with the following settings:

I use box so that no matter what direction the object is or what plane the map is, it will always be the same scale. I also use Real-World Map Size for all of my scenes. There are exceptions to using Real-World Map Size, such as certain objects with displacement, grass, water, things that don’t constitute as a building. The Real-World Map Size will ensure that all of my tiles will be accurate to size, whether they’re bricks, acoustic ceiling panels, floor tiles etc.

For the settings in the material editor for the Tiles node:

Be sure Use Real-World Scale is checked. This will change your Size units to a physical scale (inches, feet, mm, or meters…depends on your Max unit settings). For this example, I created modular brick at 4”x12” (HxW).

Under Pattern Setup, I use regular Running Bond…straight forward. Under Advanced Controls here is where it gets confusing. Adjust both Tiles Horiz. and Vert. to 100. Here’s why: the higher the number under the Horiz. and Vert. Count, the more random your color pattern will be when you increase the Color Variance. By default Max has it set at 4. This only allows a Color Variance among a 4×4 grid, hence the repeated patterning that a lot of people see. Not very helpful for brick. Making it 100×100, allows a greater range of Color Variance. This is as high as it can go, and gives you the best optimized variance!

Changing your Horiz. and Vert. Count affects your Width and Height values under Size. With 100×100 under my tiles count, now my 12” width is really 0.12”. To change the width back to actual, real size 12”, multiply the original width by the Horiz. Count, in this case 100. This applies to the height of course too.

Here’s a simple equation to always get your right brick size:

Intended width X Horiz. Count = Width

Intended height X Vert. Count = Height

Now because we changed the Horiz. and Vert. Count, we also have to lower the Grout Horizontal and Vertical Gap. A good rule of thumb is to use 0.02.

Note: making these changes to your shader will make it look pixelated in your open gl scene, but when you render they will look fine.