x file and effects

Started by
5 comments, last by Njguy 15 years, 6 months ago
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??
Advertisement
anyone...
I believe so, i think you can have an effect(.fx file) for each 'subset' of the mesh, and yes, 'tis awsome.

[Edited by - fitfool on October 11, 2008 9:05:58 PM]
so does anyone know how to go about doing it???
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???
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.
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;
}
}

This topic is closed to new replies.

Advertisement