« Papervision3D- Tiling Materials
Papervision3D - Animated Movie Asset Material »

Papervision3D- Bump Mapped Material

February 11th, 2008 . Posted by brad in Flash, Papervision3D

Some of the coolest features added to papervision 2 (great white) are those relating to lights and shading. The phongShader also allows you to apply bump maps to your models:

//create simple material
var ballMat:MovieAssetMaterial = new MovieAssetMaterial("tennisMat");
//create bump map material
var ballBumpMat:MovieAssetMaterial = new MovieAssetMaterial("tennisBump");
//create phong shader
var ballShader:PhongShader = new PhongShader(pointLight, 0x145A22, 0x4AD766, 20, ballBumpMat.bitmap,
ballMat.bitmap);
//combine the shader with the original material
var ballShadedMat:ShadedMaterial = new ShadedMaterial(ballMat, ballShader);

bump map material

Example
Source



2 Responses to “Papervision3D- Bump Mapped Material”

  • Posted: DJC on August 26th, 2008 at 2:56 am .

    tennisMat and tennisBump are created how?
    ty for your tutorials!

    DJC

  • Posted: brad on August 26th, 2008 at 9:38 am .

    Both are movieclips in the library, with linked classes, named tennisMat and tennisBump respectively.

    Right click (pc) / CTRL-click(mac) on the movieclip in the library that you want to use for the material, hit linkage, and select export for actionscript. Pass this class name as the argument when creating new material, (tennisMat etc).

    You can download the original fla here


Add Comment

Comment