[Closed] Retrieve width & height of bitmap-based Texmap?
Hi,
I’m writing a renderer plugin for 3ds Max.
Sometimes, there is a need to allocate a 2D buffer of roughly the same dimensions as a 3ds Max map, for instance to importance-sample a map.
Is there a way, via the Texmap or MtlBase classes maybe, to retrieve the width and height of bitmap-based maps, or at least some hints of what dimensions would be appropriate?
For instance, if a Texmap is actually a BitmapTex, I can easily cast it, retrieve the Bitmap it’s based on and get access to its width and height. However, if the Texmap is, say, a VrayHDRI map, how should I proceed to retrieve the width and height of the 2D texture map it’s based on? What about map types I don’t know anything about?
Franz
it seems no universal approach to achieve it.
for VrayHDRI or anything else, if i want to retrieve some info of it, i will first get its classID and parameter names, through maxscript, then extract the desired parameters at render time, in your case, it is the file name of the bitmap.