A generating apparatus that generates a virtual viewpoint image on the basis of a plurality of captured images obtained by a plurality of image capturing devices, the plurality of image capturing devices being classified into a plurality of image capturing device groups including a first image capturing device group comprising the plurality of image capturing devices pointed to a first gaze point and a second image capturing device group comprising the plurality of image capturing devices pointed to a second gaze point different from the first gaze point, the generating apparatus comprising: a first obtaining unit configured to obtain first image data based on the captured image obtained by the image capturing device belonging to the first image capturing device group; a second obtaining unit configured to obtain second image data based on the captured image obtained by the image capturing device belonging to the second image capturing device group; a third obtaining unit configured to obtain information related to a position and a direction of a virtual viewpoint; and a generating unit configured to generate the virtual viewpoint image based on the first image data obtained by the first obtaining unit, the second image data obtained by the second obtaining unit, and the information related to the position and the direction of the virtual viewpoint obtained by the third obtaining unit, characterized in that the generating unit is configured to generate the virtual viewpoint image so that objects closer to the virtual viewpoint are displayed in front of objects farther from the virtual viewpoint based on a distance between the position of the virtual viewpoint specified by the information obtained by the third obtaining unit and a position of the first gaze point, and a distance between the specified position of the virtual viewpoint and a position of the second gaze point, wherein image content of a particular portion of the virtual viewpoint image corresponding to one of the objects or to a scene background is generated from an image capturing device group, among the plurality of image capturing device groups, having a gaze point closest in three-dimensional spatial distance to the corresponding three-dimensional position of the one of the objects or of the scene background. a first obtaining unit configured to obtain first image data based on the captured image obtained by the image capturing device belonging to the first image capturing device group; a second obtaining unit configured to obtain second image data based on the captured image obtained by the image capturing device belonging to the second image capturing device group; a third obtaining unit configured to obtain information related to a position and a direction of a virtual viewpoint; and a generating unit configured to generate the virtual viewpoint image based on the first image data obtained by the first obtaining unit, the second image data obtained by the second obtaining unit, and the information related to the position and the direction of the virtual viewpoint obtained by the third obtaining unit, characterized in that the generating unit is configured to generate the virtual viewpoint image so that objects closer to the virtual viewpoint are displayed in front of objects farther from the virtual viewpoint based on a distance between the position of the virtual viewpoint specified by the information obtained by the third obtaining unit and a position of the first gaze point, and a distance between the specified position of the virtual viewpoint and a position of the second gaze point, wherein image content of a particular portion of the virtual viewpoint image corresponding to one of the objects or to a scene background is generated from an image capturing device group, among the plurality of image capturing device groups, having a gaze point closest in three-dimensional spatial distance to the corresponding three-dimensional position of the one of the objects or of the scene background.