To get a non-repeating graphic (w/ alpha) on top of a tiled (repeating) graphic:
- Export model from 3dsmax that has the repeating texture (map) in a shader (material).
- Create a 32-bit alpha .png of the decal image.
- In Director, take the wall shader and add the decal texture as shader texture layer #2
- Set the decal shader layer to non-repeating
- Set the scale and position values for the decal layer until it's at the desired size and position.
tMbr3d = member( "DecalOnWall" )
tTexture = tMbr3d.newTexture( "hand", #fromCastMember, member( "hand_decal" ) )
tShader.textureList[2] = tTexture
tShader.blendFunctionList[2] = #blend
tShader.blendSourceList[2] = #alpha
tShader.textureTransformList[2].position = vector( 1.6, 0.3, 0.0 )
tShader.textureTransformList[2].scale = vector( 0.7, 0.5, 1.0 )
tShader.textureRepeatList[2] = false
No comments:
Post a Comment