Unable to convert: BitMap: to type: TextureMap

My code
FerstTexture=Bitmaptexture()
FerstTexture =bitmap 100 100 color:red
SecondTexture=Bitmaptexture()
SecondTexture=bitmap 100 100 color:green
CompoMap=compositeTexture()
CompoMap.mapEnabled.count = 2
CompoMap.mapList =#(FerstTexture,SecondTexture)

MAX answer --Unable to convert: BitMap: to type: TextureMap

Explain my mistake please.........

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anybany's picture

BARIGAZY, glad to see and

BARIGAZY, glad to see and listen you....
Thank you

barigazy's picture

my pleasure,man :)

my pleasure,man :)

barigazy

barigazy's picture

Do it like this

The problem is that you need to save bitmap first before you assigne it.
Just specify your path where you want to save bitmaps.

mypath = "c:\\temp\\"
redmap = (bitmap 100 100 color:red filename:(mypath+"red.bmp"))
save redmap
FerstTexture = Bitmaptexture bitmap:redmap
greenmap = (bitmap 100 100 color:green filename:(mypath+"green.bmp"))
save greenmap
SecondTexture = Bitmaptexture bitmap:greenmap
CompoMap=compositeTexture()
CompoMap.mapEnabled.count = 2
CompoMap.mapList =#(FerstTexture,SecondTexture)
meditmaterials[1].diffusemap = CompoMap

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.