Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Exporting meshes from 3ds max with transparent textures

This topic is 5849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My artist has provided me with a few "x" meshes to test with including one with an alpha texture (bullet trail fading in to nothingness). Unfortunately, while the texture shows up on the mesh when displaying it, no alpha information seems to be being used (there is no transparent part). Do I need to make sure I have any specific render modes set for transparent textures from 3ds max to dispaly? My current render states looks like:
    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_MODULATE );
    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR );
    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR );

    // Set miscellaneous render states

    m_pd3dDevice->SetRenderState( D3DRS_DITHERENABLE,   FALSE );
    m_pd3dDevice->SetRenderState( D3DRS_SPECULARENABLE, FALSE );
    m_pd3dDevice->SetRenderState( D3DRS_ZENABLE,        TRUE );
    m_pd3dDevice->SetRenderState( D3DRS_AMBIENT,        0x00444444 );

	m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE,   TRUE );
	m_pd3dDevice->SetRenderState( D3DRS_ALPHATESTENABLE,   TRUE );
	m_pd3dDevice->SetRenderState( D3DRS_SRCBLEND,  D3DBLEND_SRCALPHA );
	m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );

Share this post

Link to post
Share on other sites
Where are the alpha information stored? In the texture or in the material? Also, what exporter are you using? There seems to be nothing wrong with your texture and render states.

My site

Share this post

Link to post
Share on other sites
From the artist:

Alpha was applied in the texture through a gradient.

She was using the default exporter (which upon further reading seems to not always export texture coordinates..another problem I'm having!).

I'm going to have her try with the panda exporter and see if it works better.

UPDATE: Got it working fine using 24-bit PNGs with an alpha channel. Thanks!


[edited by - onnel on September 14, 2002 2:53:43 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!