   Transparency in Mesh
  HI all,I'm rendering a mesh in D3D9 using .x file. Associated textures are in .tga format.Can anybody please help me in making the mesh semi transparent or giving transparency control. i want it to be blend it to framebuffer, i.e. after transparency i should be able to see whats there at the back of my model.Thanks,him   
  Hi,Obtain all D3DMATERIAL9 objects of your mesh, change .a parameter of each D3DMATERIAL9 object's Diffuse parameter to a value smaller than 1.0f (e.g. 0.6). Then;* set D3DRS_ALPHABLENDENABLE render state to TRUE* set D3DRS_SRCBLEND render state to D3DBLEND_SRCALPHA* set D3DRS_DESTBLEND render state to D3DBLEND_INVSRCALPHA.* Draw your mesh* Do not remember to set D3DRS_ALPHABLENDENABLE render state to FALSE.Your mesh will be rendered transparent correctly as you expected if you render it "at last".hth.Rohat.   ;  Hi, I did the same as you stated above.. but nothing seems to be happening.... :(here is part of my code:g_pd3dDevice->BeginScene();for (DWORD i=0; i<numMaterials; i++){g_pd3dDevice->SetMaterial(&meshMaterials);g_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );   g_pd3dDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );g_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); // Set the material and texture for this subsetg_pd3dDevice->SetTexture(0,meshTextures); // Draw the mesh subset   mesh->DrawSubset( i ); }g_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );g_pd3dDevice->EndScene();;  What's the result?Has your mesh been rendered opaque? Or you see nothing (i.e. black screen or something like that)?Another question: How about your mesh materials? You must change the .a parameter of Diffuse component to a value lower than 1.0.Look://In your mesh loader function:void LoadMyMesh (blah blah blah){    //Your load code goes here!    //After loading completed:    for (UINT m = 0; m < numMaterials; m++)   meshMaterials[m].Diffuse.a = 0.4f; //for example}//Your render code:void RenderMyMesh (blah blah blah){    //The same rendering code you wrote goes here!}Hope this helps.Rohat.   ;  My mesh is appearing fine. but there is no transparency is coming.I did change the alpha values of diffuse to less than 1 but again the opaque mesh is coming.Is some different approach also for getting the transparency?Thanks for your replyhim   