Custom Metatile/Displaced Floor

Hey guys,

Do any of you know what could be causing this? I created this custom tileset 10 years ago and decided to add an 11x15 metatile to it, but the floor is displaced to the lower left side of the screen (outside of the metatile) and the walkmesh doesn’t bake correctly in the quarter of the floor that you can see. I have reset xforms on everything, set all pivots to 0,0,0 and made sure every tile has the proper flags. I edited metatiles.2da to show it as an 11 x 15 and then tried making it a 15 x 11, but that didn’t do anything but change the orientation of the black part you see there. The rest of the model remains unified.

I’m at a loss. Any help is much appreciated!

it’s a long time since i created custom meta tiles, but it sounds like you did everything right. what about uploading your model somewhere so that others can have a look at it?

Does your floor mesh end in _F or _RF?

Semper - I’d be happy to upload it for you look at. Do you have any suggestions on where? Let me see if I can figure out this dropbox thing.

rjshae - It ends in _RF. That’s for a rotating floor that moves with the mesh, right?

Yeah I can use Dropbox I think. Here’s the link. It says anyone can view it but if not, let me know.

Thanks!

.max is autodesk’s propietary file format. i don’t have access to 3ds max. please export the file as .fbx or upload the converted .mdb. personally i prefer the latter one, because there you already set all the specific properties for nwn2 and errors are more obvious.

I gotcha. Here’s the .mdb. Thanks Semper!

thanks for providing the files. i did not test this, but i noticed that there’s no object named identical to the file name. afaik at least one object, usually the walls, should be named like that. it’s also worth a try to name the floor identical to the file name with the suffix _RF, without the id.

dunno if the following is needed by the engine, but usually the origins of all the objects of a metatile are centered at the middle of a corner tile, which is at the world center. the origins of your metatile are at the geometrical center of the floor, wich also causes a misalignment on the y-axis by half a tile (4.5m).

Yes that should work.

1 Like

Okay that makes sense, Semper. I’ll play around and if any of that fixes it I’ll post it here. Thanks for your help!

Well I tried all of that and nothing made a difference. I even split the model into four different models and saw something interesting when I tried to place two of them next to each other. The black part was still there on both of the pieces, but one of them was off by 4.5 meters on the X axis. The black part on the other piece was centered right, but still below the model and only half on it. It wasn’t displaced at an offset angle like the bigger model either. The black part was directly below the models this time. Anyway, I went back to max and adjusted the pivots on the part that had the black part off to the right by 4.5 meters and adjusted its pivots and this centered the black part on the X axis, but it was still off on the Y.

So then I thought it was something to do with the pivots but I had already tried moving the pivots as you suggested earlier Semper. Still, I tried to move the pivots up to the top of the Y axis to see if that wouldn’t pull the black part up and it did nothing. So it seems the pivots can affect it on the X axis, but not on the Y. I found some geometry that wasn’t lined up right and fixed that, but still no luck.

Any other suggestions?

did you try to re-export a vanilla metatile and put it into override, just to make sure that there’s nothing wrong with your pipeline? which exporter do you use?

i give it a try this weekend. maybe i can come up with something to fix the issue.

small update: you have to build your tile in the positive y/x plane. that’s why your floor was displaced, or rather not - it just looked like that. the walkmesh doesn’t bake correctly still.

Hey Semper,

Wow, so you got it to show up correctly. That’s great! I’m not sure what you mean by building it in the positive y/x plane though? Does that mean move it so that I have no vertices with negative coordinates?

Yes I was fairly sure the walkmesh needed to be completely redone because the small section that was displaying right wouldn’t bake any more for me than you were able to get it to do. I’ll redo that as soon as I have the rest of it working right. I still have issues with alphas not displaying correctly on my textures too, so lots of work to do still.

Thanks for your help!

I suppose I should just try what you suggest before I ask for clarity. I moved the entire model into the positive (except for the z axis) and that fixed it. Now to work on that walkmesh. Thanks for your help, Semper. I learned something I wouldn’t have learned otherwise. I really appreciate it!

I believe he means the center of each 9x9 tile segment should have an (x, y) coordinate of zero or greater. The first would be in the x/y range -4.5 to 4.5, &c.

yes, what rjshae said. i was talking about the centers of the tiles. the first tile has to be at the coordinate system’s center. every other tile needs to be placed along the positive x or y axis, with its origin at the center of the first tile. that is how the engine works with the dimensions giving in the metatile.2da. the displaced black floor was the space the engine reserved for your metatile, where the walkmesh will be baked in. the picture shows the ground floor of a 3x2 metatile with planes of 9x9m.

regarding the walkmesh: i believe that those elongated triangles cause issues. didn’t notice any obvious problems why it’s not baking correctly. personally i would scrap everything except the parts around the temple(?), which bake, and build from there. in the past i needed multiple attempts to get walkmeshes export and bake without problems also. dunno why they are so finicky.

what’s the problem with alpha maps you mentioned? they have to be 8bit masks in the alpha channel of the diffuse texture.

Thanks for the explanation guys. You learn something new every day.

I’ve scrapped the walkmesh and started over. The large triangles were a big part of the problem, so I am now using much smaller quads and most of it is baking. I’m close to having it working. Just a few areas that need some touchups.

It’s been so long since I used alphas with textures that I’ve forgotten what I need to do. I’m using DXTBump to convert everything to .dds format. It looks like I forgot to mess with the alpha layer on these textures before I exported them. But I will get it figured out. Photoshop used to be the tool I used for creating DDS files, but it seems the newer versions create a different type of DDS that doesn’t work with NWN2 for some reason, so DXTBump it is. Good program though.

Thanks for the tips!

When making a metatile walkmesh you have to cut it up along the edges of every individual tile it represents (every 9m along x and y starting at -4.5). Any tris crossing those lines (highlighted in my image) will not bake.

1 Like

oh yes, i remember that part now. took a while before i noticed this comparing imported tiles. that’s why i used simple 9x9m planes as the base for the walkmesh.

Ha, well I wish you had shown up earlier, cuiilv! I’ve spent most of today trying to figure out what’s going on with my walkmesh. Now I know though and I can fix it tomorrow. Thanks for your help too!