We introduce a new algorithm for tracking 3D seismic horizons. The algorithm combines an inversion-based, seismic-dip flattening technique with conventional, similarity-based auto-tracking. 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 auto-tracker. 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, a.k.a. HorizonCube. This is done under 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 post-tracking with a gridding algorithm and no loop-skips (jumping to the wrong event) that need to be edited as is standard practice with auto-trackers. As editing is a time-consuming process, creating horizons with inversion-based algorithms tends to be faster than conventional auto-tracking. Horizons created with the proposed algorithm follow seismic events more closely than horizons generated with the inversion-only algorithm and fault crossings are sharper.