It is currently Sat Jan 18, 2020 10:42 am

Creating your first, basic tile:

Come here for tutorials and 3d training. The aim is to point out good 3d training sites or methods.

Moderators :  Winterhawk99, Mermut, Bannor Bloodfist

User avatar
Bannor Bloodfist
Posts:  1309
Joined:  Fri Oct 09, 2009 11:45 pm
A user on the Biosocial forums was asking some general questions on the creation of tiles.

This tutorial will cover starting a new tileset and getting your first, all flat, single tile into the game so you can see it and use it.

So, I am making the following assumptions here:

1) You have 3dsmax installed. (sorry, no link for this one)
2) You have NWMax installed. Be sure to grab the latest version, also ignore all links pointing to a website beyond the vault, all those links are dead now.
3) You have Veltools installed.
4) You have Velmars TilesetCreator installed. note: that the TSC program has a default nwn_set.ini that it installs that has a single error in it. If you open that file, you will find a section that looks like this:

Code: Select all
[Tile-1]
Model=new_tile
WalkMesh=msb01
TopLeft=Grass
TopLeftHeight=0
TopRight=Grass
TopRightHeight=0
BottomLeft=Grass
BottomLeftHeight=0
BottomRight=Grass
BottomRightHeight=0
Top=
Right=
Bottom=
Left=
MainLight1=1
MainLight2=1
SourceLight1=1
SourceLight2=1
AnimLoop1=1
AnimLoop2=1
AnimLoop3=1
Doors=0
Sounds=0
PathNode=A
Orientation=0
ImageMap2D=none
There are four lines there that mention height. (TopLeftHeight=0, TopRightHeight=0, BottomLeftHeight=0, BottomRightHeight=1) That last one, the BottomRighHeight should be changed to = Zero as in BottomRightHeight=0. I may be point to the wrong specific corner, but I know that one of the corner heights is set to a 1 (one) and should be a 0 (zero). So, just edit that nwn_set.ini file to make that adjustment and you won't have further trouble with the Set Creator for that aspect of things. If you have installed the program correctly, that file will be located in your main 3dsmax\scripts\nwn-set subfolder.

First off, we have to create a basic .SET file: Unfortunately, TSC can't start the .SET for you directly, it must have a basic .SET file to work from. That .SET does not need any actual tiles, but it does need some basic header information for the TSC to work correctly. If you don't create this or copy from an existing .SET file, TSC will crash when you attempt to add tiles.

What I use is the following basic information, and change it as necessary:
Code: Select all

[GENERAL]
Name=mytileset
Type=SET
Version=V1.0
Interior=0
HasHeightTransition=1
EnvMap=mytileset__ref01
Transition=5
DisplayName=-1
UnlocalizedName=My Tileset
Border=Grass
Default=Grass
Floor=Grass

[GRASS]
Grass=1
GrassTextureName=my_custom_grass
Density=5.000
Height=1.000
AmbientRed=1
AmbientGreen=1
AmbientBlue=1
DiffuseRed=1
DiffuseGreen=1
DiffuseBlue=1

[TERRAIN TYPES]
Count=1

[TERRAIN0]
Name=grass

[CROSSER TYPES]
Count=1

[CROSSER0]
Name=road


Name your file by your tileset definition name. IE, if you were working with a rural tileset, you might name it ttr05.set
You will have to adjust the entries in that code box above to reflect your tileset name. So, you might replace the first instance of MyTileset with ttr05.set, replace the Mytileset_ref01 with ttr05_ref01 and the actual Name of MY Tileset with Rural by Me or whatever you choose to name your tileset. This name will show up in the toolset when you add your tileset to a module, so choose wisely.


Ok, so we have opened 3dsmax, and the three tools listed above will all automatically start for you. However, there is a bug somewhere in how the TSC loads, and I have found that I must close it, and re-run the startup script to alleviate the bug. It is something related to how paths are stored in memory for the three tools, and if you don't close and reload the TSC, it will constantly fail on you. Please see the following shots:

Image
Image

Now you can load your set via the TSC, just browse out and select the new .SET file you created earlier.

