Basic Walk Mesh Editing. for Neverwinter Nights 2. Using Blender

Similar documents
Animating a Cabinet for NWN2

3D Design with 123D Design

By Roland Hess -- Based on the Blender Summer of Code tutorial by Michael Worcester

MatterHackers. How to make a 3D model using Google Earth. Written By: Ryan Lutz. How to make a 3D model using Google Earth data

Textures and UV Mapping in Blender

Brief 3ds max Shaping Tutorial

5 Subdivision Surfaces

Module 4A: Creating the 3D Model of Right and Oblique Pyramids

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1

Character Modeling COPYRIGHTED MATERIAL

3 Polygonal Modeling. Getting Started with Maya 103

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

Editing Polygons. Adding material/volume: Extrude. Learning objectives

NURBS Sailboat on Ocean (Modeling/Animation)

Tutorial 2: Particles convected with the flow along a curved pipe.

Autodesk Fusion 360: Model. Overview. Modeling techniques in Fusion 360

Working with the Dope Sheet Editor to speed up animation and reverse time.

Animate this crate. Part 1 adding PWK Use

Character Modeling IAT 343 Lab 6. Lanz Singbeil

This view is called User Persp - perspective. It's good for rendering, but not for editing. Ortho will be better.

SketchUp Starting Up The first thing you must do is select a template.

SketchUp. SketchUp. Google SketchUp. Using SketchUp. The Tool Set

Chapter 19- Object Physics

2 SELECTING AND ALIGNING

Lesson 1: Creating T- Spline Forms. In Samples section of your Data Panel, browse to: Fusion 101 Training > 03 Sculpt > 03_Sculpting_Introduction.

Module 4B: Creating Sheet Metal Parts Enclosing The 3D Space of Right and Oblique Pyramids With The Work Surface of Derived Parts

LOOSE FITTING CLOTHES

4 TRANSFORMING OBJECTS

Designing Simple Buildings

Polygon Modeling Basics Chapter 1 - Vertices

12 APPLYING EFFECTS. Lesson overview

A Guide to Autodesk Maya 2015

COPYRIGHTED MATERIAL. Making Excel More Efficient

12 APPLYING EFFECTS. Lesson overview

Learning to use the drawing tools

Create Models or Use a Library? Create your own library How to Get Started? [ 140 ]

Dremel Digilab 3D Slicer Software

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

UV Mapping to avoid texture flaws and enable proper shading

ROTOSCOPING AND MATTE PAINTING In Blender v2.48a

Tutorial Model the perfect 3D face

ARCHITECTURE & GAMES. A is for Architect Simple Mass Modeling FORM & SPACE. Industry Careers Framework. Applied. Getting Started.

3ds Max Cottage Step 1. Always start out by setting up units: We re going with this setup as we will round everything off to one inch.

First Animated Model Yellow Submarine

Chapter 3- Creating & Editing Objects

To build shapes from scratch, use the tools are the far right of the top tool bar. These

Chapter 1- The Blender Interface

Photography by Christina Sizemore. Mudbox Hotkeys

Dr.Engrave USER'S MANUAL

GroBoto v3 SeamNet Mesh Notes

Note: Photoshop tutorial is spread over two pages. Click on 2 (top or bottom) to go to the second page.

BRYCE 5 Mini Tutorial

Blender Lesson Ceramic Bowl

Getting Custom Content Characters into Neverwinter Nights 2

CGS 3220 Lecture 13 Polygonal Character Modeling

Modeling a Gear Standard Tools, Surface Tools Solid Tool View, Trackball, Show-Hide Snaps Window 1-1

EDITING AND COMBINING SHAPES AND PATHS

Graphic Design & Digital Photography. Photoshop Basics: Working With Selection.

Where to get Blender. Go to Download the latest version

Basic Blender Commands This is just a partial list of Blender commands. Please visit the Blender.org website for more details.

A Step-by-step guide to creating a Professional PowerPoint Presentation

Taking the Best Reference Photos

Google SketchUp. and SketchUp Pro 7. The book you need to succeed! CD-ROM Included! Kelly L. Murdock. Master SketchUp Pro 7 s tools and features

3D Body. Summary. Modified by Admin on Sep 13, Parent page: Objects

Tangents. In this tutorial we are going to take a look at how tangents can affect an animation.

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 1 The Blender Interface and Basic Shapes

Shade tutorial: Shoes for Poser.

2.2 - Layouts. Bforartists Reference Manual - Copyright - This page is Public Domain

Adobe Illustrator CC 2018 Tutorial

AUTODESK FUSION 360 Designing a RC Car Body

