Author Topic: Placeables with tileset walkmeshes (WOK)  (Read 1389 times)

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« on: December 10, 2013, 10:59:00 pm »


               Hello all,
I found an intresting thing, which riddles me a bit:

I'm playing with Borden's PLACEABLE treehouses to be found here:
http://nwvault.ign.c....detail&id=8152

Upon taking a closer look, I saw, that those placeables are exported as tile, thus creating a WOK file:
'Posted
(Placeabe with visible WOK in the NWNexplorer)

Since Borden has based them on his according tile models, the walkmesh does have 2 levels to walk: the ground and the raised house floor  (or maybe it's just one raised area and the ground is managed by the tile).

And most intresting (for me): It works IG:
'Posted
(Edited model: WOK added as a visible mesh, removed roof + missing textures)

Well, even though the trunk is unwalkable, the toon can walk through it, so probably only the raised walkmesh is handled this way.

Another issue is, that the toon can walk onto that raised part from the sides.

I thought, that placeable walkmesh (cuts) only work, if they are on the same level as the tile walkmesh.

If this WOK-combiantion allows raised walkmeshes, would open that up a whole new dimesion for placables, eg. ramps (haven't tested)? Or am I missing something?
               
               

               


                     Modifié par TheOneBlackRider, 10 décembre 2013 - 11:04 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #1 on: December 11, 2013, 03:47:01 pm »


               Don't get your hopes up. This may work in a way, but it causes dozens of other problems, like the toon being able to walk through the trunk, walk up the sides of houses, path finding problems and more.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #2 on: December 11, 2013, 09:21:15 pm »


               I've been playing with this for a while now. I have a thread on "tile" magic with tile classification placeables. And OTR before me had also investigated the ins and outs of this. It works.

However some things you need to understand:
  • the aabb mesh of the "tile" placeable (this is what becomes the wok mesh of a tile) does not change the material (AFK) of the WOK. It merely replaces the Z position of the walkable surface.
  • the "tile" placeable must be placed in the x and y position to center on a tile. if there is any offset, things get messed up. (put these in to position by script, and to center in the tile) AND the "tile" placeable needs to be 10x10 in the x and y dimension so that it matches exactly the sie of a tile.
  • AFK you will not be able to change the material or walkability of the area with a new mesh. So.. if you need to add walls, then you need to put some placeables with a blocking mesh in place.
This is all something that I've wanted to take advantage of in a city dock tileset. All the water would be walkable. And then you'd have a bunch of 10x10 tile magic tiles with ships on them to spawn in when you needed them in the port. These ships would have a higher walkmesh for the ship's deck (and footstep types would be changed by script). To make a separation between the ship's deck and the water you'd need an invisible ship with a blocking mesh around the edge of the hull and surrounded the ecks of the tilemagic ships.

Its a bit sophisticated as you have all those interoperating parts, and would need scripting to spawn/despawn the different parts. Because of all that I have not had the time to implement it. I keep meaning to get to this, but never have the time. Unfortunately I have asked artists to help me on it, but wasted their time since I have not had the time to get to work with them.

Just as soon as we get Vives released I'll look at tackling this. I hope. '<img'> Thats the plan anyway.
               
               

               


                     Modifié par henesua, 11 décembre 2013 - 09:22 .
                     
                  


            

Legacy_PLUSH HYENA of DOOM

  • Hero Member
  • *****
  • Posts: 995
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #3 on: December 12, 2013, 07:19:17 am »


               Interesting.
               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #4 on: December 12, 2013, 10:19:11 pm »


               Sorry for not replying earlier. RL...

Oh yes, Zwerkules. This "hybrid" probably was not ment to be! It may cause some trouble!

I made some more investigations and when finishing those, I found, that henesua had replied. '-_-'

And since I made some screens, I'll just add them to my reply.

I confirm the points of henesua:

The placeable WOK needs to be tile sized and in line with the tile grid:
'Posted
(Toolset screen - This is a placeable! I just added a ground-mesh to line out the placement.)

'Posted
(IG screen with rendered aabb)

Using a script for this! Good idea! Never thought of that. I lined them up via "Adjust Location". Maybe you could post the code? '<img'>


If it's not placed on the grid, the engine will choose a tile grid close by (light blue square) and the walkmesh will be messed up:
'Posted
So, checking the walkmesh IG via the console/rendered aabb is a good way to identify issues.



What I found (in addition), that you can also add a PWK to the placeable (but still leave the model set to tile). And intresting enough: The PWK also prevents walking on raised WOK areas!
'Posted
Here you can see in Gmax, that the (z=0) PWK is on the rim of the stage and also extends beyond the rim inwards. The toon won't be able to walk up the sides (as Zwerk mentioned) and won't drop off the top, even though the PWK is z=0!
':wizard:'
(Also notice the possibility of a working ramp on a placeable)

So, Zwerk's pathfinding and uneven terrain may still be an issue!

So, this technique may be intresting, if you want a placeable with a walkmesh leading up, eg. stairs, and it is ok, if this placeable (WOK) is lined up with the tile grid.

And henesua: I really am ancious to see your tile magic one day.
               
               

               


                     Modifié par TheOneBlackRider, 12 décembre 2013 - 10:33 .
                     
                  


            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #5 on: December 13, 2013, 01:10:44 am »


               Does this work if the placeable is spawned at runtime?
               
               

               
            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #6 on: December 13, 2013, 02:30:02 am »


               Very interesting!

Is there any hope for an invisible walkable placeable ramp ? Was thinking of using it to fake SpellJammer spaceships taking off or landing, just moving the polymorphed models. This could also be used to make invisible bridges.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #7 on: December 13, 2013, 03:45:16 am »


               

Frith5 wrote...

Does this work if the placeable is spawned at runtime?


Yes. I do this with tile magic. For this kind of tilemagic, I use placeables rather than VFX.
               
               

               


                     Modifié par henesua, 13 décembre 2013 - 03:46 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #8 on: December 13, 2013, 04:01:14 am »


               

TheOneBlackRider wrote...
Using a script for this! Good idea! Never thought of that. I lined them up via "Adjust Location". Maybe you could post the code? '<img'>


Its not complicated. You just create a placeable object.

TheOneBlackRider wrote...

So, checking the walkmesh IG via the console/rendered aabb is a good way to identify issues.


You can do this in the toolset if you use virusmans renderaabb plugin for nwntx.


TheOneBlackRider wrote...
What I found (in addition), that you can also add a PWK to the placeable (but still leave the model set to tile). And intresting enough: The PWK also prevents walking on raised WOK areas!
'Posted
Here you can see in Gmax, that the (z=0) PWK is on the rim of the stage and also extends beyond the rim inwards. The toon won't be able to walk up the sides (as Zwerk mentioned) and won't drop off the top, even though the PWK is z=0!


Very interesting. I had assumed that if a model's classification was tile that you could not make a PWK. Good work!


TheOneBlackRider wrote...
And henesua: I really am ancious to see your tile magic one day.


There is nothing special with what I have done so far. My BSN thread on the subject is still around. You might be able to glean some more ideas from it. OTR chmes in with some valuable insights as well. Page three of that thread has a few of the things I have done with it.  And none of that is WOK manipulation. Creating a pit trap however.... that would be a brilliant idea!
               
               

               


                     Modifié par henesua, 13 décembre 2013 - 04:01 .
                     
                  


            

Legacy_PLUSH HYENA of DOOM

  • Hero Member
  • *****
  • Posts: 995
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #9 on: December 13, 2013, 05:02:07 am »


               So, theoretically then, in theory, you could create a Placeable bridge and have it spawn via script to appear at a set point over unwalkable Tile terrain (chasm, water, etc), and then walk across it.

Exceedingly interesting.
               
               

               
            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #10 on: December 13, 2013, 05:20:08 am »


               Yes, PHOD, one of my ponderings too. Also, how about invisible 'flight paths' that spawn when someone begins flying (or swimming when underwater), simulating them moving upward at an angle?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #11 on: December 13, 2013, 01:49:21 pm »


               

PLUSH HYENA of DOOM wrote...

So, theoretically then, in theory, you could create a Placeable bridge and have it spawn via script to appear at a set point over unwalkable Tile terrain (chasm, water, etc), and then walk across it.

Exceedingly interesting.


No. This doesn't work as far as i know. You can't change the material from unwalkable to walkable. You are only changing the height of the existing WOK with the new tile placeable.
               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #12 on: December 13, 2013, 02:18:52 pm »


               

henesua wrote...
You are only changing the height of the existing WOK with the new tile placeable.


First, henesua, thanks for the tile magic link. Will roam through it. And I was going to ask, if there is a way to display the aabb within the toolset, but withdrew that question. And now you pointed me to a way using tx. Thanks!

I kept on testing:
'Posted
2 ramps next to each other, one raised. And it confirms, what henesua wrote: The placeable WOK will override the tile WOK. If you lower this ramp into the ground, the toon will drop into the ground upon stepping "onto" the placeable (of course, the tile floor will still be visible).

I have not tested the material-change henesua mentioned.
Edit: I just placed the ramp so it crosses from (half way) cobble onto (uwalkable) water and the toon stops, where the water starts... So henesua seems to be right: The original tile WOK beneath the placable must be walkable.

Oh, henesua... you could speed up things (for me), if you could post an examplke script, which you use to adjust a spawned placeable to the tile grid, when spawned...
'<img'>
               
               

               


                     Modifié par TheOneBlackRider, 13 décembre 2013 - 02:28 .
                     
                  


            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #13 on: December 13, 2013, 03:17:03 pm »


               But this would still work for swimming/flying over walkable terrain. Imagine having an underwater area, and to swim up and exit it you'd have a chat command <swim up> that would spawn the invisible path up to the 'surface'. At the surface you'd have a trigger to jump the pc to the 'top' of the water (another area). Likewise an area where the 'flyer' wants to swoop up from the streets to the top of a tower battlement (both walkable areas). Could this work?
               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #14 on: December 13, 2013, 04:18:41 pm »


               Well, regarding the swoop up to battlements, I'd say, that depends on the tilesets you are using. I made a test with the ramp using the rual set with raised terrain. Both tries - from bottom to top or over the top don't work, because the edge of the raised terrain does have a (slim) unwalkable part, which stops the toon. The same is for the city raised terrain. With these sets, you don't get up.
You probably would have to add a special tile variation - completely walkable, block it (with a placeable), when there is no ramp and remove the blocks, when the ramp is spawned.
With having such a special tile, I'd say, something like the earlier mentioned "appearing bridge over a gap" would work, too.
               
               

               


                     Modifié par TheOneBlackRider, 13 décembre 2013 - 04:21 .