Glasses containing diffusion layers (of 20 -30 microns thick) doped by Ag+ ions were used for direct laser recording of 2D and 3D photonic crystals. After reduction of Ag+ ions in a hydrogen atmosphere at elevated temperatures, neutral Ag atoms formed nanoclusters of 20-nm radius. 2D and 3D photonic crystals were fabricated by pulsed laser irradiation using four or five coherent intersecting beams. Under irradiation the clusters absorbing light energy are heated to high temperatures and become mobile due to formation of liquid shells around the clusters. Adjacent clusters moved to each other and towards the irradiated surface in local temperature gradients. We present theoretical analysis of temperature distributions around nanoclusters of various sizes and calculate kinetics of cluster motion both for nanosecond and sub-picosecond pulsed irradiation.