Author Topic: My First Tileset  (Read 4192 times)

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #75 on: December 19, 2010, 04:16:42 am »


               

Bannor Bloodfist wrote...

The apply to all bit can cause serious issues for you as you get more detailed/complicated in your objects.  For instance, the wok/walkmesh, must be set as a walkmesh, not a trimesh.  Beyond that, your helpers should not be changed from what they are currently assigned as.  IE the model base should not have anything like a trimesh assigned to it.


VICTORY! BOUT DAMN TIME!

The last bit was the problem. I had my trimesh modifier attached to my helpers. Once I got rid of that, the model showed right up in NWNE no problems.

Well, almost no problem. My textures look like they've been downscaled and desaturated a bit, and the alphas have huge black borders surrounding them. That might just be the NWNE renderer though.

I'll export the depot and see what it looks like.

edit:

Ahahahahahaha!

'Posted

Dunno why it never occured to me to put the whole building on one tile. But it did. And I did it. And now it works.

This has been an absolute bastard, but I'm finally getting the hang of it. '<img'>
               
               

               


                     Modifié par Renzatic, 19 décembre 2010 - 05:16 .
                     
                  


            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #76 on: December 19, 2010, 05:38:23 am »


               

Renzatic wrote...
VICTORY! BOUT DAMN TIME!


WOOHOO!!!

Renzatic wrote...
Well, almost no problem. My textures look like they've been downscaled and desaturated a bit, and the alphas have huge black borders surrounding them. That might just be the NWNE renderer though.


Concerning alphas...

In the MDL Trimesh Parameters rollout you'll see "Transparency Hint".  Change the value in the spinner to 1 for any mesh whose texture has an alpha.  If you scroll a little further down that rollout you'll find the "Material Data" group.  Check "Over-ride Mat Values" and then you'll be able to change the Ambient/Diffuse/Specular colors and Shininess value of the textures.  What you see in the color boxes are the default values.  You can also change the self-illumination color of any mesh by changing the value of that color box.  Black meaning NO self-illumination.  NWN accepts a Diffuse map only, and a lot of the settings that you can change via the Material Editor are not considered by NWMax upon export.  Most settings are made via the various modifiers.

[EDIT]I should add changing/setting any of the values of the modifiers have no visible effect in Max, you need to export and view in either NWNExplorer or in-game to see what your settings have done[/EDIT]

Whenever you're ready I'll give you the run-down on creating a valid walkmesh and then getting your tile(s) into game.

Great work so far ':wizard:'

'Posted
  MDA
               
               

               


                     Modifié par Michael DarkAngel, 19 décembre 2010 - 05:41 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #77 on: December 19, 2010, 06:15:32 am »


               

Michael DarkAngel wrote...

WOOHOO!!!


YEAHHHH!

Concerning alphas...

In the MDL Trimesh Parameters rollout you'll see "Transparency Hint".  Change the value in the spinner to 1 for any mesh whose texture has an alpha.  If you scroll a little further down that rollout you'll find the "Material Data" group.


That helped a bit, but there are still problems. I'm assuming some of what I'm seeing is the dreaded cookie cutter effect...

I'll mess around with it a little more, and see how it turns out.

'Posted 

Whenever you're ready I'll give you the run-down on creating a valid walkmesh and then getting your tile(s) into game.


I think I'll wait on that til tomorrow on that. I've been spending 4+ hours a night on this for the last week. I'm wanting to turn in early at least once here. '<img'>

Thanks for the help so far. You've all kept me from pulling my hair out and going bald from frustration on more than one occasion.

edit: one question that just occured to me: smoothing groups. Do they work in NWN?
               
               

               


                     Modifié par Renzatic, 19 décembre 2010 - 06:25 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
My First Tileset
« Reply #78 on: December 20, 2010, 01:05:33 pm »


               Yes, smoothing groups work in NWN. You can have up to 32 smoothing groups.

               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #79 on: December 20, 2010, 08:49:50 pm »


               Excellent. That'll help out tremendously.

I decided to take a day off, but tonight I'm going to get this all ingame, with walkmeshes and properly working alphas, and everything else that needs to be done. From what I've seen and read, the walkmesh doesn't seem to be too difficult to do (which probably means it'll be hard as hell and take me three days to do), but I'm still kinda confused about the alpha heirachy bit.

