Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / partial alpha's not showing up correctly
  RSS 2.0 ATOM  

partial alpha's not showing up correctly
Rate this thread
 
34019
 
Permlink of this thread  
avatar
  • NoKKiE
  • Posted: 03 September 2009 08:04 AM
  • Total Posts: 6
  • Joined: 13 November 2008 04:34 AM

Hey everyone, I’m trying to simply create a plane and then set a texture to it from the SDK but for some reason partial alpha’s do not show up at all. It seems if there is any alpha at all, 3Ds Max will just view the pixel as full alpha. Everything else seems to show up correctly.

The strangest thing is that after I create the object and go to the Material Editor, all I have to do is Deselect and Select “Show Standard Map in Viewport” and all the alpha values will show up correctly. Shouldn’t that button be the same as setting the MTL_TEX_DISPLAY_ENABLED flag for the material from the Max SDK?

// Set The Texture
BitmapTexbitmapTexture NewDefaultBitmapTex()
bitmapTexture
->SetMapName( pictureFile )
bitmapTexture
->SetAlphaAsMono( TRUE )
bitmapTexture
->SetName( "pictureTexture" )
 
// Create a material to the node
StdMat2planeMat NewDefaultStdMat()
planeMat
->SetSubTexmap( ID_DIbitmapTexture )
planeMat
->SetSubTexmap( ID_OPbitmapTexture )
planeMat
->SetName( "pictureMaterial" )
planeMat
->SetActiveTexmap( bitmapTexture )

// set node
node->SetMtl( planeMat )

// Activate the Texture
ip->ActivateTexture( bitmapTextureplaneMat )
planeMat
->SetMtlFlag( MTL_DISPLAY_ENABLE_FLAGS )

Any ideas would be great



Replies: 0
avatar
  • NoKKiE
  • Posted: 10 September 2009 11:56 AM

Since no one is really responding I made some test images to show what is going on:

image.png : the test image, it just goes from blue fading out and fading back in
before.png: this is what the code outputs onto 3ds max
material.png: this is the view of the material editor (notice it shows up correctly in there)
after.png: After I select and Deselect “Show Standard Map in Viewport”



Attachment Attachment
Attachment Attachment
Attachment Attachment
Attachment Attachment
Replies: 0