Jump to content
  • Advertisement
Sign in to follow this  
Njguy

x file and effects

This topic is 3561 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

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
Advertisement
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]

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
Sign in to follow this  

  • 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!