In this post I tell you the problems that I found developing agGradientBackground, it’s not a tutorial is only a diary…
Idea is simple, make a gradient background with a custom preferences to store permanent configuration. I suppose that I’t will be a very fast dev. Finally was fast, but not so fast..
I created a display callback and draw a opengl in Post-begin frame pass, and a custom property stored at preferences.
First problem.. the custom preferences, it’s seems a softimage bug but dobule values not was remebered by xsi at restart
I made some test with a very simple propery but the same behavior, double values not was stored persistenly… I need to make more test, but it seems a softimage bug. Solution, make two properties one double and other float syncronized by events. The float is the user one and the double is hidden and the one that I use in my c++ code.
The second problem was a own bug, rotoscopy was hidden by the gradient. The solution was simple, change pass to a siBeginFrame one.
Third problem, when transforms or paint tool was activated and move the camera, the gradient was painted in gray color. The solution was simple, disabled GL_LIGHTING and GL_DEPTH_TEST before draw the gradient, softimage modify that openGL states when activate transform so It needed to force disable them.
The last problem, when launch a start capture the gradient is painted correctly but it openGl antialiassing option is checked, the gradient is not painted. Becouse the person that suggested me the addon not need this, at this version I left the bug, but I’ll investigate it soon…
In short, a simple and fast development but… always there are problems!! :-p I’d found a possible softimage bug, and now I undestand more callbacks details.
Related posts:


Thanks for this great add-on! If you could solve that anti aliasing bug, it will be perfect.