The University of Nottingham Second Life Building Tutorial

SolidWorks 2½D Parts

Adobe Illustrator. Always NAME your project file. It should be specific to you and the project you are working on.

Chapter 1- The Blender Interface

Anatomy of a Window (Windows 7, Office 2010)

Lesson 11. Polygonal Spaceship

COS 116 The Computational Universe Laboratory 10: Computer Graphics

All textures produced with Texture Maker. Not Applicable. Beginner.

QUICK START USER MANUAL

solidthinking Inspired Tutorials 2009 solidthinking, Inc. for Mac

Mesh Modeling Vase and Flower

Actions and Graphs in Blender - Week 8

Excel 2013 for Beginners

Introduction to XDisp Qt The New HKL-2000 and HKL-3000 Diffraction Image Display

ZBrush To Softimage XSI 16-Bit Displacement Guide

Week 1 The Blender Interface and Basic Shapes

An Introduction to Maya. Maya. Used in industrial design, CAD, computer games and motion picture effects. The ambition is what get

Spiky Sphere. Finding the Sphere tool. Your first sphere

Solidworks 2006 Surface-modeling

RICE DMC SHORT COURSE. Creating a Digital Illustration in Photoshop (Advanced)

Creating Buttons and Pop-up Menus

Reference Image. Source:

L E S S O N 2 Background

Transforming Objects and Components

SolidWorks Intro Part 1b

Open Blender and click anywhere to remove the Splash Screen.

Using Charts in a Presentation 6

Numbers Basics Website:

This is the opening view of blender.

Project 9. Render a Kitchen

Transcription:

Basic Walk Mesh Editing for Neverwinter Nights 2 Using Blender Copyright 2013 by Robert J. Hall November 16, 2013 Introduction Greetings. In this introductory tutorial I propose to show how to edit the WALK packet of the MDB format file. This type of file is used by the Neverwinter Nights 2 game to retrieve 3D model data. The WALK packet provides information about how a character interacts with a model when he is moving across the ground. Getting this packet correct is essential for adding the model into an area and successfully baking the mesh. In order to edit an MDB model file, I am going to use version 2.69 of the open source software package called Blender. To import the model file into Blender, I also needed an add-on package known as the Blender MDB Import/Export Plugin. This utility is available from the Neverwinter Vault web site; both products are free of charge. The data in the WALK packet is used to create a triangular mesh pattern known as a walkmesh. This information is stored as an array of vertex coordinates combined with an array of trianglar faces. Each triangle entry identifies the three vertices that form the corners, and it has a set of bit flags that tell the game what type of surface the triangle has, whether it be stone, wood, metal, dirt, and so forth. There is a special bit that indicates whether the triangle is walkable or not non-walkable triangles prevent all entry. Preparation For the purpose of this tutorial, I am going to construct a walkmesh that will provide an elevated platform surface for the placeable named 'Guard Shack (2 TINT)'. The walkmesh needs to provide a small walkable area for the tower platform floor, but prevent access to the platform from the outside. In Windows, I first create a working directory to hold the required model parts and textures. The 1

following files are copied there from the 'Neverwinter Nights II' install directory: In Data\NWN2_Models.zip\...\Placeables PLC_BR_WalkStone.MDB PLC_BC_GRDK02.MDB In Data\NWN2_Materials.zip\...\Placeables PLC_MC_CollBox.dds PLC_MC_CollBox_N.dds PLC_BC_GRDK03.dds PLC_BC_GRDK02_n.dds PLC_BC_GRCK03_T.dds Using Blender In order to use Blender to follow this tutorial, you will need to become familiar with the following basic features of the tool: Opening a new file Right-clicking in the Outliner window and deleting an object Use of the numeric keypad and middle mouse button to move about the 3D view Application of the icons in the Outliner window, including showing and hiding objects using the eye icon Selecting an object and then using the 'tab' key to enter and exit edit mode Switching between Vertex and Face select modes using ctrl-tab, or with the icons Selecting or deseleting all parts of an object with the 'a' key Sub-dividing selected faces using the 'w' menu Dragging selected faces or vertices along the x, y, or z axes with the left mouse button Using the 's' key with axis restriction (x, y, or z) to change the scale of selected faces Using the 'e' key with axis restriction (x, y, or z) to extrude selected faces Using the 'b' key to drag-select a group of faces Creating a triangle face from three selected vertices using the 'f' key Rotating adjacent pairs of selected triangles using the ctrl-e menu Using the 'h' key to hide a triangle face and 'alt h' to reveal it again Converting quads to triangles using ctrl-t Using ctrl-z to undo changes Saving your work to a.blend file To learn more about the tool, various video tutorials are available from the Blender Foundation's web site. Importing the Model First I'm going to import the tower model into Blender so I can use it as a scale for the walk mesh. After launching Blender, I prepare the workspace by moving the mouse pointer to the Outliner window in the the upper right, left- 2

