Sign in to follow this  
eastwood20

[Help] It seems not smooth

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this