lesliejaneth / opencollada

Automatically exported from code.google.com/p/opencollada
0 stars 0 forks source link

DirectX material properties not exported #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Open 3dsMax
2. Create some object
3. Open materials dialog
4. change material type from "standard" to DirectX
5. change material properties.
6. assign material
7. export
8. you will see only original MAX material properties.

Original issue reported on code.google.com by denis.o...@gmail.com on 23 Nov 2009 at 8:31

GoogleCodeExporter commented 8 years ago
We will add  DirectX support in future.

Original comment by opencollada2@googlemail.com on 24 Nov 2009 at 8:29

GoogleCodeExporter commented 8 years ago

Original comment by opencollada2@googlemail.com on 19 Jan 2011 at 1:45

GoogleCodeExporter commented 8 years ago
PS: I can code fix, if some one points me place in MaxAPI to watch :) it's non 
intuitive conserning extendent materials :\

Original comment by denis.o...@gmail.com on 19 Jan 2011 at 1:52

GoogleCodeExporter commented 8 years ago
It would be nice if you could spend some time to code a fix.

Actually I am not an expert when Max materials are concerned, by I here are 
some information that might help to get into this topic.

In EffectExporter::exportSimpleEffect there is already a check if a material is 
a DirectX material:
        IDxMaterial* dxm = static_cast<IDxMaterial*> ( baseMaterial->GetInterface( IDXMATERIAL_INTERFACE ) );

The IDxMaterial interface seems to be the right one to retrieve data from a 
directX material.

I have also found the following usages of this interface in the Max SDK samples:
samples\modifiers\uvwunwrap\unwrap.cpp
samples\utilities\collector\collector.cpp
samples\utilities\mappath\mappath.cpp

These might be helpful, too. 

Original comment by opencollada2@googlemail.com on 19 Jan 2011 at 4:21

GoogleCodeExporter commented 8 years ago
seems i found right peace of code: 
http://svn.kwxport.org/kwxport/trunk/kwxport/exportmain.cpp

lines from:
"IParamBlock2 *fxpb = materials[i].first->GetMaxMaterial()->GetParamBlock(0);"

Do you still need my help? :)

Original comment by denis.o...@gmail.com on 19 Jan 2011 at 5:42