Aggregation is one of the most fundamental behaviors and has been studied in swarm robotic researches for more than two decades. Studies in biology have revealed that the environment is a preeminent factor, especially in cue-based aggregation. This can be defined as aggregation at a particular location which is a heat or a light source acting as a cue indicating an optimal zone. In swarm robotics, studies on cue-based aggregation mainly focused on different methods of aggregation and different parameters such as population size. Although of utmost importance, environmental effects on aggregation performance have not been studied systematically. In this paper, we study the effects of different environmental factors: size, texture and number of cues in a static setting, and moving cues in a dynamic setting using real robots. We used the aggregation time and size of the aggregate as the two metrics with which to measure aggregation performance. We performed real robot experiments with different population sizes and evaluated the performance of aggregation using the defined metrics. We also proposed a probabilistic aggregation model and predicted the aggregation performance accurately in most of the settings. The results of the experiments show that environmental conditions affect the aggregation performance considerably and have to be studied in depth.