AECBytes Architecture Engineering Construction Newsletters  

AECbytes Tips and Tricks Issue #15 (February 21, 2007)

Creating Walls with NURBS in 3ds Max and VIZ

Scott Onstott
Book & Video Author

You probably haven't ever considered making architectural walls and openings with Non-Uniform Rational Basis Splines. I mean, why would you? NURBS are best known as tools that model perfect curves and surfaces, whose every point is mathematically defined. Automotive and industrial designers, naval architects, and even character modelers use the power of NURBS to represent surfaces of complex curvature. The most mature NURBS toolsets are in Alias Studio, Maya, and Rhinoceros.

However, NURBS tools have quietly been a part of 3ds Max and VIZ for many years. These programs are just not known for NURBS, and it's my hunch that most people are intimidated by their complexity and consequently have stuck with mesh or patch modeling tools. The few brave souls that have dived into the deep end of the NURBS pool in 3ds Max and VIZ are still probably those few who require NURBS' superior power to precisely handle complexly curved models.

I've discovered that NURBS are excellent tools for representing walls. Yes, even for walls that have absolutely no curvature to speak of. I like creating walls with NURBS for editing flexibility, superior organization, and adaptive topology. In fact, I suppose that the creators of SketchUp are using NURBS under the hood to drive what amounts to a very intuitive and powerful modeling program (but that's purely my supposition). I invite you to go through this tutorial and decide afterwards how you want to make walls and openings in 3ds Max and VIZ.

Let's start by sketching a simple floor plan in the Top viewport. Don't sketch the linework with NURBS curves—it's easier to get straight lines with splines. Use grid point snap and sketch the following rough shape using the Line shape tool.

Click the last point of the line on top of the first point and click Yes when prompted to close the spline. Don't outline the spline with the wall thickness, as you're probably tempted to do if you're used to extruding spline-based walls. Instead we'll leave the floor plan as a single-line representation.

Rename the object Walls. Turn off snap and go to the perspective viewport by pressing S and P. Switch to the Modify panel and apply the Extrude modifier. Set your units to US Standard if you want to match what I'm doing and then set the Extrude amount at 8 feet. Select the NURBS radio button in the Output group.

Notice that the walls don't have caps on the top and bottom now like they do with Mesh output. Only the walls have been extruded. 3ds Max 9 shows the backfaces of the extruded surfaces by default, but 3ds Max 8 and VIZ do not.

To see the backfaces of the wall, right-click and choose Properties from the Tools 1 quad menu. If Display Properties are set By Layer, click the button to go By Object. Uncheck Backface Cull and you'll be able to see the inside surfaces of the wall. If these surfaces appear dark (no lighting), right-click the viewport label and choose Configure to open the Viewport Configuration dialog box. Choose the 2 Lights radio button in the Rendering Options group. Click OK and both the inside and outside surfaces will appear evenly lit.

Now the stack contains a Line object with an Extrude modifier. Right-click at the bottom of the modifier stack and choose Collapse All. Click Yes in the warning dialog and you'll be left with a stack containing a NURBS Surface object.

Press F4 to toggle on edged faces mode. Open the Display Line Parameters rollout. Press F3 to toggle into wireframe mode. Notice the green isoparametric lines. These can be helpful on curved surfaces, but we don't need them.

Choose the Mesh Only radio button and you won't see any iso lines. Switch back to shaded mode by pressing F3 again. What we see in edged mode matches what we see in wireframe. Now we're back in our comfort zone.

Open the Surface Approximation rollout. NURBS surfaces have to be "approximated" by mesh tessellations. NURBS live in a perfect mathematical world where they live in eternal bliss, but we must approximate them into mere mundane meshes when they descend into our world. You see, all geometry must be reduced to triangles to be rendered. Meshes are fundamentally triangles, but I digress.

As we are modeling walls, which are almost certainly flat, we'll go for the minimum tessellation. Set tessellation method to Regular and use 1 step in both U and V.

By the way, the letters UVW refer to the coordinate system defined by the surface itself. The UVW system is also used by materials to locate texture maps on surfaces. I suppose they chose the letters UVW because they immediately precede XYZ, and we already know those letters refer to spatial coordinates.

Right now you have an attractive set of surfaces, but they are paper thin. Apply the Shell modifier and enter the wall thickness of 5 inches in the Outer Amount parameter. The walls get extruded outward in elevation and now we're seeing solid walls.

Look closely and you'll see that the outer corners don't meet in a single edge. They have a chunk missing because of the way that each wall segment was extruded outward. Use the Shell modifier with Outer Amount when you are making an interior model. But let's say we are making an exterior model where we will see the outside of the building. Set Outer Amount back to zero and set Inner Amount to 5 inches.

