3 texture coords

What does it mean when there are three texture coordinates in a 3D model and there is not 6 textures for cube map?

I have found more info about third coordinate and I think this is UVW mapping. But I cannot find how to do this.

Try to explain your problem in a few more words.

Cube map texture is a special texture that contains 6 square 2D textures arranged as a cube faces. This texture is addressed by 3-element vector pointing from texture “center” to selected texture location. OGL automatically detects which face should be sampled (by determining largest vector element), than calculates 2d coordinates into that selected face.
http://www.nvidia.com/object/cube_map_ogl_tutorial.html

Yes, I know it, but my model has not 6 textures.
I am writing Collada importer, some Collada models have stp texture coordinates. And I don`t know what to do with the third coordinate in my shader. But there are artifacts of the models and I cannot understand why, but after reading the description of UVW mapping, I realized that it may be a reason. I can not find anywhere an explanation of programming UVW mapping to implement it and make my models look good.
Briefly:

  • There is a mesh with a single array of texture coordinates. There are 3 float value for each vertex.
  • There is one texture image.
    Question:
    What are the options of using the third coordinate?

“it depends”
If these are 3D textures, then use
glTexCoord3d*(u,v,w);
If these are 2D textures with homogenous coordinates, use instead
glTexCoord4d*(u,v,0,w);
http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml

Yes, thank you. How I must use this coords in the shader.
What is homogenous coordinates?

Perhaps you should take this up with the person who created the model. They put 3 texture coordinates there; they either don’t really know how to use their modelling package (in which case you should just ignore the third), or they have something specific in mind for these coordinates.

Yeh, you are right, but I cannot and I suppose that when there is not 3D texture, all 3ds max generated models, which have STP coordinates with the same meaning.

Zbuffer supposes that there is two variants.
I think I need the second one.
Do you know how to implement this on GLSL?

Yeh, you are right, but I cannot

So you’re using a model from someone you can’t contact, that has data who’s meaning you don’t understand. And you expect to be able to do something with this?

I think I need the second one.

Why do you think that? If you don’t know what the texture coordinates mean, you cannot effectively use them.

In general, using a fourth component of a texture coordinate means using projective texturing. That’s usually not something you write explicitly into texture coordinates.

Have you looked at the values? What does the third component look like? Is there a pattern?

And I want to know the meaning.
From all that I have heard projective texturing is most suitable.
What is projective texturing?

Here is model in DAE format:
http://www.speedyshare.com/files/28222811/clown.rar
If you have not Collada importer, look at this snippet:
<mesh>
<source id=“geom-Line01-positions”>
<float_array id=“geom-Line01-positions-array” count=“3969”>-4.574107 9.329709 0.08463868 -0.4054546 8.766739 1.292424 1.775585 8.825006 0.075146 2.263489 6.411057 0.1705481 …</float_array>
<technique_common>
<accessor source=“#geom-Line01-normals-array” count=“2944” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“geom-Line01-normals”>
<float_array id=“geom-Line01-normals-array” count=“8832”>0.03413525 0.9753383 0.2180594 0.06667629 0.979407 …</float_array>
<technique_common>
<accessor source=“#geom-Line01-normals-array” count=“2944” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“geom-Line01-map1”>
<float_array id=“geom-Line01-map1-array” count=“4704”>0.7679129 0.9745173 0.5042325 0.7959707 0.9707325 0.56463 0.8106505 0.9711242 0.5037578 0.8139344 0.954895 0.5085286 0.8090085 0.9120827 0.5159985 0.8043709 0.8602077 0.5033876 0.8214802 0.8594028 0.5001622 0.8328388 0.8622966 0.5 0.8367841 0.8614986 0.5 0.8301358 0.8596589 0.5 0.8179256 0.8579739 0.5003169 0.800105 0.8595144 …</float_array>
<technique_common>
<accessor source=“#geom-Line01-map1-array” count=“1568” stride=“3”>
<param name=“S” type=“float”/>
<param name=“T” type=“float”/>
<param name=“P” type=“float”/>
</accessor>
</technique_common>
</source>
<vertices id=“geom-Line01-vertices”>
<input semantic=“POSITION” source=“#geom-Line01-positions”/>
</vertices>
<triangles material=“Material__166_1” count=“1302”>
<input semantic=“VERTEX” source=“#geom-Line01-vertices” offset=“0”/>
<input semantic=“NORMAL” source=“#geom-Line01-normals” offset=“1”/>
<input semantic=“TEXCOORD” source=“#geom-Line01-map1” offset=“2” set=“0”/>
<p>0 0 0 1 1 …</p>
</triangles>
<triangles material=“klown1” count=“1032”>
<input semantic=“VERTEX” source=“#geom-Line01-vertices” offset=“0”/>
<input semantic=“NORMAL” source=“#geom-Line01-normals” offset=“1”/>
<input semantic=“TEXCOORD” source=“#geom-Line01-map1” offset=“2” set=“0”/>
<p>140 162 517 …</p>
</triangles>
</mesh>
Look at this images, I’ve highlighted in red artifacts with normals.
http://img812.imageshack.us/i/12873161.jpg/
http://img838.imageshack.us/i/62730043.jpg/
http://img864.imageshack.us/i/42652255.jpg/
The third image:
I look to the back of his jacket.
And thus it becomes clear why he is black, when it was sent to the light.
Normal looking in the opposite direction. It is not an importer bug with normal and it is not a modeler mistake, because when I look at this model in 3DS Max, the light is proper. Only what was not failed to take into account, this is the third texture coordinates.

Hmm, the normal orientation have nothing to do with tex coords.
Did you try each of the solutions I proposed ? The second indeed is a better candidate.

Yes, I ve tryed, it does not help, but thank you.
I found an error, it is an exporter bag.