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
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.