Oh, I also made some edge tile cliffs to test out. They're 10x10 on X and Y, but to get them looking like cliffs, I had to go 18 meters on Z. From what I've learned, that's alright as long as the walkmesh doesn't extend up that far, right? What I plan is for it to follow the contour of the ground about halfway into the tile then shoot straight up about a couple of meters when it reaches the base of the cliff. It doesn't need to be any higher than that, since there won't be anything behind it.
               
               

               


                     Modifié par Renzatic, 20 décembre 2010 - 08:51 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #80 on: December 20, 2010, 09:18:53 pm »


               Actually, the "Z" value is pretty well limitless, but there things to consider as well.  The game allows you to "raise" tiles, one level at a time. Each level is controlled by two entries in the beginning of the .set file.  

HasHeightTransition=1  
Transition=5  

You MUST create ALL the tiles necessary to make the connections though.  And this means the base tiles need to be created all at once, as the engine will not allow you to raise ANY tile unless all the possible connections for that tile exist in the .set file and the .mdl exists.

Anyway, you can easily set the top of your Cliffs higher than the default raised height, so you could easily go to 18 meters,  You CAN create them without walkable space above (at cliff top height) or you can create them with walkable space up there, of course you would have to create tiles that provide a path to the top as well.

Generally, in Bioware sets, the cliffs are NOT raised per se' and the walkmesh stops about the 5 meter height, while the actual visible faces of the cliffs extend as high as needed.  However, that walkmesh MUST extend to all 4 corners of the tile.  So, your cliff top faces on the walkmesh would be set to either type 2 (recommended) or type 7.  


Walkmeshes are fairly easy to create.  Sometimes, I just duplicate other objects, and attach them all together, weld verts where necessary and it's done.  
Remember these things though: 
1) A walkmesh must be a single object.
2) A walkmesh can NOT have overlapping faces.
3) A walkmesh can NOT have gaps (missing faces)
4) A walkmesh MUST extend to all 4 sides and all 4 corners.  IE, it must have an edge all the way around the tile.
5) A walkmesh can NOT have any faces that extend over another face.  IE, your cliff can NOT extend outwards over the walkable grass section at the base.  In other words, a walkmesh has a single "Z" that is useable in game.  This sounds a little confusing, but it means that you can NOT walk under a bridge and also walk over that same bridge.

There are likely a few other things you will run into, but doing and learning will be best for those.
               
               

               


                     Modifié par Bannor Bloodfist, 20 décembre 2010 - 09:26 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #81 on: December 20, 2010, 09:54:32 pm »


               Easy enough. And to get it attached to the model, all I do is add an Aurorabase, set it to walkmesh, and export it by itself with a certain name. Like say tctt_wa01_01. That'll correspond to tctt_a01_01. Then the entry in the .set file, it'll look something like this:

[TILE01]
Model               =   tctt_a01_01
Walkmesh            = tctt_wa01_01
TopLeft             =   Woods
TopLeftHeight       =   0
TopRight            =   Woods
TopRightHeight      =   0
BottomLeft          =   Woods
BottomLeftHeight    =   0
BottomRight         =   Woods
BottomRightHeight   =   0
Top                 =
Right               =
Bottom              =
Left                =
MainLight1          =   0
MainLight2          =   0
SourceLight1        =   0
SourceLight2        =   0
AnimLoop1           =   0
Animloop2           =   0
Animloop3           =   0
Doors               =   0
Sounds              =   0
PathNode            =   A
Orientation         =   0
ImageMap2D          =

So if I've got this right, as long as the walkmesh closely matches the intended walkable surfaces on the main tile, everything should work fine ingame.

Now for the cliffs, doing a walkmesh for it isn't too difficult. If I've read you right, the end result should look like a square block on half the tile, with nothing overlapping. I guess I gotta look at it like it's reading the mesh from a top down perspective, so anything that overlaps on Z will confuse the engine.

The only thing that confuses me is how to write it into the .set file. The wood tiles are easy, they just attach to other wood tiles, but the cliff always has to attach to other cliff tiles. So assuming the cliff is facing south, the set file should look like this...

