I've been trying to better understand how the "Smooth angle" value works on polygon objects when either "Normal break" or "Constraint" is selected. To investigate this I created a "Ball" object with 8 longitudinal sections and 4 parallel sections and then flattened the top and bottom. There resulting shape looks like this:
This gives me a shape where all the sides have a common angle between the faces, but the top and bottom faces share a sharper angle with the sides. With a little math I determined that the angle between the vertex normals shared between one side face and another should be about 41.86 degrees and that the angle between a top face and a side face should be about 69 degrees.
Using this object, and starting with an angle setting of 30 degrees I watched the display as I stepping the value up one by one. I expected to see a transition where the side faces went from flat shaded to smooth and then, as the angle advanced higher to eventually see the entire shape display as smooth. Instead, I saw one transition stepping from 41 to 42 degrees, then another from 60 to 61 degrees and get another from 69 to 70 degrees. The shape displayed when angle is set to a value greater than 41 degrees and less than 61 degrees seemed to be some type of hybrid that is both smooth and creased. The shape from >= 61 degrees and <= 69 degrees was more like I expected with a flat top and bottom and completely smooth sides (relatively speaking.) And, also as expected, the shape when angle is >= 70 degrees was completely smoothed.
To investigate this further, I exported versions of the .jas file to a series of files in .obj format as I varied the smooth angle. I then used a view program I wrote in JavaFx to display the vertex normals exported for each file, as shown below:
As you can see, as the angle reaches a value of 42 degrees the vertex normals for the sides become only partially smoothed together and it isn't until the angle value reaches a value of 61 degrees that the side faces share a single, common vertex normal and display as fully smoothed. Perhaps there is something I don't understand about how C3D computes surface normals, but this semi-smoothed intermediate state doesn't seem quite right to me. Can someone explain? Is this a bug, or a feature I don't understand how to use?
Also, it would be nice to have a way to display vertex normals directly in C3D, as I think that would make it easier to understand what happens when the smooth angle is changed on other kinds of polygon meshes. My simple viewer can handle simple shapes, doesn't do so well on more complex ones.
Wayne
This gives me a shape where all the sides have a common angle between the faces, but the top and bottom faces share a sharper angle with the sides. With a little math I determined that the angle between the vertex normals shared between one side face and another should be about 41.86 degrees and that the angle between a top face and a side face should be about 69 degrees.
Using this object, and starting with an angle setting of 30 degrees I watched the display as I stepping the value up one by one. I expected to see a transition where the side faces went from flat shaded to smooth and then, as the angle advanced higher to eventually see the entire shape display as smooth. Instead, I saw one transition stepping from 41 to 42 degrees, then another from 60 to 61 degrees and get another from 69 to 70 degrees. The shape displayed when angle is set to a value greater than 41 degrees and less than 61 degrees seemed to be some type of hybrid that is both smooth and creased. The shape from >= 61 degrees and <= 69 degrees was more like I expected with a flat top and bottom and completely smooth sides (relatively speaking.) And, also as expected, the shape when angle is >= 70 degrees was completely smoothed.
To investigate this further, I exported versions of the .jas file to a series of files in .obj format as I varied the smooth angle. I then used a view program I wrote in JavaFx to display the vertex normals exported for each file, as shown below:
As you can see, as the angle reaches a value of 42 degrees the vertex normals for the sides become only partially smoothed together and it isn't until the angle value reaches a value of 61 degrees that the side faces share a single, common vertex normal and display as fully smoothed. Perhaps there is something I don't understand about how C3D computes surface normals, but this semi-smoothed intermediate state doesn't seem quite right to me. Can someone explain? Is this a bug, or a feature I don't understand how to use?
Also, it would be nice to have a way to display vertex normals directly in C3D, as I think that would make it easier to understand what happens when the smooth angle is changed on other kinds of polygon meshes. My simple viewer can handle simple shapes, doesn't do so well on more complex ones.
Wayne