Full Screen Anti-Aliasing (FSAA)
One of the simplest ways of improving the visual quality of your scripts is to enable full screen anti-aliasing (FSAA). Anti-Aliasing is a technique used to make jagged edges of polygons appear smooth. Most modern graphics cards support FSAA and it only takes a single line of Vizard code to enable it.
To enable FSAA in your Vizard script, simply use the viz.setMultiSample command before calling viz.go. The viz.setMultiSample command accepts a single parameter which controls the quality of the anti-aliasing. Most graphics cards support quality levels of 2, 4, 8 and 16. The higher the quality level, the smoother the edges will appear. However, more smoothing means more computation, so higher quality levels might reduce your frame rate.
Here is Vizard code that will enable 8x FSAA within a script:
viz.go()
Note that the viz.setMultiSample command was called before viz.go.
FSAA is performed on the final rendered image, so the performance is dependent on the size of your graphics window, and not the number of polygons in the scene. If you are experiencing a lower frame rate due to enabling FSAA, try lowering the quality level. Most modern graphics cards support hardware accelerated FSAA, so performance should not be an issue for most users.
Since FSAA is performed on the entire rendered image, all polygon edges will appear slightly blurred. If you need certain polygon edges to appear sharp, then it is not recommended that you enable FSAA.
Try it out yourself or check out the following screenshots showing a polygon rendered with different FSAA quality levles.