Hi
I'm working on a Cal3d SceneNode and have come to a problem I don't completely understand.
the following screenshot should show a paladin wallking around.
notice the jitter on the skin? it seems that the triangles are drawn the wrong way (wrong rotation or something).
if i view the same paladin in the modelviewer provided with cal3d there's no problem
i'am using opengl in irrlicht and in the cal3d modelviewer but irrlicht seems to configure something that shuffels the vertex order?
eric (an irrlicht user) had the idea that it might have something to do with different coordinate systems - left-handed vs. right-handed. but i don't know where/how i can circumvent this.
if anyone has any idea where i could start looking for the error please let me know, i don't have any clue where i should start searching
thanks
tom
vertex ordering opengl cal3d
-
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
-
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
-
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
It was a type confusion with the vertex indextable. So, irrlicht is completely innocentjoy wrote:Could you shortly summerize what the solution or the mistake was?
In Cal3D you can get the index array for the faces with the following code
Code: Select all
CalIndex meshFaces[50000][3];
int faceCount =pCalRenderer->getFaces(&meshFaces[0][0]);
Well, it wasn't!
So, i decided to use an irrlicht meshbuffer and what do you think - it suddenly worked
Code: Select all
mb.Indices.clear();
for(int i=0; i<faceCount; ++i)
{
mb.Indices.push_back(meshFaces[i][0]);
mb.Indices.push_back(meshFaces[i][1]);
mb.Indices.push_back(meshFaces[i][2]);
}
this doesn't affect the rendering in the local way (triangle scattering or what ever) but in a global way, rotations are the oposit way round and vertecis are mirrored.
I hope this helps prevent similar errors
If i remember well , Cal3d is using D3D style matrix which is the opposite of OpenGL matrix
In one informations are given row by row and for the other they are given col by col.
Anyway, i would love to have a look on you cal3dscene node , did you use Server classes for Models Caching?
my mail is woody 66 G at AOL COM
In one informations are given row by row and for the other they are given col by col.
Anyway, i would love to have a look on you cal3dscene node , did you use Server classes for Models Caching?
my mail is woody 66 G at AOL COM
Why not put the code on the website ? http://www.eve-corp.com/ provides free hosting for irrlicht projects.
Tomasz Nowakowski
Openoko - www.openoko.pl
Openoko - www.openoko.pl