[TILE05]
Model               =   tctt_c01_01
Walkmesh            = tctt_wc01_01
TopLeft             =   Cliff
TopLeftHeight       =   0
TopRight            =   Cliff
TopRightHeight      =   0
BottomLeft          =   Woods
BottomLeftHeight    =   0
BottomRight         =   Woods
BottomRightHeight   =   0
Top                 =
Right               =
Bottom              =
Left                =
MainLight1          =   0
MainLight2          =   0
SourceLight1        =   0
SourceLight2        =   0
AnimLoop1           =   0
Animloop2           =   0
Animloop3           =   0
Doors               =   0
Sounds              =   0
PathNode            =   A
Orientation         =   0
ImageMap2D          =

If I got this right, I think I'm beginning to understand how set files work. There are still alot of entries I draw a blank on (like crossers, terrain entries, and how to determine height), but I believe I'm getting there.

And if anyone wants to see it, this is the current state of the tileset. I baked AO in around the bottom of the depot to make it fit in a little better. The upside is it looks pretty neat, the downside is I had to add two unique .tga files into the scene. It isn't too bad, because downsizing the base ground tile textures to 512x didn't cause me to lose too much quality. So all four of those tiles now take up the memory of 1 of the original 1024x textures.
               
               

               


                     Modifié par Renzatic, 20 décembre 2010 - 09:56 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #82 on: December 20, 2010, 11:39:17 pm »


               Some quick additional notes:

1)  Create the wok/walkmesh as a seperate object inside the same file as the main tile.  Set it to walkmesh, then attach to aurora model base.

to get a cliff into the set, you will need more than one tile.  

one where you have plain grass level.
One where you have a half tile wide cliff on right side
One where you have a half tile wide cliff on left side
One where you have a full cliff.  


That is what I meant when I said you have to create everything at once, or the game won't allow you to paint them.

topleft = cliff and topright = woods
topleft = cliff, and topright = cliff
topleft = woods and topright = cliff


so, three complete tiles.  

You will also have to adjust the terrain count in the .set file up by one, and add the additional terrain definition for cliff.

It can get real complicated, really fast, the more terrains you add the more work you have to complete to make them work together.
xxx
               
               

               


                     Modifié par Bannor Bloodfist, 20 décembre 2010 - 11:39 .
                     
                  


            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #83 on: December 21, 2010, 01:35:32 am »


               

Renzatic wrote...
Easy enough. And to get it attached to the model, all I do is add an Aurorabase, set it to walkmesh, and export it by itself with a certain name. Like say tctt_wa01_01. That'll correspond to tctt_a01_01. Then the entry in the .set file, it'll look something like this:

[TILE01]
Model               =   tctt_a01_01
Walkmesh            = tctt_wa01_01
TopLeft             =   Woods
TopLeftHeight       =   0
TopRight            =   Woods
TopRightHeight      =   0
BottomLeft          =   Woods
BottomLeftHeight    =   0
BottomRight         =   Woods
BottomRightHeight   =   0
Top                 =
Right               =
Bottom              =
Left                =
MainLight1          =   0
MainLight2          =   0
SourceLight1        =   0
SourceLight2        =   0
AnimLoop1           =   0
Animloop2           =   0
Animloop3           =   0
Doors               =   0
Sounds              =   0
PathNode            =   A
Orientation         =   0
ImageMap2D          =

So if I've got this right, as long as the walkmesh closely matches the intended walkable surfaces on the main tile, everything should work fine ingame.


Um, no.

If we return to our simple tile from above I'll continue where we left off.  This time without pictures as I think you have a pretty good handle on what's going on.  However, if you or anyone wants them, I'll add them later.

Select the mesh we have created.  From the "Plus" rollout of NWMax Plus click on the "Clone Selected" button.
Right-click in the current viewport and select "Unhide All".  Press "H" on the keyboard to open the "Select Objects" dialog.  Select the object named Clone_______  (fill in the blank with the name of your original mesh).
With the "Modify" tab selected, open the "Modifier List" dropdown and select "Aurora Walkmesh".  Once applied you should notice the color of the mesh change to brown in any viewport that has "Smooth + Highlights" checked.  Your walkmesh is now set to "Dirt".  To change this, from the Modifier Stack, expand "Editable Mesh" and select the "Face" sub-object.  [Based on my simple tile from above I want to change all my faces to grass.]
Hit "Ctrl-A" on the keboard to select all faces.  Scroll through the rollouts under the Modifier Stack until you see "Surface Properties".  You'll see a group labeled "Material".  You'll want to use the up/down arrows of the "Set ID" spinner to scroll through the available options.  I think someone posted them earlier, but I'll post them here again.

 1 -- Dirt
 2 -- Obscuring
 3 -- Grass
 4 -- Stone
 5 -- Wood
 6 -- Water (walkable)
 7 -- Nonwalk
 8 -- Transparent
 9 -- Carpet
10 -- Metal
11 -- Puddles
12 -- Swamp
13 -- Mud
14 -- Leaves
15 -- Lava
16 -- Bottomless Pit
17 -- Deep Water (non-walkable)
18 -- Door
19 -- Snow
20 -- Sand

Select the value suitable for your use [mine is 3] click in an empty space of the viewport to de-select your faces [I always like to de-select prior to leaving sub-object mode].  Click on "Face" in the Modifier Stack to leave sub-object mode.
Link your newly created walkmesh to the modelbase.

Because we have cloned the original mesh we need to re-apply the "Aurora Trimesh" modifier.
Select your original mesh and add the "Aurora Trimesh" modifier and reset any necessary parameters.
Now export your tile as above.  You should notice an increase in size of both the .mdl and .wok files.

When adding your tile to the .set file the "Walkmesh=msb01" line of each tile never changes.

Next up; Getting it in game

'Posted
  MDA
               
               

               


                     Modifié par Michael DarkAngel, 21 décembre 2010 - 01:36 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #84 on: December 24, 2010, 12:49:10 am »


               Sorry about taking so long to get back to you on this. I've been kinda swamped these last couple of days.

Thanks to your instructions, everything went through quite easily. I'm a bit confused about some of the specifics of the naming schemes, but I'll get to that later. For now, I'll walk you through what I did step by step, so you can see if I did anything wrong.

This is the entire mesh for the scene...

'Posted

The ground is snow, the ramp up is sand (because I didn't have a gravel option, I figured it'd be the next best thing), the rails are metal, the tracks and porches are wood, and the main building itself is obscuring. The mesh is divided into 4 different objects, each pertaining to a specific tile. The only goofy bit is the roof, but I don't think that'll matter unless someone shoots an arrow up there. 

The first tile I exported was the bottom left tile with the entire depot attached. The walkmesh only covers one quarter of the building, but if I'm following you correctly, that shouldn't be a problem when I attach the scene to the other 3 tiles.

To get more indepth, my first step was to import my walkmesh on top of the first tile and make sure everything lined up. It did. So I hid everything else, added the walkmesh modifier, and defined each surface with the appropriate material. From there, I unhid my tile, linked the walkmesh to the tile in much the same way I'd tether a tile to an aurorabase. Then I went back in, made the aurorabase with the usual settings, linked those, and added a trimesh modifier to just main tile geometry. I assumed I've done everything correctly here, because the mdl file was larger, and it's the first time I've had an export pass a sanity check without giving me any errors. It even showed up in NWNE no problems.

Now the only bit I'm vague on is naming. Do I have to name the walkmesh clone_insert_base_mesh_name_here, or can it be anything as long as it's linked? And lastly, is every walkmesh named msb01 in the .set file regarless of the model?

I think I'm close to getting this. Once I figure out how to get it ingame, and adjust my alphas, I think I have the basics down, and can start my tileset in earnest. '<img'>

Edit: One last question regarding the aurorabase helper. I can put it anywhere on the mesh, as long as it's sitting at 0 on Z, right? I put it down near the bottom left half of the tile for easier access instead of as near to the center as I could.
               
               

               


                     Modifié par Renzatic, 24 décembre 2010 - 12:54 .
                     
                  


            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
My First Tileset
« Reply #85 on: December 24, 2010, 01:23:43 am »


               

Renzatic wrote...

Do I have to name the walkmesh clone_insert_base_mesh_name_here, or can it be anything as long as it's linked?

It can be anything - heh, most of mine end up being called Object09 or Plane04 (or "walkmesh" if I'm feeling particularly generous).

And lastly, is every walkmesh named msb01 in the .set file regarless of the model?

Yes. There are quite a few quirks in NWN like that where features written into file formats were ultimately taken out or replaced with a simpler solution.

One last question regarding the aurorabase helper. I can put it anywhere on the mesh, as long as it's sitting at 0 on Z, right?

Each aurorabase must be positioned at 0,0,0 in relation to each individual tile. So if you have a 2x2 group of tiles where the whole group is centered at 0,0,0, your four aurorabases should be at -500,-500,0 / -500,500,0 / 500,-500,0 / 500,500,0. So there's one at the centre of each 10 metre chunk.

This is because every NWN tile (even tiles that are part of groups) are individual entities that are exported using the central point of the model as a base - this way it's easy for the toolset to arrange, rotate, position them etc. The order the tiles are specified as part of a .set group defines their position when painted as that group. For instance, if you had a 3x1 group, you'd have three 10x10 metre tiles, with the centre of each placed 10 metres to the right of the last by the toolset.
               
               

               


                     Modifié par _six, 24 décembre 2010 - 01:27 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #86 on: December 24, 2010, 02:14:16 am »


               

_six wrote...

Each aurorabase must be positioned at 0,0,0 in relation to each individual tile. So if you have a 2x2 group of tiles where the whole group is centered at 0,0,0, your four aurorabases should be at -500,-500,0 / -500,500,0 / 500,-500,0 / 500,500,0. So there's one at the centre of each 10 metre chunk.


Grand. Now I gotta figure out how to peg it right at the dead center of my tiles in Max. There's an easy way to do this, right?

edit: figured it out. I set up the snap toggle and moved it right to the center of the tile. I'm about 99% sure it's dead center, though I don't know how to check coordinates in Max just yet.

Got yet another question though. My tile is set just a tiny,tiny hair above Z. It's one of those situations where it's at 0.06 blah above, and it won't snap it to the appropriate position on the grid even with snapping enabled. Will that make any difference with the aurorabase being set at 0?
               
               

               


                     Modifié par Renzatic, 24 décembre 2010 - 02:27 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #87 on: December 24, 2010, 04:07:20 am »


               Use F12

That will open an window where you can set the position of things.  Then just select any item you with to screw around with.

You do the same with the aurora base, etc, any item on the scene that you can select.

Edit:  Oh, be sure to set your system units AND your display unit scales to metric, that will help a bit with getting more normal numbers.  You can also adjust your snap settings.
               
               

               


                     Modifié par Bannor Bloodfist, 24 décembre 2010 - 04:11 .
                     
                  


            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #88 on: December 24, 2010, 05:03:48 am »


               

Renzatic wrote...
This is the entire mesh for the scene...


Looks good

Renzatic wrote...
From there, I unhid my tile, linked the walkmesh to the tile in much the same way I'd tether a tile to an aurorabase.


This part bothers me.  Not sure if you stated it wrong or not, but your walkmesh should be linked to the aurorabase not the tile.

Aside from that, sounds like you did everything correctly.

'Posted
  MDA
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #89 on: December 24, 2010, 05:43:29 am »


               

Bannor Bloodfist wrote...

Use F12

That will open an window where you can set the position of things.  Then just select any item you with to screw around with.

You do the same with the aurora base, etc, any item on the scene that you can select.

Edit:  Oh, be sure to set your system units AND your display unit scales to metric, that will help a bit with getting more normal numbers.  You can also adjust your snap settings.


Whew. Thanks. I tried and tried looking for all the numerical entry stuff in Max, but couldn't find a single damn thing. And even worse, because Max is so prevelant around the internet, unless you search for exactly what you want down to the smallest excruciating detail, you'll end up with a billion and one different googles that are similar, but ultimately don't help you out at all.

The only way I could fix it was exporting it back to Modo, and that killed off all my modifiers, Had to redo everything. Oh well, it's good for practice at least. '<img'>

Michael DarkAngel wrote...

This part bothers me.  Not sure if you stated it wrong or not, but your walkmesh should be linked to the aurorabase not the tile.


Nope, you read me correctly. But if you're bringing it up, then it means I must've misread you at some point. It's an easily fixed problem though. So it's no big deal.

 Now from here on out, most of the work required getting my tiles ingame revolves around editing text files, right?