A non-transitory storage medium that stores a three-dimensional model generation program causing a computer to execute a process comprising:
- acquiring multiple images captured at multiple capturing positions;
- detecting an optical surface region in which at least one of a reflected image visually recognized by reflection of light and a transmitted visual object visually recognized through a transparent member is observed in the multiple captured images;
- arranging a mask in the optical surface region and generating a three-dimensional model based on the multiple images in which the mask is arranged;
- and
- detecting a color attribute of the optical surface region, wherein at the arranging and the generating, generating, in a case in which the color attribute of the optical surface region has a predetermined tendency, the mask having a color attribute corresponding to the color attribute of the optical surface region and arranging the generated mask;
- arranging, in a case in which the color attribute of the optical surface region does not have a predetermined tendency and the optical surface region is a reflective surface region in which a reflected image visually recognized by reflection of light is observed, the mask corresponding to the reflective surface region;
- and
- arranging, in a case in which the color attribute of the optical surface region does not have a predetermined tendency and the optical surface region is a transmissive surface region in which a transmitted visual object visually recognized through a transparent member is observed, the mask corresponding to the transmissive surface region.