This code was made by Steempipe and modified by me. And that means that, probably, there is a better way to code this. You need to make a alpha channel on the textureof your model in a program like photoshop, and on this alpha channel, paint with white color all the parts of the model that you want to use the effect in.
Put all the code inside of a wdl file and save it as CubicEnvMappping.wdl. Then include inside your main wdl like this: include <CubicEnvMappping.wdl>;
Now give the ffp_MaskedEnvMap action to your model.
Ps.: Don't forget to make an alpha channel inside the model's texture.
Another think that I forgot to mention... If you want you can add differents effects to differents parts of the model. Just add another Texture with a different alpha mask and another skin inside the material, then another pass that uses that new skin. The only think that I didn't manage to do was a very different effect. Maybe some of Shader's Gurus could do that. The code would be like this:
pass p2 /////////////////////////////////////////// // This pass will applay the Cubemap to a second mask // { texture[0]=<mtlSkin3>; texture[1]=<mtlSkin1>;
addressU[1]=Clamp; addressV[1]=Clamp; texCoordIndex[1]=cameraSpaceReflectionVector; textureTransformFlags[1]=Count3; textureTransform[1]=<matMtl>; // transform camera space back to world space }