yvonneysf / opencollada

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

library_images does not contain every texture used in a CGFX shader #114

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a material with a CGFX file that uses more than one absolute path 
texture.
2. Apply to an object
3. Export

What is the expected output? What do you see instead?

I expect to see each texture used have an entry in the library_images, and be 
correctly referenced from the appropriate material/effect/shader.

I see a single entry in library_images, and every material/effect references 
this one image.
EXCEPTION: if copy textures is set, then all textures correctly appear, 
however, they are not copied and so the path name is then wrong.

What version of the product are you using? On what operating system?

openCollada Maya ReleasePlugin2011 under windows XP
OpenCOLLADA_Maya_1.3.0rc1.7z

Please provide any additional information below.

it looks like the error is introduced on or around line 1130 of 
COLLADAMayaHwShaderExporter.cpp
Changing 

       COLLADASW::URI sourceFileUri ( shaderFxFileUri, fileName );
to

    COLLADASW::URI sourceFileUri (COLLADASW::URI::nativePathToUri (fileName));

somewhat alleviates the problem, but the resulting paths are wrong =\
(but at least every image now gets exported)

I have attached a CGFX file that exhibits these problems.
The textures are not included and will need to be remapped to existing textures 
before export.

Original issue reported on code.google.com by martin.b...@gmail.com on 30 Sep 2010 at 4:16

Attachments:

GoogleCodeExporter commented 8 years ago
Additionally, once you have all the textures coming out in the library_images, 
in ColladaMayaEffectTextureExporter.cpp, line 541, you need to pass true to the 
ignoreCase parameter, like so:

 COLLADASW::URI targetUri = sourceUri.getRelativeTo ( targetColladaUri, success, true );

in order to get a properly relative path.

Original comment by martin.b...@gmail.com on 30 Sep 2010 at 4:40

GoogleCodeExporter commented 8 years ago

Original comment by opencollada2@googlemail.com on 25 Jan 2011 at 12:45