You can get resources from trees and rocks, but there are several other elements that you will not be able to find such as deuterium and plutonium. For those, you need to visit the red obelisk which is a structure with a beam of light on top. These resources are use to craft higher-end items and weapons; therefore, you must know where they are located to get them when you need them.