This work observationally addresses the relative distribution of total and optically luminous matter in galaxy clusters by computing the radial profile of the stellar-to-total mass ratio. We adopt state-of-the-art accurate lensing masses free from assumptions about the mass radial profile and we use extremely deep multicolor wide-field optical images to distinguish star formation from stellar mass, to properly calculate the mass in galaxies of low mass, those outside the red sequence, and to allow a contribution from galaxies of low mass that is clustercentric dependent. We pay special attention to issues and contributions that are usually underrated, yet are major sources of uncertainty, and we present an approach that allows us to account for all of them. Here we present the results for three very massive clusters at z ∼ 0.45, MACSJ1206.2-0847, MACSJ0329.6-0211, and RXJ1347.5-1145. We find that stellar mass and total matter are closely distributed on scales from about 150 kpc to 2.5 Mpc: the stellar-to-total mass ratio is radially constant. We find that the characteristic mass stays constant across clustercentric radii and clusters, but that the less-massive end of the galaxy mass function is dependent on the environment.