Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualAuskennfuchs

Posted 14 May 2013 - 04:21 PM

The problem should be the hierarchy of your object. In your code-snippet you don't traverse the node-objects. In every node a local matrix is stored which you can use to transform your vertices. In the stl-file the matrices should all be an identity-matrix so your modell is displayed correctly without transforming. In .obj there should be differences.

In my own model-loader I'm also struggling with transforming the vertices with the local matrices. There are all interpreted but I think the local positions and matrices don't match in my case. Or my hierarchy is wrong.

So when you figured out how to display it correctly, you could post your code here.

 

Update: Your car.obj works fine in my application

2r7lpo8.png


#1Auskennfuchs

Posted 14 May 2013 - 11:23 AM

The problem should be the hierarchy of your object. In your code-snippet you don't traverse the node-objects. In every node a local matrix is stored which you can use to transform your vertices. In the stl-file the matrices should all be an identity-matrix so your modell is displayed correctly without transforming. In .obj there should be differences.

In my own model-loader I'm also struggling with transforming the vertices with the local matrices. There are all interpreted but I think the local positions and matrices don't match in my case. Or my hierarchy is wrong.

So when you figured out how to display it correctly, you could post your code here.


PARTNERS