Hi Nando
Here is my quick answer to work with the classic particleShape.
Add to your particleShape two per particle attributes of type vector, let's call them e.g aimPP and aimDir.
Create one expression 'Runtime before dynamics' to modify the rotation of your particles (as you just painted your particles on surface with the particleTool) with the following expression:
Code: Select all
vector $vec = myParticleShape.position;
vector $vec = `nearestPointOnMesh -ip ($vec.x) ($vec.y) ($vec.z) -nr -q -na myPolyShape`;
myParticleShape.aimPP = $vec;
myParticleShape.aimDir = <<0,1,0>>;
In the instancer of your particleShape set the rotation options: Aim Direction << aimPP and Aim Axis << aimDir
Step forward on frame and from the Solver menu set initial state for your particles.
If you want to modify the base axis simply change the vector <<0,1,0>> to what you want.
This assumes that you have the nearestPointOnMesh plugin loaded.
You should also be able to use the pointOnMeshInfo plugin that's coming with the bonusTools and its pointOnMesh command (can't remember the flags and 'help pointOnMesh' returns nothing).
I thought about that because I don't remember exactly since when the nearestPointOnMesh plugin is included in maya

There's also the closestPointOnMesh node that could be used... if I well remember it's used when you draw instances with the Paint Scripts Tool setup with geometryPaint to have the instances following the geometry you've painted on.
F
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go