You are thinking of perhaps Third Reich era caps, when red was the waffenfarbe for artillery.
In the Imperial era, artillery caps did indeed have red piping, as did infantry, and many cavalry regiments, but it was mainly identified by the black band on mutzen & schirmmutzen, and black...