Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


#ActualSponji

Posted 06 April 2013 - 11:21 AM

There are at least two bugs in your model loading code:

 

line.startsWith("v")

What happens to lines with which start with "vn"? "vn" startsWith "v". This doesn't really matter right now, but you get unnecessary vertices, which are actually normals.

 

tempVertexIndices.add(Short.valueOf(tokens[i + 1].split("/")[0]));

You have to subtract one from the index numbers, because obj format starts counting indices from 1 instead of 0.

 

Hope this helps.


#3Sponji

Posted 06 April 2013 - 11:20 AM

There are at least two bugs in your model loading code:

 

line.startsWith("v")

What happens to lines with which start with "vn"? "vn" startsWith "v". This doesn't really matter right now, but you get unnecessary vertices, which are actually normals.

 

tempVertexIndices.add(Short.valueOf(tokens[i + 1].split("/")[0]));

You have to subtract one from the index numbers, because obj format starts counting indices from 1 instead of 0.

 

 

Hope this helps.


#2Sponji

Posted 06 April 2013 - 11:20 AM

There are at least two bugs in your model loading code:

ine.startsWith("v")

What happens to lines with which start with "vn"? "vn" startsWith "v". This doesn't really matter right now, but you get unnecessary vertices, which are actually normals.

tempVertexIndices.add(Short.valueOf(tokens[i + 1].split("/")[0]));

You have to subtract one from the index numbers, because obj format starts counting indices from 1 instead of 0.

 

Hope this helps.


#1Sponji

Posted 06 April 2013 - 11:19 AM

There are at least two bugs in your model loading code:

 

 

line.startsWith("v")

What happens to lines with which start with "vn"? "vn" startsWith "v". This doesn't really matter right now, but you get unnecessary vertices, which are actually normals.

 

tempVertexIndices.add(Short.valueOf(tokens[i + 1].split("/")[0]));

You have to subtract one from the index numbers, because obj format starts counting indices from 1 instead of 0.

 

Hope this helps.


PARTNERS