mrdoob/three.js — Issue #1282: UV Map seems inverted 
Author: brez
Created: 2012-02-09 00:16:45+00:00
State: open

So I've been trying to get C4D models exported to Three.js and have had some luck but noticed that textures (UV) seem to be inverted - I've tried everything from messing with the UV coordinates to the winding order but haven't been able to understand why this is happening.. Take a look:

Screen shot from C4D:

![C4D](http://oi41.tinypic.com/10yjsax.jpg)

Screen shot of exported /textured face4:

![Three](http://oi41.tinypic.com/egcmyt.jpg)

Here's the code:

var scope = this;

THREE.Geometry.call(this);

v( 7.314196, 0.544241, -24.803610 );
v( 48.039492, 0.544241, -17.803610 );
v( 48.039492, -25.607081, -24.803610 );
v( 7.314196, -25.607081, -24.803610 );
v( 7.314196, 0.544241, -17.803610 );
v( 48.039492, 0.544241, -24.803610 );

f4( 0, 4, 1, 5 );
uv( 0.989387, 0.991138, 0.787198, 0.991138, 0.787198, 0.008862, 0.989387, 0.008862);
f4( 2, 3, 0, 5 );
uv( 0.765972, 0.008862, 0.765972, 0.991138, 0.010613, 0.991138, 0.010613, 0.008862);

this.computeCentroids();
this.computeFaceNormals();

function v( x, y, z ) {
scope.vertices.push( new THREE.Vertex( new THREE.Vector3( x, y, z ) ) );
}
function f3( a, b, c, nx, ny, nz ) {
scope.faces.push( new THREE.Face3( a, c, b, nx && ny && nz ? new THREE.Vector3( nx, ny, nz ) : null ) );
}
function f4( a, b, c, d, nx, ny, nz ) {
scope.faces.push( new THREE.Face4( a, b, c, d, nx && ny && nz ? new THREE.Vector3( nx, ny, nz ) : null ) );
}
function uv( u1, v1, u2, v2, u3, v3, u4, v4 ) {
var uv = [];
uv.push( new THREE.UV( u1, v1 ) );
uv.push( new THREE.UV( u2, v2 ) );
uv.push( new THREE.UV( u3, v3 ) );
if ( u4 && v4 ) uv.push( new THREE.UV( u4, v4 ) );
scope.faceVertexUvs[ 0 ].push( uv );
}

Truncated but you can get the gist - after looking it for a while I can't see anything wrong - but thought maybe someone might seem something obvious that I'm doing wrong.. ?

Thanks