There are a number of products - made specifically for riflescopes and binoculars, etc. I have tried a few, and I'm sorry I cannot remember all of their names. There was a clear liquid, applied with a cotton ball,there is kind of a dry paste, and Nikon sells a wipe that is supposed to stop fogging. I just got the Nikon product - haven't tried it yet. The others I have tried have been very temporary - any good effects seemed to dissipate pretty quickly, need to be reapplied daily. I am sure that folks will rightfully caution you about the potential for damage to lenses and coatings, and I would use with caution. I haven't tried any of these products on my expensive scopes. I don't know about Rain-X, but I would be very cautious.
I have had some really rainy,foggy days while hunting and my scopes have been very hard (impossible) to see through, so I have tried some of these products. So far, I don't think that they are the best answer to the problem. Like I say, I haven't tried the Nikon product yet, maybe it is good.
I have been replacing my hunting scopes on my rifles that I use in foul weather with Bushnell 3200's and 4200's as they have the Rainguard coating. So far I love these scopes but haven't had many bad rainy, foggy days yet to really test them.(been lucky with the weather for a couple of years) I hear all good reviews on the Bushnell coating though. I also bought a new Simmons Master Series to try out too. They also have anti-fog protection. All of their new (Master Series) design and engineering sound good to me - I want to try them out. Good shootin'