.dae to.egg and UV

Hello!

I’m working on a simple model with an unique texture on it. I’m using the 3DS Max COLLADA exporter and then dae2egg to reconvert it to .egg. The problem is that the texture is not showed, but i know that it is loaded because of the color of the model changed.

It’s an UV problem, I think. I get the following warning from dae2egg.exe:

No uv set binding found for input set 0

In Max viewport it looks fine. How can I bind the uv to the model correctly? I have tried this with Softimage COLLADA exporter and I get the same result.

Thanks in advance!

Could you e-mail me your .dae file? Then I’ll try to fix the converter appropriately.

The default import/export plugin for max is known for its bugs, it has problems importing files that have been exported with the same plugin. Try OpenCollada.

Still it can be a bug in dae to egg.

Thank you for your responses.

I have already solved it manually editing the .egg file in a code editor. The uv name was not set in the vertices, so I changed this:

<Vertex> 0 {
  -0.369112 -0.369112 -0.4
  <UV> { 0.97697 0.049105 }
  <Normal> { -0.040093 -0.041507 -0.998333 }
}

for this:

<Vertex> 0 {
  -0.369112 -0.369112 -0.4
  <UV> CHANNEL0 { 0.97697 0.049105 }
  <Normal> { -0.040093 -0.041507 -0.998333 }
}

and now the texture is showed properly. rdb, I’ll send you my .dae file anyway so you can look inside if you like.

It worked perfectly. It seems that the problem was in the default max COLLADA exporter. Thank you!

Thanks for sending me the .dae file. It’s not valid, the fault is really in the exporter. However, I’ve added in a hack that should still allow it to be read correctly.

The latest Windows buildbot build includes my fix, could you install it and try it out, see if it’s fixed?

Sorry for my ignorance. Do you mean the FBX exporter available at the Autodesk web for download? It seems that there is a more recent version than mine.

I meant the devel version of the Panda3D SDK.

I have downloaded and installed the latest windows build SDK (#207). I exported my model from 3DS MAX and then used the dae2egg.exe included in the new version and it worked perfectly. :smiley:

Good job! And thanks for your help.

Edit:

Maybe is interesting to you yo know that now the texture replacement (model.setTexture(texture,1)) works fine with the default MAX exporter and don’t work with the Open COLLADA exporter (like it usually do). The model turns black. Well, it doesn’t affect my work by now, but maybe you wanted to know it.