The structures of 3,5-bis[4-(diethylamino)benzylidene]-1-methyl-4-piperidone, C28H37N3O, (I), and 3,5-bis[4-(diethylamino)cinnamylidene]-1-methyl-4-piperidone, C32H41N3O, (II), have been characterized. Because of conjugation between donor and acceptor parts, the central heterocycles (including the carbonyl group) in (I) and (II) are flattened and exhibit a `sofa' conformation, with a deviation of the N atom from the planar fragment. The dihedral angles between the planar part of the heterocycle and the two almost flat fragments that include a phenyl ring and bridging atoms are 23.2 (1) and 11.2 (1)° in (I), and 11.8 (1) and 8.7 (2)° in (II). One- and two-photon absorption of light and the fluorescence of (I) and (II) have also been characterized.