Followers 0

# DX11 DX11 Assimp - Mesh got messed up!

## 4 posts in this topic

All right guys,

I've been using Assimp for a while now and in most of the cases it works fine! But then this happened:

View from the Assimp viewer:

Post processing:

const aiScene* scene = importer.ReadFile( pFile,
aiProcess_GenNormals			 |
aiProcess_CalcTangentSpace       |
aiProcess_GenUVCoords            |
aiProcess_Triangulate            |
aiProcess_FlipUVs				 |
aiProcess_TransformUVCoords      |
aiProcess_SortByPType);


Now I don't think there's anything wrong with my other code as many previous examples worked perfectly!

Now this may be a bit vein, but does anybody know what could be the problem? (BTW. In Assimp, that model is the huge cube in my program)

0

##### Share on other sites

Which version of Assimp are you using? You should compile the library from the latest code from the svn, as they don't release all that often. They've also done work on the obj importer recently.

If it still doesn't work, it would be worth asking them directly on the sourceforge project's help forum, and provide the file that's causing you trouble.

0

##### Share on other sites

There are 2 possibilities of what happens in Assimp Viewer:

2. Assimp auto-generated normals using some smoothing angle which was too high and it ended up horrible

I'm not sure what I'm seeing in your program though. Are you sure model isn't simply upside down? It seems to contain more than 1 mesh, do you join vertex and index buffers correctly? (assuming you do that)

0

##### Share on other sites

Okay,

first of all I'm using v3.0.

So i tried to inverse the normals, but no luck.

And no, the model isn't inverse...

Sorry guys, that's the best i can give you, and I know my multiple mesh renderer works as I've usen it before.

0

##### Share on other sites

Oh well,

last night I was messing around with some code and then somehow I fixed the bug, I believe that the bug was part of my engine, sorry to bother you guys!

But thanks!

0

## Create an account

Register a new account

Followers 0

• ### Similar Content

• hi, guys, how to understand the math used in CDXUTDirectionWidget ::UpdateLightDir
the  following code snippet is taken from MS DXTU source code

D3DXMATRIX mInvView;
D3DXMatrixInverse( &mInvView, NULL, &m_mView );
mInvView._41 = mInvView._42 = mInvView._43 = 0;
D3DXMATRIX mLastRotInv;
D3DXMatrixInverse( &mLastRotInv, NULL, &m_mRotSnapshot );
D3DXMATRIX mRot = *m_ArcBall.GetRotationMatrix();
m_mRotSnapshot = mRot;
// Accumulate the delta of the arcball's rotation in view space.
// Note that per-frame delta rotations could be problematic over long periods of time.
m_mRot *= m_mView * mLastRotInv * mRot * mInvView;
// Since we're accumulating delta rotations, we need to orthonormalize
// the matrix to prevent eventual matrix skew
D3DXVECTOR3* pXBasis = ( D3DXVECTOR3* )&m_mRot._11;
D3DXVECTOR3* pYBasis = ( D3DXVECTOR3* )&m_mRot._21;
D3DXVECTOR3* pZBasis = ( D3DXVECTOR3* )&m_mRot._31;
D3DXVec3Normalize( pXBasis, pXBasis );
D3DXVec3Cross( pYBasis, pZBasis, pXBasis );
D3DXVec3Normalize( pYBasis, pYBasis );
D3DXVec3Cross( pZBasis, pXBasis, pYBasis );

https://github.com/Microsoft/DXUT/blob/master/Optional/DXUTcamera.cpp
• By YixunLiu
Hi,
I have a surface mesh and I want to use a cone to cut a hole on the surface mesh.
Anybody know a fast method to calculate the intersected boundary of these two geometries?

Thanks.

YL

• By hiya83
Hi, I tried searching for this but either I failed or couldn't find anything. I know there's D11/D12 interop and there are extensions for GL/D11 (though not very efficient). I was wondering if there's any Vulkan/D11 or Vulkan/D12 interop?
Thanks!

• Hi Guys,
I am just wondering if it is possible to acquire the address of the backbuffer if an API (based on DX11) only exposes the 'device' and 'context' pointers?
Any advice would be greatly appreciated

• bool InitDirect3D::Init() { if (!D3DApp::Init()) { return false; } //Additional Initialization //Disable Alt+Enter Fullscreen Toggle shortkey IDXGIFactory* factory; CreateDXGIFactory(__uuidof(IDXGIFactory), reinterpret_cast<void**>(&factory)); factory->MakeWindowAssociation(mhWindow, DXGI_MWA_NO_WINDOW_CHANGES); factory->Release(); return true; }
As stated on the title and displayed on the code above, regardless of it Alt+Enter still takes effect...
I recall something from the book during the swapChain creation, where in order to create it one has to use the same factory used to create the ID3D11Device, therefore I tested and indeed using that same factory indeed it work.
How is that one particular factory related to my window and how come the MakeWindowAssociation won't take effect with a newly created factory?
Also what's even the point of being able to create this Factories if they won't work,?(except from that one associated with the ID3D11Device)

• 12
• 28
• 14
• 11
• 36