unfortunately there is no UNIVERSAL solution here. Each type of engine is a bit different based on how the pilot is mounted in the first place. How big is the gap between the frame and the pilot? How big are your curves? there are several variables. The biggest being the spacer needed to fill that gap. I started doing mine long before 3D printing and all these guys with more skills and knowledge than me, so I just cut them out from sheets of styrene. That was part of the fun for me, tear the engine apart and figure it out step by step.
These were my first major conversions and you can see the spacer I made from styrene between the frame and pilot. I changed a lot on these two besides just fixing the pilots only because I wanted them a little more modern.
It doesn't really matter whether it's Lionel, MTH, Atlas, or 3rd Rail, the concept and process is the same.