clicking on the Cube object, then right clicking and selecting 'Delete'. This removes the default cube object. From the File menu, I select Import, then choose the Neverwinter Nights 2 (.mdb) item. The Guard Shack model imported into Blender Looking around the base of the model I note that it has ten sides with a protruding ladder. For the purposes of this tutorial I'm going to get rid of all the objects except the base tower. I do this from the Outliner window. The import menu Once the import panel appears, I navigate to the working directory and select the file named: PLC_BC_GRDK02.MDB then click on the 'Import from NWN2 (.mdb) button' at the upper right. After a brief pause, the model objects appear in the 3D view at center and are listed in the Outliner window. When I hide everything except the PLC_BC_GRDK02, I see the model shown next. 3

After entering the name, I press return to set the field. Outliner window with the tower part expanded The following parts are deleted: PLC_BC_GRDK02_C2 PLC_BC_GRDK02_C3 PLC_BC_GRDK02_L01 PLC_BC_GRDK02_w then I save the work to a.blend file. Importing the Walk Mesh Helper Import from NWN2 (.mdb) Since I have already imported a model from the working directory, there is an entry in the Recent panel along the left side. I choose that line and merge in the walkmesh model: PLC_BR_WalkStone.MDB With the tower model hidden, I see the box shown next. Now I'll add in the model parts that I actually want to use. From the Import panel, I set the 'Model title' field to the new name I'm going to use: 1 PLC_BR_WalkStoneTower 1 This panel is from version 2.6.2 of the Blender MDB Import/Export Plugin. In version 2.6.1, you will need to individually rename all of the objects and their components in the Outliner panel. 4

The RIGD object in edit mode Since the base of the tower is circular, I want to match the shape by creating an octagon. This will mean I need to sub-divide the object into a mesh of at least three rows and three columns. I select the object, enter edit mode, then perform a subdivide twice, leaving it with four rows and four columns of triangles. The Walkmesh Helper imported into Blender This view consists of all components of the standard walkmesh helper overlaid on top of each other. The part that extends downward is the actual WALK mesh object. Shaping the Surface Mesh For ease of illustration, I'm going to start by editing the RIGD object; hereafter referred to as the surface mesh. In the Outliner window, this is named PLC_BR_WalkStoneTower with no suffix. I hide all of the other objects from view so they don't get in the way of my edits. The mesh after two subdivisions Now I need to reshape the mesh so that it is octagonal. I begin doing this by selecting the object, entering edit mode, and trimming off the corners. 5

I like the symmetry.) This is shown next. Part way through trimming the corners. The selected pair has just been rotated. Before reshaping the object to fit the tower, I want to simplify the mesh. A slow but tidy way to do this is by an inerative process of adding new triangles and deleting the old ones. However, doing so will create overlapping faces. If you try to select a face to delete you may end up selecting the one you want to keep. But hiding the selected face will allow you to choose the other. (Make sure you unhide the faces and deselect before deleting or you may end up with extra edges.) The mesh after cleanup The resulting mesh forms a roughly circular shape and should be scalable to fit the base of the tower. For the purposes of building a walk mesh this should be good enough, and using fewer triangles will make it easier to bake. Now I want to reshape the mesh border to that it lines up with the tower base. I do this as follows: Select the entire mesh and scale it out by a multiple of 4 Make the tower visible Modify the base scale of the mesh until the edges are just outside the outer edge of the tower Hide the tower Cleaning up the mesh At this point I need to do some refinement of the mesh edges by selecting individual vertices and dragging them along fixed axes until I get a decent match that encompases the base. Since the tower base is ten-sided and the mesh has eight, it is not going to be an exact fit. After cleanup I end up with a mesh of just eight triangles. (It's possible to reduce it to just six, but 6

Added triangles for the ladder Roughly fitting the mesh to the tower base However, I do want to get a closer fit to the ladder. To do this, I do the following: Now I slide the vertices around until I get a better fit. For reference, select the triangle face under the ladder Hide the tower from view Delete the triangles to either side of the ladder triangle Select the ladder triangle and do a subdivide Restore the deleted triangles, but join them to the middle vertex along the side of the ladder triangle. Simplify the three protruding triangles down to two. Caution: be cautious about sub-dividing a triangle that is seated amongst other triangles. Doing so can end up converting the adjacent triangles into triangular-shaped quads. The result of these edits is shown next. The completed base This should serve. With the outline finished, I'm now ready to extrude the base and form a column up to the height of the guard platform. I do this as follows: Hide the tower Select all faces of the mesh Show the tower Click 'e' to get a blue vertical line for the extrustion axis. (If you don't get a blue line, press the 'z' key.) Lift the extrustion up until it is exactly at the height of the platform floor. It is worth spending a little time making sure the 7

