Jump to content
  • Advertisement
Sign in to follow this  
GENTS

Load EFFECTS within an X file

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

Hi friends! I'm in front of a new problem... While exporting a mesh from Maya with the new Exporter (December SDK), I could include DirectX shaders and FX files linking within an X File... Now I've only a little problem!!!!!!!! How can I import this effects directly loading mesh?! I've seen that the D3DXLoadMeshHierarchyFromX has a position for an EFFECT buffer so that someone could import and load effects in the same way I need... I've searched in the NET some examples, tutorials, articles, posts, but I've found anything... It's possible that anyone use portable effects in X files?! Thanks you all! Byez,

Share this post


Link to post
Share on other sites
Advertisement
In the X file MATERIAL is now something like this:



Material {
0.000000;0.000000;0.000000;0.000000;;
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;

EffectInstance {
".\\\\lambSkin_ps11_tex.fx";

EffectParamFloats {
"WorldIT";
16;
1.574955,
0.000000,
0.000000,
14.768572,
0.000000,
1.111118,
0.000000,
-12.419860,
0.000000,
0.000000,
1.574955,
1.587376,
0.000000,
0.000000,
0.000000,
1.000000;
}

EffectParamFloats {
"WorldViewProj";
16;
1.225400,
-0.078606,
-0.067600,
-0.067587,
0.000000,
1.640025,
-0.438313,
-0.438225,
0.150460,
0.640198,
0.550561,
0.550451,
-14.917331,
1.298546,
45.596375,
45.787235;
}

EffectParamFloats {
"World";
16;
0.634939,
0.000000,
0.000000,
0.000000,
0.000000,
0.899994,
0.000000,
0.000000,
0.000000,
0.000000,
0.634939,
0.000000,
-9.377137,
11.177803,
-1.007887,
1.000000;
}

EffectParamFloats {
"LightPos";
4;
13.000000,
141.000000,
-100.000000,
0.000000;
}

EffectParamFloats {
"AmbiColor";
4;
0.100000,
0.100000,
0.100000,
1.000000;
}

EffectParamFloats {
"DiffColor";
4;
0.900000,
1.000000,
0.900000,
1.000000;
}

EffectParamFloats {
"SpecColor";
4;
0.700000,
0.700000,
1.000000,
1.000000;
}

EffectParamFloats {
"SubColor";
4;
1.000000,
0.200000,
0.200000,
1.000000;
}

EffectParamFloats {
"RollOff";
1;
0.200000;
}

EffectParamString {
"ColorTexture";
".\\\\pelle.JPG";
}
}
}




How can I load with the function D3DXLoadSkinMeshFromXof() filling the

ID3DXBuffer *EffectBuffer = NULL;

and then apply those effects to different parts of the mesh in the X file?!

THANKS!

Share this post


Link to post
Share on other sites
Quote:
Original post by GENTS
I'm in front of a new problem... While exporting a mesh from Maya with the new Exporter (December SDK), I could include DirectX shaders and FX files linking within an X File...


Is there a new December SDK of DirectX? http://www.microsoft/directx/ and Downloads shows that the 9.0c is released the fourth september 2004... Since I've had problems with the exporter for maya 6 I was wondering if I'm missing something...

BTW: I still haven't gone back to work thats why I haven't been able to respond in the maya 6 exporter thread (if you were wondering :)

Share this post


Link to post
Share on other sites
Ok!!!
It's not so important whit which type of exporter you have exported meshes, but how can I load effects within an X file using some type of D3DXLoadSkinMeshFromXof() function...

I can't found solution to this problem... I've tried to write down some code but that doesn't work!!!

Could someone help me?!

THANKS!

BYEZ,

Share this post


Link to post
Share on other sites
So that's no solution to this problem?!

Does Microsoft have included a functionality un-useful?!

THANKS

Share this post


Link to post
Share on other sites
So if it's not possible to load effect saved in .X files, how is possible to use different effects for different part of the same mesh?!

THANKS,

Share this post


Link to post
Share on other sites
I've solved the problem by NOT exporting EFFECTS with the .X files and using normal textures or materials...

BUT THE PROBLEM STILL REMAINS!!!

Nobody know how to load these effects saved in .X files?!

Byez,

Share this post


Link to post
Share on other sites
Well when you call D3DXLoadSkinMeshFromXof it should return a buffer to the effects - one per attribute. You then load them. I am unsure of what the problem is with this - is it not loading them or not seeing them?

Share this post


Link to post
Share on other sites
I don't know exactly how to start to load effects within the .X file...

So when you've finished your tutorial, post here how to do that and I'll go to your website to take a look...

Thanks a lot ^__^

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!