split initialize from the raytracing