top of the extrusion is a good fit with the platform. That way a guard positioned on top won't appear to be floating or walking through the platform. The result should look like the next illustration. select the top and scale it inward. Hide the tower Select the top faces except for the two ladder triangles Show the tower Use 's' and scale the mesh inward until it gets a decent fit to the inner platform It's not a great fit, so I spent a little time reworking the top vertices until they matched up with the interior of the platform. To make this easier, I give the shack model a blue diffuse hue. Select the tower Chose the material edit icon. This is the silver sphere icon in the right-hand panel below the Outliner In the Diffuse sub-panel, I select the white box then adjust the color to light blue The base has been extruded up to the platform The result of my edits is shown below. For ease of viewing I have deleted the top part of the shack object. This won't matter since the tower will be deleted before I export. Note that the vertical sides of the extruded base are now quads (four-sided) rather than triangles. To fix this, you will need to select the sides and press ctrl-t. The triangles used to build the base can now be removed. For this, I hide the tower then rotate the view around the horizontal axis until I can clearly see the underside. After selecting the bottom faces, I press delete and select Faces. To provide a better fit to the tower, I need to 8

Aside: On my first pass through this model, I used the shift-d option to duplicate the surface mesh and then joined it to the walk mesh with ctrl-j. Unfortunately, I experienced inconsistent results with some of the sides and vertices receiving extra duplicates. It was a mess to clean up and I can't recommend that approach. Thus, I'm forgoing this approach for the tutorial. The top mesh scaled and reworked to fit. The top of the shack has been deleted for this view. At this point the edit of the surface mesh is complete, so it is a good time to save my work to the.blend file. I hide the tower since all of the remaining edits will be fit to the surface mesh. Editing the Walk Mesh My goal now is to edit the walk mesh so that it is virtually identical to the surface mesh. This requires some manual tweaking of the vertices, in combination with hiding and revealing the surface mesh so I can see how they align. After creating the base to match the triangle pattern used for the surface mesh, it is just a matter of maneuvering the edge vertices to coincide with the corners on the surface mesh. This is fairly easy to do once you get the hang of it. Once everything is set, I shift the central vertex to the middle of the octagon. The next step is to edit the walk mesh to match the surface built above. The walk mesh object is the entry in the Outliner window with the '_W' suffix. To make this easier, I'm first going to remove the side triangles that extend below the model. These will be added back later. Aligning the walk mesh vertices (at bottom right) with the surface mesh As with the surface mesh, the walk mesh is now extruded vertically until it lines up with the top of the surface mesh. The sides must be converted 9

from quads to triangles. The top of the walk mesh is then edited in the same manner as the base until the vertices are lined up with the corners of the surface. they needs to be eliminated so that there are not overlapping walk mesh triangles. The end product is shown next. The two meshes should now be neatly aligned. If you have any seeming differences along the sides, this may be because the triangles are lined up in the opposite direction. Should you want to fix this, just select the adjacent triangles and use the ctrl-e rotate option. While creating some of the faces of the walk mesh, they may turn a red color. This is the imported model's representation for an unwalkable material. To set the selected faces back to stone, I select the material editor in the panel below the Outliner. (It's the icon of a shiny silver sphere.) I choose the entry for W_stone and click on Assign. The selected faces change color to gray. Setting the material for the walk mesh The final step of this edit is to eliminate the faces from the bottom of the walk mesh; these were created during the extrude operation and Walk mesh with the bottom faces removed With the duplication complete, I now need to extend the bottom edges of the walk mesh downward. Walkable meshes such as this one have sides that extend down to a special Z- coordinate value equal to -1000000. On import, the Blender MDB Import/Export add-on will automatically retract the bottoms of this mesh up to a value that makes it easier to work with. 2 The export function will then extend the triangles falling below a certain depth 3 back to the special -1000000 value. Thus I need to extrude the base down to below the altitude used by the export. 2 In version 2.6.1 of the Blender MDB Import/Export Plugin, this was set to -500. 3 Version 2.6.1 extended vertices that have a Z- coordinate of -100 or below. 10

