Interesting discovery about PWK's
#1
Posté 21 novembre 2011 - 11:44
I was working on a set of large boulder pile placeables, and was frustrated that, if they were positioned with the PWK below the walkmesh of a tile, a character could path right through them. I had wanted to be able to adjust their z-axes for a bit of variety, and also to place them on uneven terrain and still have them block character movement.
So, I went into MAX and cloned all the geometry of the boulder piles, then linked all the cloned parts together into one mesh. I renamed this mesh to PWK and added the Aurora placeable modifier, then parented it to the pwk dummy just like I would do with any other PWK mesh.
The result was that the placeable could be placed at any z position, and only the part of the PWK that sat higher than the tile's walkmesh blocked character movement.
This also works with placeables that have PWKs with more conventional geometry. For example, I took a basic Bioware crate and raised the PWK mesh to the top of the model. The crate could then be buried to any depth in the ground, and still block character movement. It's a minor thing, but it does allow quite a bit more flexibility in positioning placeables.
Like I said, this may not be anything new to those familiar with making custom placeables, but maybe it may be of interest to some nonetheless.
#2
Posté 22 novembre 2011 - 01:49
#3
Posté 22 novembre 2011 - 01:58
This has been stated many times in the past. A wall placeable can have a flat pwk that just blocks movement, but if you move that wall below the z of the tile it is placed on top of, the pwk no longer affects player movement as it gets ignored. However, if you actually make a WALL shapped pwk, the wall can be adjusted upwards/downwards of the base tile ground plane and it will still block movement/shooting through it. This gives you the ability to have a single wall placeable that can be used as a tall wall or a short wall (in height) and not have to waste space with multiple placeable creations.
It all depends on how the original pwk was created for the placeable. If it is created to actually match the geometry of the object, great, it will work as expected. If, however, it is created as a simple flat plane (the lazy man's way of creating placeable pwks, and seems to be the 'norm' for a large amount of content available on the vault) then that pwk can be placed in such a way as to actually NOT work if the flat plane is dropped below the z level of the underlying tile.
#4
Posté 22 novembre 2011 - 02:48
p.s. im just asking questions....like eric glenn beck cartman said:D
#5
Posté 22 novembre 2011 - 02:50
#6
Posté 22 novembre 2011 - 08:24
#7
Posté 22 novembre 2011 - 08:56
Bannor Bloodfist wrote...
All he is stating is that if you create a REAL pwk, one that actually reflects the shape of the object in question (instead of a plain flat plane that lots of folks create because it is so easy to create), then, your PWK object affects geometry of the object instead of the flat section of a simple flat plane pwk.
This has been stated many times in the past. A wall placeable can have a flat pwk that just blocks movement, but if you move that wall below the z of the tile it is placed on top of, the pwk no longer affects player movement as it gets ignored. However, if you actually make a WALL shapped pwk, the wall can be adjusted upwards/downwards of the base tile ground plane and it will still block movement/shooting through it. This gives you the ability to have a single wall placeable that can be used as a tall wall or a short wall (in height) and not have to waste space with multiple placeable creations.
It all depends on how the original pwk was created for the placeable. If it is created to actually match the geometry of the object, great, it will work as expected. If, however, it is created as a simple flat plane (the lazy man's way of creating placeable pwks, and seems to be the 'norm' for a large amount of content available on the vault) then that pwk can be placed in such a way as to actually NOT work if the flat plane is dropped below the z level of the underlying tile.
I would contest that its less the "lazy man's way" versus the way that Bioware did most if not all of their placeables for the original NWN and its expansions. Since many authors template Bioware work to begin their own, its easy to see how this has been carried on. Also, is the sub-engine that handles walkmesh calculations and pathing able to cope with complex geometries (ie. a clone of the placeable itself)? It's possible that the rendering and walkmesh sub-engines (for lack of a better word - maybe sub-systems) have been tuned way differently. Can't say without digging into the code......
#8
Posté 22 novembre 2011 - 09:27
The engine would block all movement for the radius of the cone if that cone was set to non-walkable/obscuring etc. so, what I see happening there is more like a cylinder. To be completely honest on that though, I have not tested such a cone. I do know that it would block all walking across the entire radius/circumference of the cone for the pc, but it MAY allow you to shoot arrows/magic across/over sections of the cone. For that you would have to test to be sure. You could end up with a cylindrical blockage or the cone shape you created. Either way, the pc/npc can not cross that area, but an arrow or magic blast might depending on the vectors. I don't think anyone has ever attempted to test with a cone shape to see if arrows/magic can get around it.
I know that it will treat a solid wall type object as solid if the wall extends upwards in the positive z direction, where if you just had a flat section (under the wall object) it would only block pc/npc movement and prevent them from walking across that section while it would still allow arrows/magic to flow across the space.
#9
Posté 22 novembre 2011 - 08:09
In regards to the separate issue of full geometry cloning as PWK, I've seen this done mostly for TheGeorge's NWN2 placeable conversions. It 'works', but I had heard anecdotes about the complexity of the PWK's causing crashes and I believe CEP had simplified the PWK meshes for some of the NWN2 placeables in order to correct the problems caused by that method.
There are also a few big drawbacks to using this method on a large scale, aside from anecdotal reports of crashes or instability:
Doubles file size: Since the geometry of the model is represented in the PWK, the PWK takes up as much space as the model. This basically doubles the file size of what's required to utilize the placeable.
Doubles loading time & PWK can't be optimized: A large model can be compiled externally and any delay caused by the loading and processing of the model can be largely negated. This cannot be done for a PWK, to my knolwedge. It must remain in ASCII and be processed on the fly by the game as the model is loaded, which is much slower than the processing time for a compiled model.
More complex PWK geometry means more complex pathfinding, more CPU used: NWN uses dynamic pathfinding, which is why you can walk anywhere there is a walkable surface- as long as there is a walkable path to get there. Same with NPC's, monsters. There are no hidden 'tracks', at least for pathing inside a tile. This freedom is expensive CPU-wise as the game must dynamically plot paths around objects as destinations are selected.
All pathfinding takes place as a series of straight lines. By reducing a PC to a disc with an arrow on it, one can see just how much more pathfinding is required to navigate around complex PWKs versus simpler ones. Once a destination is selected around each of these objects, all rotations reflect a change to a new straight-line path. The shorter the time between rotations during navigation, the more individual straight line paths compose the "full path"- which is all of the little straight-line segments which represent the path from start to destination- and the more CPU time needed to calculate them. The objects are a 4, 5 & 20-sided PWK. All placeables are placed at the center of individual tiles, set as static and the full-object PWK method is used, though it makes little difference if I would have flat planes with 4, 5 & 20 sides:

For simple shapes like a four or five-sided PWK, you can see the pathing is very "easy", requiring few rotations of my PC and indicating the path is mostly composed of long stretches. Because of how the dynamic pathfinding works in NWN, though, there is a "hugging" effect and that causes more comples PWK shapes to cause much more pathfinding and CPU use. You can see this on the 20-sided cone in the form of many rotations. I left the smoothing off the cone so you could see how the pathing is affected by the faces.
BTW, when that cone is sunk into the ground the same number of faces are still in play when something tries to path around it- so it's just as wasteful nomatter how much of it is sticking up throgh the ground. I'm sure at some point this ceases to be as much of a problem as it sounds, though.
The first two points about file size and inability to optimize (through compilation) are probably already dealbreakers for me but it's the pathfinding aspect that concerns me the most . And in all of these tests, relatively simple geometry was used.
Using Z-arbitrary cross sections of cloned placeable geometry as a PWK is just asking for trouble when used with any kind of regularity, IMO. In an environment with multiple objects trying to path (like players, creatures, NPC's) the worst drawbacks of this method stack up plenty quick.
With all that in mind and regardless of whether a 3D or 2D PWK is used, a less complex proxy of the visible geometry would always seem to be a better way to go. We feed all sorts of data into NWN and some of it we can be sloppy or excessive with- like pure geometry. But some care must be taken when feeding PWK data into the engine because it is actively utilized and referenced by the engine during play- even when the placeables are set to static.
Modifié par OldTimeRadio, 01 mars 2013 - 03:41 .
#10
Posté 22 novembre 2011 - 08:56
Best bet is to not clone the geometry of the object, but to create a shape, as simple as possible, that reflects the general shape of the object. 2 faces per side type. Cone/angled etc, with as few faces as possible. In fact, a pyramid reflects the general affect of a cone, while only requiring 4 faces. It is perfect? No, but it approximates the shape of the cone it replaces.
Really complex shapes are basically useless as the object affects walkable location finding from the base or widest parts of the object. A simple box for a very complex object is better than a flat plane though for targeting purposes.
What is all boils down to, is how realistic you want your objects to affect targeting, and path-finding. The engine can, and does, calculate for each face, but are all of those faces really necessary?
This is where low-poly generation is important, and 99% of the time, it is assumed by any serious cc creator for nwn. The lower the poly count, the easier the engine handles it. However, this doesn't mean that low poly is always the answer either. Some things, creatures for example, (pcs/npcs/creatures) should be higher poly. Even then though, high poly does NOT mean it is actually better looking. It is a blend of poly count and proper texture application that determines how good any object/creature is in game.
My complaints about how the Placeables are generally created is that no thought has been given to what the object actually is, most of the placeables available are using the simplest, 2 faced, flat plane, to block walking. No thought given to targeting etc. No thought has been given to the objects actual geometry etc.
With tile creation, I typically clone the meshes of the buildings/geometry etc, into a single wok object, THEN edit that wok to weld all the verts, and finally remove useless faces wherever possible. Wherever possible, I generate that wok to match as closely as possible, the actual shape of the building/terrain that is being represented, but with vastly reduced face counts.
This should be done when it makes sense for any placeable object. Of course, creating a complicated shape for a candle placeable is a waste, since that placeable is typically already placed on top of a non-walkable table top surface. But when creating a wall placeable, that walls geometry should be matched within reason, to reflect the height and thickness of the wall to block targeting.
All of it matters, some much more than others. Simple placeables that hang off a wall, say a torch, don't need a real pwk, nor would a picture that is designed to be "hung" on a wall which should already have a non-target-able surface.
However, say you have a statue placeable, it SHOULD block targeting as well as walking. It does not need to have all the shapes of the statue though, a simply pyramid will likely cover it or a full sized box in worst case. It should NOT have a flat plane non-walkable surface though, as that allows targeting right across it as if it didn't exist.
So, general thought about purpose AND size AND shape of the placeable object determines what sort of PWK it should have. The past history of just using flat planes for everything is what my complaints are about.
#11
Posté 22 novembre 2011 - 09:09
Efficiency aside, I actually find the Bioware style more flexible to build with - I can put the places anywhere, and drop some invisible objects for pathblocking if desired. Obviously, that can pose a threat to efficiency as well, but only to the extent you need it to create a given effect.
Here, for example, is a bridge of bone I made to connect the two spires of Abysm (Demogorgon's lair - and yes, the bridge is a departure from PnP):

It uses this technique, and winds up using a lot of placeables - but not so many that it affects performance:

Had the authors of those places (acaos and myself, taken from a stock bioware placeable, reskinned, enlarged, and rotated) done full pwks, this bridge couldn't be, since the bones are not completely flat (nor should they be). The pwks would extend above the tile in multiple spots, creating bizarre blocks in the path, instead of half the character's foot passing through the top of the place. You could lower them to the point where none of the place would be above the tile, but then the characters would be levitating on most parts of the bridge - it looked terrible.
So, not only is the Bioware style more efficient than the 'REAL' style, it's also more useful. AND costs less dev time to do. Hands down winner.
Indeed the CEP did. Acaos redid them completely to the simple ground models using a program, and I error checked them by hand (as a favor, I'm not with the CEP, I just wanted him to use that time doing things for HGIn regards to the separate issue of full geometry cloning as PWK, I've seen this done mostly for TheGeorge's NWN2 placeable conversions. It 'works', but I had heard anecdotes about the complexity of the PWK's causing crashes and I believe CEP had simplified the PWK meshes for some of the NWN2 placeables in order to correct the problems caused by that method.
Funky
Modifié par FunkySwerve, 22 novembre 2011 - 09:12 .
#12
Posté 22 novembre 2011 - 10:20
#13
Posté 22 novembre 2011 - 10:23
#14
Posté 23 novembre 2011 - 01:12
When it comes to that bridge, well, I'd say its more of an exploit for convenience' sake than a genuinely useful feature. Something like that really should be part of the tile. But if it helps you keep haks down to CEP only or whatever other limitation you place on yourself then its fair enough I guess. I've found modern systems struggle more with the way NWN handles emitters than they do with technical bad practise involving walkmeshes anyway.
Modifié par _six, 23 novembre 2011 - 01:16 .
#15
Posté 23 novembre 2011 - 04:12
_six wrote...
Matter of opinion. I can think of many cases where a half sunken placeable that is nevertheless walkable would be useful, particularly if its an unusual shape.
No, not just not a matter of opinion. Of course, I too can think of many cases where full pwks might still be useful. The point is, the normal pwk is almost always going to be MORE useful, because the builder can tailor the walkable area easily in just about any way they want, instead of having his hand forced. The small amount of time you might save by not placing an invisible place or place is more than offset by the reduced potential utility. Not hard math, even if you don't consider the huge differences in efficiency.
Technical bad practices? Lolz_six wrote...
When it comes to that bridge, well, I'd say its more of an exploit for convenience' sake than a genuinely useful feature. Something like that really should be part of the tile. But if it helps you keep haks down to CEP only or whatever other limitation you place on yourself then its fair enough I guess. I've found modern systems struggle more with the way NWN handles emitters than they do with technical bad practise involving walkmeshes anyway.
As for the bridge being an 'exploit' and not a useful feature...please. I take it you haven't tinkered with editing area files yourself? There's a handy thread on it somewhere on this board. It allows you to do all kinds of useful edits to tilesets that the toolset doesn't. Even if using something other than bioware-provided tools makes it an 'exploit' in your book (though that's a novel and bizarre use of the word, one that encompasses custom models as well, to say nothing of NWNX), it doesn't speak to its usefulness. If it weren't useful, we wouldn't be doing it in the first place, as I would think is sort of obvious.
Put even more simply - what we did with that bridge, doesn't cause crashes. The more-complex way of doing pwks you are advocating, has been shown to. How you call the former a bad practice, but not the later, is incomprehensible. Could you elaborate on your definition of 'exploit' and 'bad practice? The way you're using them makes no sense at all to me.
Funky
Modifié par FunkySwerve, 23 novembre 2011 - 04:15 .
#16
Posté 23 novembre 2011 - 07:29
WTF are you mumbling about Dude?
First this discussion is about PWK's <<-- (Placeables Walkmesh)
You post about a Tileset bridge, show us a screenshot of it and a screenshot with a load of invisible
placeables that all contain a PWK since you mentioned that they are placed there for path blocking AND
then go on about Bioware's style beter then the REAL style??
Yo Dude, the F are you talking about.
[EDIT]: Btw, I still get a good laugh at people with PW's that say we are Hak free... only NWN vanilla + CEP... lol
Modifié par Lord Sullivan, 23 novembre 2011 - 07:31 .
#17
Posté 23 novembre 2011 - 07:38
I'm always amazed at what little quirks the engine can handle. IMO we don't give the engine enough credit...
Modifié par Pstemarie, 23 novembre 2011 - 07:39 .
#18
Posté 23 novembre 2011 - 09:18
Is the vulgarity really necessary? I won't report you, but I'm fairly sure it's against the code of conduct.Lord Sullivan wrote...
@FunkySwerve
WTF are you mumbling about Dude?
How astute of you. I guess that means you read at least the first post.First this discussion is about PWK's <<-- (Placeables Walkmesh)
That's not a tileset bridge, but thanks for the compliment.You post about a Tileset bridge, show us a screenshot of it and a screenshot with a load of invisible
placeables that all contain a PWK since you mentioned that they are placed there for path blocking AND
Heck, I'll even show you it sans places, lest ye be skeptical:

Actually, six called it the REAL style. I scarequoted it to show my skepticism about the label, which you obviously share. Again, pays to read the thread.then go on about Bioware's style beter then the REAL style??
The thread. Which you would know, if you had read it. Pays to read the thread.Yo Dude, the F are you talking about. {smilie}
Why? Enough of the community has it that it's not a serious barrier to entry, unlike ever other hak out there. That's why HG opted to use it originally back in 2004, before I even got on board - to draw more players. That's also why it's the only hak I would ever contribute to - there's substantial value in a single community hak. Rocket science, it is not.[EDIT]: Btw, I still get a good laugh at people with PW's that say we are Hak free... only NWN vanilla + CEP... lol
EDIT: Since I'm mucking through photobucket again, I might as well post another example of what that non-'genuinely useful' 'exploit' can be useful for. I give you the Elemental Plane of Air, using the City Exterior tileset:

Funky
Modifié par FunkySwerve, 23 novembre 2011 - 09:32 .
#19
Posté 23 novembre 2011 - 09:56
There's no vulgarity in my post. If you like to beleive that WTF as oppose to what the hell is vulgar... well
suit yourself.
See, the reason I ask "what are you talking about" is indeed because I read the thread until your post that
was not coherent with the rest of the thread... well to me at least.
Now that I've read your post about 5 times over I think I'm begining to decipher it.
But I must admit that I have yet to see the point you're trying to make.
So either I have trouble understanding you or you have trouble expressing yourself.
As for that last bit about CEP... it's a hak regardless. Its size of a hak doesn't matter nor does the
quantity of people that might like it nor does the amount of use...a hakpack is still a hakpack. If it walks like a duck,
smells like duck and sounds like duck... well it's a freaking duck.
The ease of entry is nothing but an assuption. I had downloaded version 1.53 in the past, but the bloated
last version since v2.x... no thanks. Way to much resources that I find useless or don't like in there not to
mention things that should not have been part of it. So I haven't bothered with that hakpack(s) since and don't
intend to at anytime in the future. Anyway, this is not a CEP debate thread so I will stop right here on the subject.
#20
Posté 23 novembre 2011 - 01:55
A PWK is needed only when the type of placeable you create logicaly needs one.
In such a case you can choose to make one according to what type of placeable
it is, so either "Flat" or "Geometric".
examples:
Flat
------
Chairs, Tables, desks, basicaly anything that is lower that the maximum height of Characters/NPCs.
Execption - Special Use Placeables like in Funky's example with the giant bones (I guess).
Geometric
---------------
Walls, Columns, Trees, Armoire, etc... Basicaly anything that is tall enough, large enough to
cover/hide characters/NPCs.
Execption - Special use Placeables that normaly a "Flat" PWK would suffice but created with geometric
PWKs that are well crafted so the placeable can be "Z" ajusted to be properly placed on non-even grounds
while not covering characters/npcs entirely.
My personal view on the matter is that... if I were to download a pack from the vault and there are
placeables that should have geometric PWKs as characters should be covered/protected when hiding
behind said placeables and hostiles manage to fire range amo OR fire spells at characters, well
those placeables are useless to me and the pack will quickly hit the recycle bin.
Creating a clone of the object to make it its PWK is a bad idea as you can always create simpler shaped
PWKs for a model. (i.e. a placeable with a few different ground rocks of different sizes can use a few straight
cylinders around the size of each rock)
Some placeables obviously do not require PWKs as Bannor previously mentioned. (i.e. a "Candle")
Modifié par Lord Sullivan, 23 novembre 2011 - 01:57 .
#21
Posté 23 novembre 2011 - 03:35
I've learned an incredible amount from all of you. Wrestling with that Altar was... enlightening (still hate the nasty thang :-P ).
One of the things I learned that is only tangentially applicable to the OP (the use of non-planar pwks) is the use of simplified, non-rendering objects for shadows. Have any of you combined these two techniques - A non-planar (to carefully avoid the terrible "3D" word ;-) PWK that casts shadows? I.e. Is the geometry ignored if it's named PWK for shadow purposes or can you safely combine the two functions, thereby removing one more element from the object?
<...cuz he's a bit crazy>
#22
Posté 23 novembre 2011 - 05:05
FunkySwerve wrote...
Actually, six called it the REAL style. I scarequoted it to show my skepticism about the label, which you obviously share. Again, pays to read the thread.then go on about Bioware's style beter then the REAL style??
I guess the fact I've done work in other engines that actually have 3 dimensional movement collision plenty before somewhat skews my view towards 'practise'. I tend to apply rules that make the most sense from a realistic physical perspective rather than what happens to be convenient. I'll happily give you a list of things I've done that I think are wrong in that sense - I'm not saying it's universally bad to do such things. Just unrealistic and liable to cause people who don't have a thorough understanding of how your models work to run into issues.
From the perspective of someone making custom content, I'd rather my models worked as they would appear to from first glance. See pstemarie's post for a perfect example of where that's completely necessary as opposed to an alternative.
As an aside, please don't invent things that I've said and then accuse others of not reading the thread properly. My post is clearly visible above if you'd like to double check it. It's understandable to confuse my use of 'realistic' with 'real' inferring proper, but my post didn't even use that word.
Actually the pwk object isn't stored in the model file proper, and I'm relatively sure you can't render anything from a .pwk file. Certainly pwk and wok objects don't allow for the same parameters as trimesh.Rolo Kipp wrote...
Have any of you combined these two techniques - A non-planar (to carefully avoid the terrible "3D" word ;-) PWK that casts shadows? I.e. Is the geometry ignored if it's named PWK for shadow purposes or can you safely combine the two functions, thereby removing one more element from the object?
Modifié par _six, 23 novembre 2011 - 05:25 .
#23
Posté 23 novembre 2011 - 05:41
Do you know if the vertical sectioning of an object affects the pathfinding?OldTimeRadio wrote...
BTW, when that cone is sunk into the ground the same number of faces are still in play when something tries to path around it- so it's just as wasteful nomatter how much of it is sticking up throgh the ground. I'm sure at some point this ceases to be as much of a problem as it sounds, though.
Specifically, if you had that 5 sided cone with 3 segments of decreasing radius toward the top, would the pathfinding be identical if the cone is set at 0-z and a copy is set 3meters -z (i.e. if there is a smaller section at 0-z)?
Or, another way of saying it, if the cone has a radius of 5m at the base, another ring of vertexes at 2.5m high that has a radius of 2.5m and tops out at 5m tall, what would the pathfinding be if the cone was sunk 2.5m in the ground (so the ground-level radius was 2.5m?
Or the inverse, you have a great stone mushroom next to the sunken ruins of a great stone mushroom (cap is 4m up). With the raised mushroom, could you walk under the overhang (assumes a pwk of a disc on top of a column)?
And if I pulled the lever that dropped it down, would it prevent walking to seal that shaft all the Big Uglies are about to pour out of? ;-)
<...like a cow its cud>
#24
Posté 23 novembre 2011 - 06:48
Seriously? I think you might want to google that acronym. Here's wikipedia's entry, which makes the vulgarity pretty apparent: http://en.wikipedia.org/wiki/WTFLord Sullivan wrote...
@FunkySwerve
There's no vulgarity in my post. If you like to beleive that WTF as oppose to what the hell is vulgar... well
suit yourself.
It's the former. How you could've read my post and thought that was a tileset bridge is beyond me. Anyway, my point was simple enough. Full pwks on those places would make it impossible to use for that purpose.See, the reason I ask "what are you talking about" is indeed because I read the thread until your post that
was not coherent with the rest of the thread... well to me at least.
Now that I've read your post about 5 times over I think I'm begining to decipher it.
But I must admit that I have yet to see the point you're trying to make.
So either I have trouble understanding you or you have trouble expressing yourself.
Of course it's a hak. I just lacks the major downside of all other haks, which is why people tend to talk about it differently.As for that last bit about CEP... it's a hak regardless. Its size of a hak doesn't matter nor does the
quantity of people that might like it nor does the amount of use...a hakpack is still a hakpack. If it walks like a duck,
smells like duck and sounds like duck... well it's a freaking duck.
No, it isn't. It's basic fact. Only a certain percentage of players, when faced with an additional download requirement, will go to the extra effort. Unless that percentage is 100% - and there is clear evidence it is not - heck, some people even refuse the extra effort of CEP - then the adding time and effort cost the player is a very real fact, as are the consequences.The ease of entry is nothing but an assuption.
Funky
#25
Posté 23 novembre 2011 - 07:08
p.s. this is not against the op in no way, i just dont get it... help me obi wan
Modifié par NWN_baba yaga, 23 novembre 2011 - 07:13 .





Retour en haut






