First, I like your idea of raising the PWK above 0 Z and how it affects a placeable's ability to be partly buried. Maybe I'll do some hunting around to see if I can find a MaxScript which will help make bounding-box PWK's if something like it doesn't already exist in VelsTools. Anybody know? That might help strike a better balance for what you're looking for than cloning the geometry, outright.
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 .