To perform the extrude, I need to select the edges along the bottom (rather than the faces). I then perform the extrude along the z-axis until I pass below the required depth. 4 Following the extrude, the vector appears in a panel to the lower left. If the value is not what is required for export, I pull the edge further down. Caution: special care must be taken with these vertical sides, or the resulting mesh may not bake cleanly. It should consist of a single, contiguous layer of triangle mesh that wraps around the model and stretches from the ground level (or higher) down to the bottom. Applying a subdivide to the walk mesh object can result in additional lower rows of triangles. These must be eliminated then the bottom of the mesh pulled downward to the required level for export. The final step is to apply the unwalkable material to the sides of the walk mesh, while leaving the platform walkable. I select all of the sides plus the ladder top, then set the material to W_unwalkable. The selected faces should turn bright red, representing a non-walkable mesh. The extrude panel showing the Z-coordinate Again, the extruded sides are quads, so they need to be converted to triangles. Walk mesh with the sides set to unwalkable 4-4.9 is the default value for version 2.6.2. 11

The Collision Boxes The objects for the two collision boxes have suffixes '_C2' and '_C3'. The C2 box is the first collision box that is checked by the game to determine whether a character is about to move into an object. It is usually a simple box-shaped object that makes it easy to quick calculations. The C3 box is then used for more fine-grained collision determination. It should have a close fit to the RIGD objects. The first of these I choose to edit is the C3 box. The import plugin gave it a distinctive 'chilli pepper red' diffuse color for easy identification. To set the C3 mesh to the outline of the surface mesh object, I follow the same I used to create the walk mesh. With the duplication operation complete, I edit the C3 mesh so that it entirely encloses the surface mesh. I do this by making the surface mesh visible and seeing where it pokes through the C3 mesh. Then I select vertices on the C3 mesh and incrementally pull them outward by a slight amounts until the surface is no longer visible. C3 mesh with some of the grey surface mesh visible. Two vertices are selected for dragging. Editing the C2 mesh is more straight forward. All I need to do is select a side at a time and stretch it until the box only just contains all of the other objects. When all of the other objects are set to visible, they should not be visible through the sides of the C2 box. (The exception is the lower part of the walk mesh, which extends out of bottom.) 12

quads into triangles. However, it may do so in a way that you didn't intend. If the quad can be eliminated by replacing two adjacent triangles with a single triangle, then I find it better to make that revision. Now it's time to export the completed model and try it in the toolset. Extending a side of the C2 mesh With that I'm done with my first edit pass. Time for another save to the.blend file. Cleanup Prior to export, I prefer to make sure that the walk mesh has the minimum number of triangles necessary to provide the walking surface. This makes it easier for the Neverwinter Nights 2 Toolset to provide a clean bake without completely blocking out a square. If you can find a way to simplify the mesh without making it coarser than necessary, then it is good practice to do so. The export function of the Blender MDB Import/Export add-on will automatically convert Initially, the mesh failed to bake cleanly After baking, I sometimes find white lines appearing around the perimeter of my walk mesh. These can occur, for example, when one vertical triangle overlaps part of another vertical triangle that is higher up. All it takes is a very slight overlap one not perceptable to the eye for this to occur. For this reason it can be a good policy to make sure that a shear vertical walk face has a very tiny slope toward the outside. It usually doesn't take much; barely a.02 shift between the top and the bottom of a triangle to avoid the bake failure. Thus, what I do prior to export is go all around the walk mesh bottom and systematically pull horizontal lines of triangle faces out by a small amount. A side at a time, I select the vertices 13

along the bottom then pull it along the axis facing outward by a smidge. The amount can then be adjusted to.02 in the input box for the axis. In some cases the walk mesh overlap may be more blatant and the mesh may need to be reworked. Rotating the model around and eyeballing the faces may help reveal these issues. Caution: there is a known issue with the current version of the import/export tool that can cause it to apply an extra transform to the objects following an export. This can distort any edits made. For this reason I always save your model prior to any export, then restore it following the export. When I am finished, export the model and try it in my toolset again. I may need to keep making minor tweaks to individual bottom points and baking your model in different orientations to finally eliminate all the artifacts. Success! The mesh baked as expected, with a small walkable area on the platform floor There you have it, I can now use the mesh. All I need to do is insert it in the same area as the guard shack and enter the same coordinates and facing. The mesh will then overlay itself appropriately. Of course, in reality you would want to merge the walk mesh directly into the guard shack model. 14

To close this tutorial, here is a screen shot of the walk-meshed guard shack in action. Behave yourself: the guard is keeping a watchful eye on you! 15