Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

renderMap equivalent in maxsdk

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
613 Views, 4 Replies

renderMap equivalent in maxsdk

Hi I am aware that RenderBitmap and RenderTexmap can be used in the SDK

However, as far as I have tested, these functions work with BMM_TRUE_32

Below is my code and it fails when the bitmap is of BMM_TRUE_24 type

 

BitmapInfo newBmpInfo(bm->GetBitmapInfo());
newBmpInfo.SetWidth(newWidth);
newBmpInfo.SetHeight(newHeight);
Bitmap* newBmp = TheManager->Create(&newBmpInfo);
bmtex->RenderBitmap(GetCOREInterface()->GetTime(), newBmp, 1.0, TRUE); //This will fail if newBmpInfo is of BMM_TRUE_24 type
newBmp->OpenOutput(&newBmpInfo);
newBmp->Write(&newBmpInfo);
nnewBmp->DeleteThis();

 

I then checked renderMap in maxscript and it seems to work alright for _24 types. Any pointers to achieve similar in C++?

Tags (3)
Labels (3)
4 REPLIES 4
Message 2 of 5
denisT.MaxDoctor
in reply to: Anonymous

accoding to SDK <bitmap.h>:

//-- Information Only

#define BMM_TRUE_24              8    //!< 24-bit color: 8 bits each for Red, Green, and Blue. Cannot be written to.
#define BMM_TRUE_48              9    //!< 48-bit color: 16 bits each for Red, Green, and Blue. Cannot be written to.
Message 3 of 5

there is no point in rendering in 24, as well as in 32. Render in 64, and then save it in any file format you need

Message 4 of 5
Anonymous
in reply to: Anonymous

I am trying to resize texture bitmap using RenderBitmap 

Some files don't have alpha info, and using 32 or 64 will add another channel in the default files which will increase the size of the texture on the disk. What do you think?

Message 5 of 5
denisT.MaxDoctor
in reply to: Anonymous

it is up to you how to save the bitmap to a file. For example, if you save a 64-bit bitmap as a BMP file, it will still be saved as 24-bit. If you are saving as TIF, you have the option to save with or without alpha channel. etc..

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report