Add serialize in and out to terraingraphics.h