Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Feb 2004
Offline Last Active Jul 17 2013 03:29 AM

Posts I've Made

In Topic: Assimp issue

13 May 2013 - 03:20 AM

Are the number of aiMeshes (mNumMeshes) the same when loading .obj and .stl? It looks like the wheels/lower parts of the mesh aren't rendered for .obj files.


Have you tried other 3d models than this one?

In Topic: Strange textures when loading md5 model in AssImp

12 May 2013 - 02:00 PM

It worked! Don't know how I managed to miss that. Thanks!

In Topic: Strange textures when loading md5 model in AssImp

11 May 2013 - 05:36 PM

I thought I went through this so thoroughly, but what do you know...

Seems like normal and texturecoords have been switched when creating the input layout. No wonder the "normals" affected the textures the way they did.

Many thanks for the advice! I'll check it out when I get home. My fingers are itching to fix this.

In Topic: Strange textures when loading md5 model in AssImp

11 May 2013 - 01:47 AM

Anyone know what the problem is?

In Topic: Strange textures when loading md5 model in AssImp

06 May 2013 - 02:03 AM

While testing I set the texture coordinates to always be 0.0f, 0.0f, and it didn't affect the result at all. Why doesn't changing the texture coordinates have any effect? I've tried using the same shader to render a simple textured square without loading it from AssImp, and the textures work.

The only way I got anything to change was to mess with the normals (switched z and y). At least all the textures didn't look as strange as they do in the screenshot. I never really got the textures to show properly though. I have aiProcess_MakeLeftHanded enabled, so the normals should be correct. I have also tried just about every parameter I can pass to the AssImp importer, without success.

I'm using these settings while importing:

const aiScene* scene = importer.ReadFile( inFilename,
aiProcess_CalcTangentSpace |
aiProcess_MakeLeftHanded |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
aiProcess_SortByPType |
aiProcess_FlipUVs |
aiProcess_GenSmoothNormals | 
aiProcess_RemoveRedundantMaterials  |
aiProcess_FlipWindingOrder );


I'm using the mesh Bob.md5mesh included with AssImp. The only change I've done to the model is that I converted the textures to DDS, but it works in AssImpView. Maybe I have to do something special with this model to get it to work with DirectX(11)?

I can of course provide the code or more screenshots showing the problem, if that would be of help. One good thing about all these problems is that I've gotten more understanding about texture coordinates, buffers etc. I'd really like this to just work soon though.

Edit: Added some more info.


When I switch the z and y normals, this happens: