Sign in to follow this  
Njguy

x file and effects

Recommended Posts

I am using blender. When you export a mesh to the directx file format, it saves many different things like the skinned mesh, materials etc. After I exported the direct x file, and opened it up in the DirectX Viewer which comes with the sdk, I noticed in the command line it said. material 0 - No effect instance specified. Reverting to the default effect. SAS: Loading effect 'Resource:#103' Does this mean that you can specify an effect file that will be saved/ exported in the x file format?? If so that would be awesome. Any ideas??

Share this post


Link to post
Share on other sites
Ok, so I know for a fact now that the x file format can call on effect files. The meshes that come with the sdk actually do this. Now how do you do it is the question. Does anyone know if nvidia fxcomposer can change an imported mesh to do this???

Share this post


Link to post
Share on other sites
I think you could use something like FXComposer to create your effect(or you /could/ just use plain old Notepade), and then apply it to your mesh as a material in 3DSMax/Maya, and export it to a .X mesh. Never done it myself though.

Share this post


Link to post
Share on other sites
Has anyone used effect instancing in the direct x file???

Here is an example of an effect instance from a direct x fiel included in the sdk. This is in the .x file. This is vital for my project, but I do not know how to set an effect to a material. Nor do I know what the EffectParam features do. I could really use some help.


EffectInstance {
"reflect.fx";
EffectParamString {
"g_txScene";
"Weapons.dds";
}
EffectParamString {
"g_txEnvMap";
"Lobby\\LobbyCube.dds";
}
EffectParamFloats {
"Diffuse";
4;
1.000000,1.000000,1.000000,1.000000;
}
EffectParamFloats {
"Specular";
4;
1.000000,1.000000,1.000000,1.000000;
}
EffectParamFloats {
"Reflectivity";
1;
0.800000;
}
EffectParamFloats {
"Power";
1;
20.000000;
}
}

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