In this paper, we study the visible trajectories planning for unmanned aerial vehicles (UAVs) modeled with a Dubins airplane in 3D urban environments. Our method is based on a fast and exact spatial visibility analysis of the 3D visibility problem from a viewpoint in 3D built-up environments. We consider the 3D urban environment buildings modeled as cubes (3D boxes) and present an analytic solution to the visibility problem. Based on an analytic solution, the algorithm computes the exact visible and hidden parts from a viewpoint in the urban environment. We present a local trajectory planner generating the most visible trajectory in a known 3D urban environment model, taking into account the dynamic and kinematic UAV constraints. The planner computes, at each time step, the next UAV's attainable velocities and explores the most visible node, while avoiding buildings as static obstacles in the environments, using the velocity obstacle method. The visibility type of the trajectory can be configured beforehand as visible roofs and surfaces in the environments. We demonstrate our visibility and trajectory planning method in simulations in several 3D urban environments, showing visible trajectory planning capabilities.