We explore periodic structures of smectic-C (SmC) liquid crystals, induced optically by a polarization grating. The studied cells contain a passive surface of rubbed polyimide and an active photosensitive substrate of azo-dye doped polyimide. In a nematic phase the director field can be periodic independent of the angle between the grating vector and the rubbing direction. In the SmA phase periodic structure can be induced only by layer undulations. The SmC behaves similarly to the nematic phase, but the director can rotate only on a cone, which results in a more complex geometry. The periodic pattern is superimposed with four different director and layer structures. In spite of the coexistence of the nonuniform structures the diffraction efficiency is better in the SmC, than in the nematic phase.