Image
Image
Image
Image
Image
Image
Image
Image
WARNING: REMEMBER TO CLICK THE "Write .Set" BUTTON. I forgot when I took a break and closed max, so every change to the .set was lost. Fortunately, this is a VERY small set at this stage and "re-creating" a single tile entry was not all that difficult!

So, now we have basic data for a single tile in the .SET file, lets go create that tile next.

NOTE: I used VelTools v1.25 for creating tile dummies, it is faster and easier by far than manually creating things. It automatically links all the dummies to the correct main tile dummy, and allows you to set the tilename etc right from the first.

Image

Since we now have a properly created set of Dummies, including the main tile base dummy, two main lights (one each at different heights) and two source light dummies as well as the anim dummy, we can now start to add actual objects to this file.

Since this is a "Grass" set, and since all terrains MUST have a base, flat plane to start from, we will create a tile named ttr05_a01_01 and create a single flat plane. We will texture it using any texture you choose, but in this case, I will use a texture I have handy from my current work with the CTP_Tropical set.


But first, let us create a flat plane to start the process:

Image

As you noticed in the screen shot above, there are roll-outs for size, divisions etc. But they do nothing until AFTER you drag a plane out onto the view port.

Image
In the above image, you will notice several things. 1) We have the plane selected, and have clicked the "Select and Move" button across the top. This allows us to drag the plane around if we need to, but it also allows us to use the "Transform Type In" Window to adjust the position more precisely. We simply fill in the X, Y, and Z positions with a Zero to center this plane in the window.

We also adjusted the plane's size and divisions using the roll-out menu on the right.

Your modifier stack: We should adjust the modifier stack to reflect what we are working with.
Image


Now you have your first ground plane! Of course, it is completely flat. I don't know about you, but I have NEVER seen a completely flat section of ground except in a Stadium or ball playing field. Most land is crumpled, bent, raised/lowered whatever. To correct for this, we can do some VERY simple modifications to that flat plane.

However, please remember that the OUTSIDE edges, MUST remain flat if you want other tiles to connect correctly to the basic flat terrain. So, we will only adjust the inner vertices, to give the ground some sort of detail.

Image
Image


Now, we have a base plane to work from. All it needs is to be linked to the mdl base, and we will have to create a walkmesh that matches it.

First, to link:
Image

That gives us this new window where we can select what to link this object to.

Image

So, we have a tile, but it is still not complete. Now we need a walkmesh to match the terrain that we have created. There are several ways to accomplish this, but I will only show you the fastest, easiest way to do it. I clone/copy the existing plane, and name it walkmesh, then convert it to a walkmesh object by changing the modifier stack.

First, select the plane. Then select the Edit menu, and choose Clone, or hit Ctrl-V to open the clone window.
Image

Change the Modifiers to reflect that this is now a walkmesh. First, collapse everything in the stack so you are left with an editable mesh, then add the Your walkmesh:
Image
Image
Image

This next screen is just to show by example how the face color changes when you change the surface type.
Image


Now we have two objects in the mdl file, but have not connected them to the mdl base. If an object is NOT linked to something it will NOT export. This is how to link them:
First select the ground plane object, then click the buttons in this next screen;

Image
Image

You will need to follow those same steps for the Walkmesh object.

Don't forget to save the file.

As a side note, I always save the max scene using file/save, and THEN export the mdl using NWMax export. If you don't save the scene, and you have to go back to adjust the mdl, you will have to re-import the tile, and every import/export cycle can generate rounding errors, where your vertices may not end up where they should be. So, always go back to the 3dsMax .scene file if you need to reload that same model to continue your changes.

There are some basic details in those shots so please read the text in them as well.

Note: There is another tutorial here Create a new tile or object that pretty much covers the same things, but in a slightly different fashion. Going through that one as well as this one, will help to strengthen your understanding of the processes.


The Next tutorial will cover adding a basic texture to your ground plane, and I will provide a link for it here, once I have it created.
CTP Team Lead

Return to The Learning Curve



Users browsing this forum: No registered users and 1 guest
cron