There are multiple types of Vitamin D, but the Vitamin D that you get from the sun is called Vitamin D3. Vitamin D2 is sourced from your diet. You need a balance of both types of Vitamin D. If there is a problem, it is always better to consult a doctor whether it is safe for you to spend time under the sun or whether it is fine to consume certain dietary options. Some foods that can be good Vitamin D supplements include cod liver oil, egg yolk, seafood, mushrooms, fortified dairy products, and red meat.