All inner corners of the walls will have chunks missing, but the outer corners all look great. If you need both inner and outer corners to be right (for a walkthrough or web3D model) you'll have to adjust the NURBS curve manually. Go to the Curve CV (CV means control vertex) sub-object level of the NURBS Surface. Select one CV on the corner you want to fix and move it a distance equal to the wall thickness. Here we move one CV minus 5 inches in X. Go back to object level and click the Show End Result toggle in the stack. The corners are all healed—hallelujah!

Now we are finally in a position to cut openings in the walls to accommodate windows and doors. Let's make a window first. Sketch a Rectangle on the outer surface of a wall using Autogrid mode. In this way, the spline's local XY plane will be on the wall's elevation.

Select the Walls object, go to the Modify panel and select the top level of the NURBS surface in the stack. Click the Attach button in the General rollout and click on the rectangle. Now the rectangle has become an independent curve subobject of Walls. Rectangle01 is gone; Walls is the only object in the scene. All NURBS work happens with subobjects.

I like to pull my curve subobjects out of the plane of the wall so they will be easier to select later on for editing; it's just a little trick I've developed. Go to the Curve subobject level. You have four independent "curves" (which actually look like lines) here. Click the All Connected Curves button at the top of the Curve Common rollout. Click on one of the curves and all four will highlight. Pull the selection back a short distance away from the wall surface.

In order to cut a hole in this wall we need to project these four independent curves onto the wall surface. Go to the top level of the NURBS Surface in the stack. Open the Create Curves rollout. Click the Normal Proj. tool and then select a curve (former segment of the rectangle) and click the wall surface.

A green dependent curve will appear projected on the wall surface. You wouldn't be able to see this unless you had just pulled the independent curves away from the wall.

Project all four independent curves (blue) to dependent normal projected curves (green). Now go to the Curve subobject level, select the independent curves that you pulled out of the plane of the wall, and move them. The dependent curves follow. The position of the window is completely editable by moving the independent curves.

There is one more step to trim the opening. Go back to the top level of the NURBS surface and open the Create Surfaces rollout. Click the Multi-Trim tool and select each one of the green dependent normal projected curves. Right-click to stop selecting and check Flip Trim at the very bottom of the Create panel (you will have to drag the panel up). Congratulations, you've cut the window opening.

Cutting a door opening is a bit easier than trimming out windows. It works differently because doors interrupt the bottom edge of the wall, so they can't be trimmed. Go to the Surface level of the NURBS Surface. Click the Break Col. tool in the Surface Common rollout. Toggle off Show End Result in the stack so you can see the blue lines. Click wherever you want one edge of the door opening to be. Click again a short distance over to add the other edge of the opening. You are breaking the NURBS surface along these lines into new surfaces.

Click the Break Row tool and click near the top of the new surface you just broke off to set the header height. Right-click to end the tool. Select the door surface and delete it.

Return to the top level and toggle on Show End Result in the stack again. The door opening appears in the solid wall. Now you can adjust the position, heights and sizes of the openings by selecting the Surface CV level for doors and Curve CV level for windows. You can add as many doors and windows as you want to a single wall object. It's all extremely organized and very flexible. Compare this with boolean compound objects, where you'll usually have deep nesting issues that make editing almost impossible.

The workflow for creating NURBS walls is actually much easier than it might seem the first time you run through it. Half the battle is wrapping your mind around how NURBS work—dependent vs. independent curves, curves on surfaces, subobject modeling tools, UVW space, isoparametric lines, etc. I have found NURBS worth the steep learning curve, and I hope you realize the benefits of making walls and openings with NURBS.

A 14 minute video showing this technique is available on my vodcast, The Digital Architect.

About the Author

Scott Onstott is a book and video author of AEC software tutorials. He has a degree in architecture from UC Berkeley and has served as an instructor there, in addition to working in several prominent engineering, architecture, and interiors firms in San Francisco. He has also worked as a technical editor and technology consultant.

Scott has contributed to over two dozen books and videos on AutoCAD, Architectural Desktop, VIZ Render, Revit, 3ds Max, VIZ, Photoshop, Illustrator, Painter, Fireworks, and Dreamweaver. He most recently co-authored AutoCAD:_Professional_Tips_and_Tricks with Lynn Allen. He can be reached via: www.ScottOnstott.com.


If you found this article useful and have not yet subscribed to AECbytes, please consider doing so. Subscription is free, and more subscribers will allow this publication to provide more of such content to you.

Tips & Tricks > Creating Walls with NURBS in 3ds Max and VIZ > Printer-friendly format

 
© 2003-2009 Lachmi Khemlani, AECbytes. All rights reserved.
Site design by Vitalect, Inc