We have developed a new algorithm for tracking 3D seismic horizons. The algorithm combines an inversion-based, seismic-dip flattening technique with conventional, similarity-based autotracking. The inversion part of the algorithm aims to minimize the error between horizon dips and computed seismic dips. After each cycle in the inversion loop, more seeds are added to the horizon by the similarity-based autotracker. In the example data set, the algorithm is first used to quickly track a set of framework horizons, each guided by a small set of user-picked seed positions. Next, the intervals bounded by the framework horizons are infilled to generate a dense set of horizons, also known as HorizonCube. This is done under the supervision of a human interpreter in a similar manner. The results show that the algorithm behaves better than unconstrained flattening techniques in intervals with trackable events. Inversion-based algorithms generate continuous horizons with no holes to be filled posttracking with a gridding algorithm and no loop skips (jumping to the wrong event) that need to be edited as is standard practice with autotrackers. Because editing is a time-consuming process, creating horizons with inversion-based algorithms tends to be faster than conventional autotracking. Horizons created with the adopted algorithm follow seismic events more closely than horizons generated with the inversion-only algorithm, and the fault crossings are sharper.