CgFX 'setparam' export problem in XSI 6.02, CW 2.05

Hi,

I’m wondering if anyone else has run into this problem, or whether I’m missing something obvious.

I’m using CgFX nodes in XSI 6.02 and using Crosswalk 2.05 to export to Collada.

In the exported file, most of our shader parameters are being set correctly through ‘setparam’ elements inside the ‘instance_effect’ element. However, as far as I can tell, the surface parameters are not being set correctly.

Inside the ‘profile_CG’ element, I have surface and sampler parameters such as:

<newparam sid=“ColorTexture0”>
<surface type=“2D”>
<init_from>default_image</init_from>
</surface>
</newparam>

<newparam sid=“ColorSampler0”>
<sampler2D>
<source>ColorTexture0</source>
</sampler2D>
</newparam>

On export, XSI generates a DAE file that contains this ‘setparam’ element in the ‘instance_effect’ element:

<setparam ref=“ColorTexture0”>
<sampler2D>
<source>test_tga_img</source>
</sampler2D>
</setparam>

It appears to be trying to set the surface parameter as if it were a sampler?

Shouldn’t it be something like this?

<setparam ref=“ColorTexture0”>
<surface>
<init_from>test_tga_img</init_from>
</surface>
</setparam>

If I’m not misunderstanding how setparam works, I’ll email XSI support, just thought someone might be able to give me some insight here first.

Thanks,

Andy