Sort of depends on what you want to say.
Realisation comes before knowledge, but after the thing to be realised exists, so you could word these differently.
I hadn't realized how starving I was. <-- all past, but starving, then realised - as if telling a story, of the past
So if you want to say: present starving, but not realised, you get a little different
I hadn't realized how starving I am. -
So, in this case, for this present message, the tenses to be "consistent" are not the same.
.
In your example, you start with "didn't", indicating you are relating a past event. Is this what you intend?