Maya2egg supports multitexture assignments?

Does maya2egg support the assignment of multiple textures to multiple UV sets in maya so that things like static decals do not have to be added manually with a set_texture call?

Edit: Do egg files even support texture stage/UV set assignments?

Edit2: Hmm, I can’t seem to even get maya2egg to export UV sets beyond the default set. I have 2 UV sets defined in maya, “map1”(default) and “decal”. Only one set is defined in my egg file though :frowning:


<CoordinateSystem> { Y-Up }

<Comment> {
  "maya2egg65 cube.mb cube.egg"
}
<Group> groundPlane_transform {
}
<Group> cube {
  <VertexPool> cubeShape.verts {
    <Vertex> 1 {
      -0.5 -0.5 0.5
      <UV> { 0 0 }
      <Normal> { 0 0 1 }
      <RGBA> { 0.5 0.5 0.5 1 }
    }
    <Vertex> 2 {
      0.5 -0.5 0.5
      <UV> { 1 0 }
      <Normal> { 0 0 1 }
      <RGBA> { 0.5 0.5 0.5 1 }
    }
    <Vertex> 3 {
      0.5 0.5 0.5
      <UV> { 1 1 }
      <Normal> { 0 0 1 }
      <RGBA> { 0.5 0.5 0.5 1 }
    }
    
...

I don’t think the version of maya2egg that is distributed with Panda3D 1.0 supports multitexture assignments or multiple UV sets. However, we have support for this on the cvs trunk now, and it will be distributed with the eventual release of Panda3D 1.1. You can also try to check it out and build it yourself if you are industrious; there are instructions elsewhere in the forum and in the manual.

The egg file syntax, however, does support multiple UV sets. See the reference to the syntax document in the Panda3D manual for the syntax if you’re curious.

David

Ok, I played with the new maya2egg and I got multiple UV sets to export into my .egg. The problem I have now is that my texture references aren’t getting exported. Im currently using a layered texture node in maya to preview a multitextured material. It was the simplest way that I knew about how to put multiple textures on an object. Unfortunately, i don’t think maya2egg reads a layered texture node for texture file info. What kind of texture/material setup should I use in maya so that maya2egg will properly assign multiple UV sets to multiple texture files?

I don’t honestly know what it looks like to the Maya user. Inside the Maya API, there are multiple connections to the “color” plug (or sometimes the “outColor” plug) on an object’s surface shader. Each connection can define a separate texture.

Does that help?

What is a “layered texture” in Maya? It sounds like we should make maya2egg support that as well.

David

The problem with maya shaders is that they usually don’t take multiple color/texture connections. The ones that do take multiple color connections aren’t being read right by maya2egg. The maya layered texture seems like a good thing to support because you can define multiple textures files, their layering(or stages) and which UV sets they are linked to. Plus, the preview in maya should be pretty close to what it will look like in panda. Perhaps there some artists at VR that might know how to setup an object in maya with correct multitexture definitions that will work with maya2egg?