This would be better to ask in your state forum, since laws vary by state.
In general, the answer is no.
Even if seen committing a heinous crime, you have a right to remain silent.
If you're not committing a crime, how much less power do police have to force you to ID yourself?
[Don't fall for the "we don't know you're not a felon" line, unless they're also stopping everyone with kids to make sure they're not felons prohibited from contact with children, or not kidnapping those children. They have to have RAS that you are a felon; you don't have to prove you're not. Of course, you could try the reasoning that since laws say it's illegal for felons to be in possession of firearms, & laws prevent crime, the mere fact that you do have a firearm proves you're not a felon.]
If your state requires a permit to carry openly, that gives RAS of a crime & the defense is showing them you have a permit. Whether or not that must be accompanied by gov't-issued photo ID depends on the laws of the state.
And of course, if you're visiting someplace stupid that prohibits OC entirely, again that's RAS of a crime so the cops can stop you.