Add serialize in and out to terraingraphics.cpp