[Help] It seems not smooth
Hi everyone, I'm a new guy on graphics programming.
I just got a problem. Here is a pic shows the same model drawn in different enveriment.
They both using basic Phong Lighting Model with the same HLSL code.The uper one is drawn in my game, and another one is drawn in RenderMonkey. Obviously the car in my game seems not as smooth as another one.
I don't know why :( Maybe it is caused by some RenderState?
It looks to me like you are using face normals in game, rather than vertex normals. That is, the vertex normals are the same as the face normals. You might want to check your model loading code? Out of curiosity, which format are you using?
Yeah! You are right! Thank u!
Irrlicht engin always do the operation composeObject() when loading 3ds model.
Here is the reason:
mb->Vertices[vtxCount].Normal = pl.Normal;
mb->Vertices[vtxCount+1].Normal = pl.Normal;
mb->Vertices[vtxCount+2].Normal = pl.Normal;
The loader using face normal instead of vertex normal.
Irrlicht engin always do the operation composeObject() when loading 3ds model.
Here is the reason:
mb->Vertices[vtxCount].Normal = pl.Normal;
mb->Vertices[vtxCount+1].Normal = pl.Normal;
mb->Vertices[vtxCount+2].Normal = pl.Normal;
The loader using face normal instead of vertex normal.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement