That game is Super Mario Sunshine (2002) for Nintendo GameCube.
Unlike Mario 64's castle hub, Sunshine uses a continuous tropical island with the paintings as magical gateways. FLUDD's water mechanics (cleaning, hovering, rocketing) define the gameplay. It's divisive but beloved for its atmosphere, music, and challenge.