I am an Indian national and travelling from USA to India via Hong Kong airport.
Do I need a transit visa even if I'm only changing planes?
According to the Hong Kong Immgration Department nationals of India are allowed to visit Hong Kong visa free for 14 days (see part II).
Given that you will not be required to have a visa to transit either.
As an Indian national, you do not require a visa to visit Hong Kong as a tourist for up to 14 days. Changing planes is obviously no problem. Reference: https://en.wikipedia.org/wiki/Visa_policy_of_Hong_Kong
The Government of Hong Kong Immigration Department details Pre-Arrival Registration for Indian Nationals:
Indian nationals must apply for and successfully complete pre-arrival registration online before they can visit or transit the HKSAR visa-free (if seeking to enter the HKSAR during transit). Pre-arrival registration is not required for Indian nationals in direct transit by air and not leaving the airport transit area. An Indian national can make use of the online service to apply for pre-arrival registration free of charge if he/she:
(a) holds an Indian passport valid for at least six months; and
(b) intends to visit or transit (except in direct transit by air and not leaving the airport transit area) the HKSAR for a stay not exceeding 14 days.
Pre-arrival registration is not applicable to Indian nationals who have the right of abode or the right to land in the HKSAR, are on unconditional stay in the HKSAR or have a valid permission to remain in the HKSAR for employment, study or residence.
Instead of 14 visa-free enter for indian, all tourists can enter to hk not more than 7 days for transit, given you hold a vaild ticket to 3rd country and a vaild visa. This wont count as 14days visa-free enter
As stated by Timatic, the database used by airlines, about these things:
Visa required, except for those who are in direct (Air to Air or Air to Sea) transit if holding confirmed onward bookings, continuing their journey within 48 hours and not leaving the transit lounge.
So no, you do not need a pre-registration if only changing planes