Unable to convert: BitMap to type TextureMap

Hi all.
How to convert BitMap to type: TextureMap ?

--------------------------------------------------------------------
displaceBitmapStr = getBitmapOpenFileName caption:"Select displace image file" filename:locDir types:"All|*.*|"

renderWidth = displaceBitmap.width
renderHeight = displaceBitmap.height

displaceBitMap = bitmap renderWidth renderHeight filename:displaceBitmapStr

displaceTextureMap = bitmaptexture.displaceBitMap
--------------------------------------------------------------------

I thought that you can convert bitmap to type: TextureMap with a string
--------------------------------------------------------------------
displaceTextureMap = bitmaptexture.displaceBitMap
--------------------------------------------------------------------

But I get an error
Unable to convert: BitMap:D:\Imagine\[email protected]\Dest_DHigh.png to type: TextureMap

Comments

Comment viewing options

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

Hi Any

You can try something like this
(
displaceBitmap = getBitmapOpenFileName caption:"Select displace image file" types:"All|*.*|"

DispBtm = bitmaptexture filename:displaceBitmap

renderWidth = DispBtm.bitmap.width
renderHeight = DispBtm.bitmap.height
)

it will set the render output size to your image size. but i am not sure that it is what you are trying to do...
if you need to put your displacement texture to a material you can just put DispBtm anywhere you need.

Comment viewing options

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