Author Topic: Rolo Redhand  (Read 589 times)

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Rolo Redhand
« Reply #15 on: November 03, 2011, 10:04:36 pm »


               A pwk and wok are not quite flat/zero z level.  They CAN be set to act that way, but a raised section of a wok or pwk that is set to type 2 will block ammunition from going through.  It will also block long ranged spells etc.  Where a flat wok can stop you from walking across a specific area, a 3d version is better in that it also dynamically blocks the character, creature, ammunition, spells etc.

So, it all depends on the surface type of the wok/pwk, and it's variation in height as required by the object or tile in question.

The only "Z" limitation is that you can NOT walk above another walkable section.  That does not mean you can't raise a wall, or walkway above the ground level, it just means that you can't walk both over AND under the bridged section, it is a one or the other type of deal.

This also affects and explains why "flying" objects/creatures, will bounce as they fly over a raised section of wok.    That object/creature is using the base level Z location as it's base to fly above, if the base changes vertical position, the flying object will change as well.  If the tile/pwk has a blocking section, a raised wall with type 2 faces, or trees with type 7 (non-walk) faces, then that flying object can't cross/fly over that section.

So, yes, pwks/woks DO affect Z location, and also affect other aspects of the game.

As a direct answer to OTR's question about collision mesh, IF the PWK is setup correctly, it WILL act as a collision mesh.  But that depends on the artist who created the pwk.  If the pwk is created simply as a flat plane set to type 7 (non-walk) to block character movement, it will NOT block spells, or ammuntion, but if the pwk has raised sections set to type 2 (obscuring) it will then stop the character from passing through AND stop ammunition or act as a wall to spells.

I don't know for sure on the emitter side though.  That particular bit I have not checked, but I can't see why it would not act as the normal wok for a tile works with relationship to emitters.
               
               

               


                     Modifié par Bannor Bloodfist, 03 novembre 2011 - 10:11 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Rolo Redhand
« Reply #16 on: November 03, 2011, 10:14:24 pm »


               <casting a long...>

I can now say *this* much:
First - If the PWK is 25cm above the WOK, it is still valid for pathfinding.

Second - If you are a bumbling fool who forgets to add (update after changing) the separate .pwk file to the hak you can forget about *using* the placeable :-P

My guess, the separate .pwk is a 2D projection of the pre-export PWK geometry onto the WOK, so it doesn't matter how high it is.

<...shadow>
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Rolo Redhand
« Reply #17 on: November 04, 2011, 01:47:04 am »


               Why does everyone insist on using the term 2d for a projection of a 3d object?If your pwk is flat, then yes, it only "projects" a flat plane.  So, placing a flat, non walk area higher than the tiles wok faces, the engine assumes a raised non walk section.  Same is true with an "obscuring" flat plane.  The engine assumes a non walk section.  But, if the pwk has 3 dimensions, the engine will fill with whatever type the faces are set to.  An obscuring (type 2) will generate an obscuring type 2 face up to the height of the top of the pwk.  If the faces are non walk, (type 7) the engine projects a type 7 face up to the top of the pwk. Type 7, while preventing the character from walking across, will not stop projectiles, while a type 2, WILL block both the character and projectiles.  

Try it with a wall placeable.  You will see what I mean if the pwk is correct, and type 2 faces, it will block projectiles if the pwk has height to it.  If not, and the pwk is a flat plane at the base of the wall, it won't stop anything except the character/creatures will not be able to walk across it.

This is NOT 2d, but is in actuality 3d projection.  Height, width, and depth.

Many, MANY pwks are created without taking that into account.  Many are created as flat planes since it is sooo much easier to create.  Folks take every opportunity to save time/effort, but that doesn't make the object correct.  

The pwk base, should extend Upwards from the flat zero position, to the top of the object(s) in question.  Otherwise, you would have no need to adjust the relative Z position of the placeable when you paint it in toolset.  The toolset and game both project the 3 dimensions of the wok first, then adjust it by however the placeables pwks change the terrain.

Anyway, NWN IS a 3d game, in the that you CAN raise/lower the "Z" settings of objects etc.  The only "Z" limitation is that you can only have ONE "Z".  Meaning you can't cross over/under the same location.  

Another test you can run to prove the point, is to place a set of steps over a walkable area.  The steps, if created correctly, with a true 3d pwk, will now allow your pc to walk UP the steps.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Rolo Redhand
« Reply #18 on: November 04, 2011, 03:30:56 pm »


               <mumbling something...>

Bannor Bloodfist wrote...
Why does everyone insist on using the term 2d for a projection of a 3d object?If your pwk is flat, then yes, it only "projects" a flat plane.  So, placing a flat, non walk area higher than the tiles wok faces, the engine assumes a raised non walk section.  Same is true with an "obscuring" flat plane.  The engine assumes a non walk section.

Hmmm. In this case, my PWK being a flat circle with a notch cut out, what I was trying to describle was the effect of a plane object being projected on a plane object (WOK). I have no side faces to the PWK to raise it from 0cm to 25cm. It just floats above. My point in the above post was that it worked fine without having the geometry in the scene connecting the plane of the WOK with the PWK of the object. I.e. it doesn't *need* to be more than a flat plane (2D) for walking/non-walking purposes. This was something I guessed, but hadn't *known*.  

Referring to it as a 2D projection arose from my assumption that the graphics engine would not store or calculate more geometry than was needed. I.e. if it was *not* obscuring, adding any vertexes above/below the WOK is wasteful of both CPU and memory. I assume, in such a case, the non-walk information would be mapped onto the existing walkmesh in the same manner as a texture map - not affecting geometry, only type.

But, if the pwk has 3 dimensions, the engine will fill with whatever type the faces are set to.  An obscuring (type 2) will generate an obscuring type 2 face up to the height of the top of the pwk.  If the faces are non walk, (type 7) the engine projects a type 7 face up to the top of the pwk. Type 7, while preventing the character from walking across, will not stop projectiles, while a type 2, WILL block both the character and projectiles.  

Try it with a wall placeable.  You will see what I mean if the pwk is correct, and type 2 faces, it will block projectiles if the pwk has height to it.  If not, and the pwk is a flat plane at the base of the wall, it won't stop anything except the character/creatures will not be able to walk across it.

I understand (though I have not yet experimented with) setting the types of walkmesh. I have read every tutorial I can find (all of yours :-), so I know the theory.

OTOH, I'm still feeling my way into NwMax and on the placeable PWK the only options I see are radios between Placeable and Door.  I assume that setting the correct color will set the proper type of face, but I honestly never even thought of that in connection to my Altar. Have no intention of obscuring, but don't particularly care if it does :-P 

This is NOT 2d, but is in actuality 3d projection.  Height, width, and depth.

Many, MANY pwks are created without taking that into account.  Many are created as flat planes since it is sooo much easier to create.  Folks take every opportunity to save time/effort, but that doesn't make the object correct.  

The pwk base, should extend Upwards from the flat zero position, to the top of the object(s) in question.  Otherwise, you would have no need to adjust the relative Z position of the placeable when you paint it in toolset.  The toolset and game both project the 3 dimensions of the wok first, then adjust it by however the placeables pwks change the terrain.

But, in the case of a flat surface hovering above the WOK, does it add in geometry or does it just project the type faces downward onto the WOK? That is, am I actually saving a bit of memory & cycle by using a flat plane, or am I *adding* some construction overhead when the placeable is added?

Anyway, NWN IS a 3d game, in the that you CAN raise/lower the "Z" settings of objects etc.  The only "Z" limitation is that you can only have ONE "Z".  Meaning you can't cross over/under the same location. 

Another test you can run to prove the point, is to place a set of steps over a walkable area.  The steps, if created correctly, with a true 3d pwk, will now allow your pc to walk UP the steps.

Don't doubt it a bit =)

OTOH, if I cut a section out of the flat non-walk PWK hovering at the height of the top of my dias, the (now walkable) section is *not* raised to the top of my dias. You wade through the model. Strange, no? The engine does not, I think, add *walkable* mesh unless you specifically create it on the model. So, does it add *non*-walkable geometry? Or just project the shape of the PWK onto the existing WOK?

Caveat: Not trying to be argumentative :-) I did not know you felt so strongly about this :-/ And I *do* want to understand *why* things work one way but not another, or if I'm impacting the performance (plus or minus) with my modeling techniques.

<...lost in his mug>
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Rolo Redhand
« Reply #19 on: November 04, 2011, 08:25:29 pm »


               A pwk blocks access for around 25cm above and below it. By making the pwk a trapeze shape rather than a flat plane you can increase that range, so that placing it on flat ground or above/below the ground will be less of an issue. Whereas if you want it to be walkable and its too low it won't be.

However a pwk will never allow anything to be walkable.

Actually I don't believe the obscuring thing works. Pretty sure material type is just ignored, and its none walkable.
               
               

               


                     Modifié par _six, 04 novembre 2011 - 08:27 .
                     
                  


            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
Rolo Redhand
« Reply #20 on: November 04, 2011, 09:06:52 pm »


               A placeable pwk has only one setting "Obscuring" = (non-walkable + obscuring) so if a flat plane is used say... for a tree and you encounter hostile archers, they will keep still away from your Character and keep shooting through the trees if you are behind one, if you add geometry 250cm and up, they will be prevented from seeing your character through the trees and will start running towards your character to attack it.
               
               

               


                     Modifié par Lord Sullivan, 05 novembre 2011 - 01:49 .
                     
                  


            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Rolo Redhand
« Reply #21 on: November 05, 2011, 12:30:36 am »


               Lots of good information!  Lord Sullivan, do you mean 250cm instead of 250mm?
               
               

               
            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
Rolo Redhand
« Reply #22 on: November 05, 2011, 01:46:46 am »


               

OldTimeRadio wrote...

Lots of good information!  Lord Sullivan, do you mean 250cm instead of 250mm?

Oh yeah... 250cm. Sorry bout that. '<img'> FIXED.
               
               

               


                     Modifié par Lord Sullivan, 05 novembre 2011 - 01:49 .