http://forum.celestialmatters.org/

Nick Risinger's MilkyWay for Celestia(.Sci) (Download)
http://forum.celestialmatters.org/viewtopic.php?f=9&t=423
Page 2 of 2

Author:  t00fri [ Thu, 09-02-12, 19:06 GMT ]
Post subject: 

For people being able to compile Celestia.1.6.x (SVN), I suggest a slight code modification in case Nick Risinger's Milky Way add-on is used. It sufficiently decreases the visibility of the default Milky Way display, such as to avoid any interferences with the used Milky Way add-on.

The modification only reduces the brightness of the default Milky Way display for observers INSIDE the boundary of our galaxy (e.g. within our solar system), where it is replaced by the respective MW add-on. If you do a GOTO Milky Way ('G' key) or generally look at the MW from 'outside', the default galaxy is visible again with the original brightness.

Here are the instructions:

Load the source code file src/celengine/render.cpp into your favored editor and jump to line 9626.
Replace the code line
Code:
   double enhance = 4.0, pc10 = 32.6167;


by

Code:
   // Reduce default Milky Way brightness as seen from 'inside',
   // in case a photo realistic Milky Way add-on is used as background!
   
   double enhance, pc10 = 32.6167;
   if(!strcmp(dsoDB->getDSOName(dso, false).c_str(),"Milky Way"))
      enhance = absMag - 15.0;
   else
      enhance = 4.0;


Save and rebuild Celestia!

The quoted line number is for Celestia.SVN in latest Rev. 5185. For other versions, just search for the above line to be modified, using the search feature of your editor..

I could easily allow a modification of the Milky Way brightness ONLY in case
the MW add-on is actually present. Please, write if there is interest in such a more automatic behaviour.

Let me know whether this trivial mod is satisfactory to you.

Good luck,
Fridger

Page 2 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/