Jump to content

  • Log In with Google      Sign In   
  • Create Account

DX11 Assimp - Mesh got messed up!


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Migi0027   Crossbones+   -  Reputation: 2117

Like
0Likes
Like

Posted 17 February 2013 - 08:35 AM

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:

 

neuywm.png

 

View from the Assimp viewer:

vr96s2.png

 

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)


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!

Sponsor:

#2 beans222   Members   -  Reputation: 1169

Like
0Likes
Like

Posted 17 February 2013 - 03:32 PM

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.


New C/C++ Build Tool 'Stir' (doesn't just generate Makefiles, it does the build): https://github.com/space222/stir

 


#3 Zaoshi Kaba   Crossbones+   -  Reputation: 4574

Like
0Likes
Like

Posted 17 February 2013 - 04:50 PM

There are 2 possibilities of what happens in Assimp Viewer:

  1. Your modelling software exported incorrect normals so your shading looks horrible
  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)



#4 Migi0027   Crossbones+   -  Reputation: 2117

Like
0Likes
Like

Posted 18 February 2013 - 01:00 PM

Okay, 

 

first of all I'm using v3.0.

 

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

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.


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!

#5 Migi0027   Crossbones+   -  Reputation: 2117

Like
0Likes
Like

Posted 18 February 2013 - 02:35 PM

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! wink.png

 

But thanks!


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS