Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKaptein

Posted 24 October 2012 - 01:38 PM

no, you are unfortunately not missing anything..
you have 6 faces, with 4 vertices each, and those 6 faces each have a different normal, that means you can't have shared vertices...
it's the unfortunate reality of todays rasterizers
you can however use points to define them, if all the vertices that share the same face (and normal) have the exact same attributes
this is how we can sometimes use geometry shaders to emit these faces with just 1 point (or at least, i think so)

anyways, there comes a day when you want to have different values for each vertex even sharing the same face
and so your boxes will never (ever) have shared vertices.. unless you cheat and average the normals
i can't tell you how that will look, other than that i probably couldn't live with it personally Posted Image

i'm sure other people can give you some other alternatives, but these are the only 3 alternatives i know of
averaging normals is ok on larger meshes or models to get smooth lighting
your box just doesn't have enough surface points to use smooth normals on, and so it doesn't support shared vertices (indices)

#1Kaptein

Posted 24 October 2012 - 01:33 PM

no, you are unfortunately not missing anything..
you have 6 faces, with 4 vertices each, and those 6 faces each have a different normal, that means you can't have shared vertices...
it's the unfortunate reality of todays rasterizers
you can however use points to define them, if all the vertices that share the same face (and normal) have the exact same attributes
this is how we can sometimes use geometry shaders to emit these faces with just 1 point (or at least, i think so)

anyways, there comes a day when you want to have different values for each vertex even sharing the same face
and so your boxes will never (ever) have shared vertices.. unless you cheat and average the normals
i can't tell you how that will look, other than that i probably couldn't live with it personally :)

i'm sure other people can give you some other alternatives, but these are the only 3 alternatives i know of
averaging normals is ok on larger meshes or models to get smooth lighting
your box just doesn't have enough surface to use smooth normals on

PARTNERS