Thank you people! You pushed me into the right direction, so I made good progress.
I have CleanModel, but I really wanted to start to understand this a bit better or to what to pay attention to, so a shadow might work from the beginning.
Welding verts was a good point to start - I forgot about that, so thanks MerricksDad! In my case it is not a skinned or dangeled mesh, but since the source of those pillars was the original mesh, the chance of none welded verts was there. Well, there were none to weld (even in a bigger range).
I also checked for loose verts and backwards faces - none.
BTW. I didn't find the "duplicate face finder" - I'm using MDA's tool in Gmax. Is that a Max addition or am I just too blind (it was getting very late yesterday, while fiddling with the shadows).
Kind of frustrated at that point, I started to create a sample tile with this shadow mesh for you people to check out, what I'm missing. Since the part, where the original well was placed on, didn't fit into an NWN1 tileset (raised and more), I created a new (feature) override version for the ttr01 set. Now, things started to get weird for me:
1. The shadow of the pillar base differed from that of the original terrain.
2. The well roof didn't cast a shadow at all anymore, whatever I tried!
Since I had to lower the objects to cast a shadow on the ground of ttr01, I started to play with the height and found the following:
(Don't pay any attention to the texturing! It is very sloppy and just applied to have an orientation!)
When the pillars are touching the ground (or are above the ground), the casting of a shadow seems to be OK, which hints, that the mesh itself must be OK to calculate shadows. When lowered into the ground, the engine seems to have problems and creates new shadow artefacts! So, one reason for my issue might be the height position of the pillars.
But now for the roof: That was actually fixed by doing, what Zarathustra217 wrote: The pivot was not anywhere near the roof mesh. I centred it to the mesh and - tadaaaah - the shadow was back! (Not shown in the picture above.)
There after, I centred the pivot to the pillar group and this also improved things. So that might even get better, when each pillar gets its own pivot, which is centred INSIDE the pillar. I have not tested it, but this assumption is also supported by NWN_baba yaga approach (if I understood it correctly).
After these results, I was checking out something completely different and by accident stumbled upon the DLA custom content guide, which contains a section on shadows. It contains info on what you all already said (if I just would have found it earlier), but to make this post more complete, I'll add the DLA info to this post (Retrieved from "http://ccg.dladventu...ex.php/Shadows" via web.archive.org=WaybackMachine - it's somewhere on neverwintervault.org, but I forgot to copy the link...):
-------------
And in this guide is the answer to smoothing groups (see last DLA "note")!
-------------
Shadows
From NWN1 Custom Content Guide
To put it bluntly, shadows are a pain in the butt to check and fix, but when you understand how they operate in regards to the setup, it because a bit easier to do your modeling to account for this implementation.
The general rule of thumb to insure a model will cast a shadow properly is to draw a line from the pivot point of the mesh to the center and back of each face (poly) on the mesh (opposite the normals). No overlaps are allowed through other faces. So you can tell that NWN prefers convex objects.
Image:Shadows 01.jpg
A good easy example would be something like a box (cube), the pivot can be anywhere in the interior and the box will cast shadows properly.
Dark grey lines are from the pivot to the back of the face, the little lines poking from the face are the orientation of the normals.
Image:Shadows 02.jpg
Now, how about a slightly more complex object? Let's make it into a simple sword hilt and handle:
Image:Shadows 02a.jpg
Ut-ho, as we can see from the top view, there might be problems with the shadows, due to the bottom part of the hilt facing the other way. But with a simple move of the pivot closer to the center of the hilt, it works out ok:
Image:Shadows 03.jpg
And for really complex meshes with multiple layers of surfaces (barrels, trees) or is concave in nature? You can't do it with one pivot, so don't be afraid to split your mesh up into multiple objects. Take for instance, the standard NWN barrel:
As you can see, Bioware split the barrel walls into 4 parts so the lip of the walls at the top where the lid opens up will be able to cast a shadow properly when the barrel is 'opened'.
Note:
Objects with DanglyMesh (aka Flex) on them will cast shadows, but if you're dealing with a flat object like say the sail of a boat, it might be an idea to separate the sail into two objects.
Note:
Skinmesh objects will NOT cast shadows, but there is a simple trick here. Use the bones themselves. Set the trimeshproperties to not render but cast shadows. Oversize your bones and you can fake shadows fairly well with this approach while still being polygon conscious.
Note:
Extremely complicated large sized objects are better avoided altogether, as there is a limit to the number of objects a single model can have (you can't split a model of a rocket engine into zillions of pieces). A possible way around this, is to split the model into several smaller parts (less complicated models).
Note:
There's a little known, (Danmar says) loophole in the all faces must face away from the model's pivot point. And that loophole is that when there is _no_ smoothing data, each face is a not smoothed with its neighbors, then they will never cast bad shadows as a result.
Another solution is use a 'shadow proxy', that is, set the normal objects to be "Render=Yes, Shadow=No" then have a bunch of other (low poly) objects with "Render=No, Shadow=Yes" be the ones that actually cast the shadows. This also works out because the shadow casting tends to slow the game down, so by using a low poly object for the shadow casting, it potentially speeds up the game's frame rate.
--------------
Sadly, the included pictures are lost, but maybe somebody of you still has them on some old HD.
--------------
And in addition to the DLA guide this info from MDA's NWmax Panel - Mesh Tools:
• Check Shadows
performs a sanity check on the selected geom for possible shadow issues. Any geom that fails the check will have it's wire colour turned red. For this reason do not use red as a colour if you plan to use this function.
--------------
So, my sum up for now would be:
- Use simple meshes.
- If the original mesh is used for the shadow or it is the base for a shadow mesh, weld verts and check for back faces.
- Make sure, that the pivot is (centred) possibly inside the mesh, which is responsible for shadows.
- Pay attention to height between the ground and the object casting the shadow.
- Deactivate smoothing groups (if it's a shadow mesh only, where the mesh itself is not rendered / only there for letting the engine create a shadow).