Updatring DirectX Shader Materials PBBitmap from Utility plugin

Updatring DirectX Shader Materials PBBitmap from Utility plugin

kevin.kelley
Explorer Explorer
511 Views
1 Reply
Message 1 of 2

Updatring DirectX Shader Materials PBBitmap from Utility plugin

kevin.kelley
Explorer
Explorer

I am trying to update 'PBBitmap->bm' from a utiliy plugin and cant get it to work.

The utility plugin can update Standard Materials subtexture 'Bitmap' no problem.

I'm updateing the Bitmap with 'PutPixels'  to a Bitmap*, i get the Bitmap * this way:

 

Bitmap *bm = ((BitmapTex*) Texmap)->GetBitmap(i);

 

Then execute this code:

StdMtl->EnableMap(i, TRUE);
StdMtl->SetMtlFlag(MTL_TEX_DISPLAY_ENABLED | MTL_SUB_DISPLAY_ENABLED);

 

and the bitmap updates in the view port.

 

 

I'm trying to update the Bitmap from a DirectX Shader Material like this:

PBBitmap *ptrBitmap = IDxMaterial->GetEffectBitmap(i);

 

/* Do my 'PutPixels' to 'myBitmap'*/

 

ptrBitmap.bm->CopyImage(myBitmap, COPY_IMAGE_CROP,0);
IDxMaterial->SetEffectBitmap(i,&ptrBitmap);

 

But the bitmap does not update.

I have tried directly doing 'ptrBitmap.bm->PutPixels()' with no luck.

 

What am i missing ?

Is there something I need to do to notify the IDxMaterial that an Effect texture has been modified ?

 

Thanks for any help, been working on this for a few days with no luck.

0 Likes
512 Views
1 Reply
Reply (1)
Message 2 of 2

kevin.kelley
Explorer
Explorer

I can not get IDxMaterial->SetEffectBitmap(i,&bm) to set/update a texture, Autodesk, is this broken ?

 

I have found a work around, I have tested IDX9DataBridge and can set/update textures through IHardwareMaterial.

 

0 Likes