This is a text file I wrote about naming rules related to mdl, helper and pwk dummy names that can break dummys. I hope that it will be of some use to anyone that may have trouble getting their dummys to work right in-game. Feel free to add this to any doc or helper compilations that you want.
Please let me know if you find anything to be inaccurate or wrong so that I can get it fixed.
Attachment | Size |
---|---|
![]() | 6.61 KB |
Many thanks for this. Pwk and dummy info is scarce, so every little bit helps. Any differences between Nwn:EE and 1.69 ?
I am not 100% sure if there is anything different between 1.69 and EE, other than the "renderhint" line that tells the game that you are using normal and spec maps. I have also not checked to see if the 1892 compiler strips selfillum color yet, but that should not effect dummies anyway.
Information looks good; however, I would recommend the following based on the original Placeable documentation from BioWare:
Placeable names should follow the convention "LLL_###" where LLL represents the model type's assigned prefix (plc, px2, etc. for placeables) and L## represents the model number which is a single letter followed by two digits (a01, a02, a03, etc.).
While it is good to note that alternate naming conventions will work, it is probably better to just note the original naming convention used by BioWare. Note, the 1.69 placeables were named by DLA and many (if not all) do not follow this naming convention.
IIRC, the "_base" node is a reference node marking the Z-height of the AuroraBase (e.g. it is the same as "_ground" node).
Locations of dummy nodes: it is generally best practice to locate the dummy nodes at X 0 and Y 0. The Z-height can vary (and should) based on the size of the placeable. The "_hand" node is the only one that is typically NOT located at X 0 Y 0 - instead it is often located at the theoretical point where a spell would originate from the placeable.
Model Pivot: While you do not discuss this, it is important to note that ALL the geomerty of ANY model should be centered at X0 Y0 to minimize the size of the model's hit box (the green box that appears around the model in the toolset). Models whose pivot is located off center will generate hit boxes that are considerably larger than the space the model actually occupies, possibly causing issues with spacing, LOS, and pathfinding.
Another note about pivots - bad pivot locations = bad shadow rendering. The engine has enough issues rendering shadows, no need to give it more.
Thank you for commenting Pstemarie. Would setting the pivot and models geometry to X0 Y0 not cause the model to be below the ground when you place it? Or, are you talking about making sure to clear all tranforms or have the root set to X0 Y0? I can think of maybe one reason for not setting the head_hit node to X0 Y0, because it is the location where all visual effects that are designed to go above or on the targets head is placed. Unless all OC models already set head_hit to X0 Y0, all of the effects you cast on a object after moving the head_hit node to X0 Y0 will not be where they are supposed to be, unless you went into each VFX's mdl and moved its pivot so it matches and it is where it is supposed to be in relation to the head_hit node. I did not know all of that about pivot points shadows and hit boxes though.
Pivots work differently from object location. To qualify my previous statements about pivots, the pivot is the point around which the model geometry is centered and is used to set the rotation of the geometry when it animates. You'll notice that a lot model parts have pivots at the top, bottom, or center of the geometry. "Good" modeling practice follows this caveat. "Bad" models tend to have geometry that is totally disassociated from the geometry of the model.
For example, I was working on reworking a placeable barrel where the geometry for the barrel was located at X 0.0 Y 0.0 Z 0.0, but the pivot was located at X -250.0 Y -350.0 and Z 0.0. In game, the barrel had an enormous "hit-box" and the shadow of the barrel appeared odd. After I recentered the pivot and dropped it to the bottom of the model, the hitbox and shadow issue was resolved.
When talking about creatures, think of the pivot as a joint - ankle, wrist, knee, elbow, etc. You generally want to set the pivot to where the geometry needs to bend.
As for the dummy X Y Z positions, I was referring to a linear model where all components are centered at X 0 Y 0 and form a column in the Z-Axis - thinking a barrel or column. For models with parts located in different places then the dummy nodes need to be shifted accordingly. For example if a dragon statue's head is a X 0.0 Y -500.0 then the head_hit node will likewise be placed above that.
And finally, as to geometry appearing below ground. Many placeables center the pivot to the geometry at X 0 Y 0 then push the pivot down to Z 0.0 with the geometry being all above the Z 0.0 plane. Thus, nothing would appear below ground.
The best way to see pivots in action is to open the BioWare barrel placeable and look at the pivot locations for the various parts. Then move the pivot on the lid from the edge to the center of the object. When the anims run, you'll see that the lid now opens from the center of the barrel as opposed to from the edge.
Ok I think I get what you are saying now. In blender, which is what I use, the pivot is the mesh objects origin. You can set the origin of each mesh object 3 ways. One way is to place the 3d cursor where you want it in edit mode then go into object mode and click the "set origin" button in the tools/edit tab of the tool panel. after you click the set origin button there will be a drop down and you select "origin to 3D cursor. The other 2 ways, well really its one way with more then one setting, while is object mode click the set origin button and select either "set origin to center of mass (surface)" or "set origin to center of mass (volume)".I have always used the 3D cursor method. And for those that are reading that do not know, a mdl/ placeable can have multiple mesh objects, each with there own object origin. So what should you do if you have mutiple mesh objects that are not all in the same spot? should you select each one and set there origins to X0 Y0? And really the whole origin and pivot thing get a lot more complex when you start adding in the Parent and child component. if your object is a child of another object mesh/dummy then it will have to also rotate/move with parents origin any time you rotate or move it. but if you move/rotate a child object, it does not move the parent. When you are doing complex animations it will be hard to set all of your origins to X0 Y0, sense that is where all of your objects transform data in the animations is coming from, UNLESS you make your mesh a child of a empty object and use the empty to do all of your rotating and moving in the animation key frames.
I use 3dsMax (and gMax now), but yes, what I'm referring to by pivot is the mesh object's origin. In 3ds/gMax there is a tool that aligns pivots for you. Whenever I build a model I always set the pivot to the center of the X Y axes of the mesh object and the Z is set whereever I need the model to pivot from for animation. When I build a model from scratch, I always center its origin (the AuroraBase) at X 0 Y 0 Z 0, build the mesh object(s), move the mesh object(s) into position, make sure that the mesh origin (pivot) is centered to the mesh geometry in the X and Y axes, and finally adjust the Z-Axis of any pivots that need to be adjusted for animation purposes.
Yes, parent objects add an all new level of complexity, but it isn't too hard to figure out once you start looking at models that have already been made. You don't need to parent to an empty object as that can sometimes probably lead to child objects not moving how you'd expect.
What I should have said in my original comment is:
Model Pivot: While you do not discuss this, it is important to note that
ALL the geomertythe pivot (origin) of ANY model should be centeredat X0 Y0to the mesh geometry in the X and Y axes to minimize the size of the model's hit box (the green box that appears around the model in the toolset). Models whose pivot is located off center will generate hit boxes that are considerably larger than the space the model actually occupies, possibly causing issues with spacing, LOS, and pathfinding.Oversize Hitboxes are generally caused by the origin of one or more objects being off-center to their mesh geometry or by an orphaned vertex sitting out in left field.