Sign in to follow this  
nail85

3DS Max SDK and FX shader materials

Recommended Posts

Hi all. I don't know if someone even had this problem, but... I wrote an export plugin for 3ds max 8 which is based on 3DXI (former name is IGame). All works fine untill I have an object in scene which have "Direct3D9 FX Shader" material. If I'll use built-in fx "blend_dxsas", "fur", "HammerTime" my plugin crashes at very beginning on 3DXI initialization (!) with Access Violation error:
IGameScene* p3DXI = GetIGameInterface();

IGameConversionManager* cm = GetConversionManager();
cm->SetCoordSystem(IGameConversionManager::IGAME_D3D);
p3DXI->InitialiseIGame(m_exportSelection); // here
p3DXI->SetStaticFrame(0);
Other built-in FX'es work. Have anyone got this max bug? P.S. I discovered that one of the reasons is letter case in technique description:
technique regular
{ 
    pass one 
    {		
	ZEnable = true;
	ZWriteEnable = true;
	alphablendenable = true;  // <<<<<<<
	SrcBlend		 = srcalpha;
	DestBlend		 = invsrcalpha;
	CullMode = none;
    }
}
doesn't works, but
technique regular
{ 
    pass one 
    {		
	ZEnable = true;
	ZWriteEnable = true;
	AlphaBlendEnable = true; // !!!!
	SrcBlend		 = srcalpha;
	DestBlend		 = invsrcalpha;
	CullMode = none;
    }
}
works!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this