Rendering stars in 3D space - AbsMag to OpenGL scale values I am using the AMNH's Digital Universe stars.speck file to render stars in 3D space. The speck contains parsec-scale coortinates, where our Sun is at 0,0,0. It also lists the AbsMag values - i.e the luminosity from 10 parsecs away. I want to now scale my star textures in openGL, so the resulting star sizes are accurate. How could I convert the AbsMag inverse logarithmic scale to a scale value of 0-infinity, where 0.0 means the star goes away, and 1.0 is no change? Obviously can't make the Sun stay at 1, as that would make it huge.
"Accurate star size" is a problem. Obviously you do not have the resolution on your screen for accurate angular resolution of stars (they would require an absurdly fine resolution), and the dynamic range of brightness is also too low -- stars range over many orders of magnitude in brightness, far more than a screen can show. Deeply annoying. What one might want to do is to make each star have a brightness and screen size that is proportional to their actual brightness in the sky to give the same feeling as the sky would give. This is still very tough, since screens have different gamma correction. To top it off, the human eye actually has a pretty logarithmic response to light (this is why magnitudes and gamma correction make sense).

Here is a rough idea. A star with AbsMag of $M$ has an actual luminosity of $$L = L_\odot 10^{0.4(M_\odot - M)}$$ where $L_\odot$ is the luminosity of the sun and $M_\odot$ is the absolute magnitude of the sun. Things get easy if we just count luminosity in terms of $L_\odot$, making the sun one unit of luminosity.

A spot of radius $r$ on the screen with luminance $l$ radiates power as $P=\pi r^2 l$. That luminance is due to the gamma-corrected luma value $V$ the computer displays: $l = K V^\gamma$. 

Assuming the radius changes with luminosity too as $r(L)$, I would try $r(L)=r_0 L^a$ where $a\approx 0.6$ (but this is guesswork) and the sun has radius $r_0$ pixels.

So trying to put this together, we get the pixel brightness as $$V = V_0 (L/ r(L)^2)^{1/\gamma} = V'_0 L^{(1-2a)/\gamma}$$ where $V_0$ and $V'_0$ are the pixel brightnesses used for the sun in this model. Basically this squashes the actual luminosity with $a$ (representing using bigger spots for brighter stars, not requiring as intense pixels) and $\gamma$ (to correct for the screen and the eye). What values to use will largely be trial and error unless you want to try to use screen photometry equipment.

So the full formula converting from absolute magnitude to pixel value would be: $$V = V_0 10^{0.4(4.83 - M)(1-2a)/\gamma}.$$