[Help] It seems not smooth

Started by
1 comment, last by eastwood20 14 years, 10 months ago
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. Phong Lighting 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?
Advertisement
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?
Adventures of a Pro & Hobby Games Programmer - http://neilo-gd.blogspot.com/Twitter - http://twitter.com/neilogd
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.

This topic is closed to new replies.

Advertisement