Commit 5764ddb9 authored by Andrey Filippov's avatar Andrey Filippov

fixed obj normals

parent 77c78973
......@@ -1562,7 +1562,7 @@ public class TileProcessor {
// scan.restoreKeepTileOpDisparity();// it is not used from this scan, but from last_scan
continue;
}
if (debugLevel > -2){
if (debugLevel > -10){
System.out.println("prepareExpandVariants(): remaining "+num_left+" tiles to be processed, used variant "+num_var+" ("+num_left+")");
}
int [] rslt = {num_left, num_var};
......
......@@ -133,9 +133,13 @@ map_Kd 1488240527_408296-img2-texture.png
// output all triangles (faces)
for (int i = 0; i < triangles.length; i++){
obj_writer.write(String.format("f %d/%d %d/%d %d/%d\n",
triangles[i][0]+v_index,triangles[i][0]+vt_index, // actually v_index and vt_index should =be the same
triangles[i][1]+v_index,triangles[i][1]+vt_index,
triangles[i][2]+v_index,triangles[i][2]+vt_index));
/// triangles[i][0]+v_index,triangles[i][0]+vt_index, // actually v_index and vt_index should =be the same
/// triangles[i][1]+v_index,triangles[i][1]+vt_index,
/// triangles[i][2]+v_index,triangles[i][2]+vt_index));
// wrong normals
triangles[i][2]+v_index,triangles[i][2]+vt_index, // actually v_index and vt_index should =be the same
triangles[i][1]+v_index,triangles[i][1]+vt_index,
triangles[i][0]+v_index,triangles[i][0]+vt_index));
}
obj_writer.write("# end of material "+ material_id+"\n");
obj_writer.write("# vertices: "+ coordinate.length+"\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment