Lower Level Models Information

So does panda support multiple texture coordinates. As in different channels of texture coordinates. It is common to have different coordinates in many games say one for the diffuse map and one of the a baked shadow map. Or you can store other things in the texture coordinate channels such as Tangent Vectors and BiNormal Vectors.

Both Maya and Max can export and import multiple coordinates but does Panda support this and how can you access it. Also can a model have different textures in different channels, IE. a diffuse map and a specular map? How do you access this?

Lastly is it possible to access vertex normals and/or smoothing groups?

Panda does support multiple texture coordinates; this is discussed briefly in the section of the manual called Multitexturing.

maya2egg converts multiple texture coordinates as they appear in the Maya file. I don’t know if max2egg supports multiple texture coordinates or not.

Panda does not currently support additional per-vertex data such as tangents and binormals, but this support is already in place in the development trunk and it will be released soon.

In order to use different texture channels for different purposes, you will have to write a custom shader that knows what each channel is for.

It is possible to access vertex normals, but this is currently clumsy, and the new upcoming interface will make this much easier. Smoothing groups are not stored explicitly, but are represented by storing the appropriate normal for each vertex.

David

I know we can change texture coordinates in Panda by passing different names to the appropriate TextureStage object. However, is there a way in Panda to have multiple texture coordinates in effect on the same vertex at the OpenGl level? So that in Cg we can meaningfully use semantics like TEXCOORD1 and so forth?

Yes; this is all part of the aforementioned document.

Any number of texture coordinate sets may be stored on a particular Geom; they are indexed by name, not by number. The texture coordinate sets are not hard-assigned to a particular numeric texture stage (e.g. TEXCOORD1 or TEXCOORD2) in the Geom, instead, Panda decides at render time the complete set of texture coordinates that are needed for a particular Geom, based on the TextureStages that are in effect; it then arranges the texture coordinate sets in the appropriate order at that time, also according to the TextureStages. Then it assigns the first texture coordinate set to GL_TEXTURE0, the second to GL_TEXTURE1, etc.

Note that both pieces are part of the equation: the Geom must already have one or more texture coordinate sets stored on it, and it must also have one or more TextureStages in effect on it that name one or more of the texture coordinate sets that are already stored on the Geom.

David