HowTo:Migrate old scenes to work with the new gamma system

From POV-Wiki
Revision as of 00:00, 10 June 2010 by SharkD (talk | contribs) (copy clipka's newgroup post)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Before "assumed_gamma 1.0" or the most recent 3.7 betas, the color math was simply wrong. So in order to get exactly the same result, you'd have to mimic that wrong color math - which 3.7 refuses to, except for legacy scenes using "#version 3.6" (or anything smaller than 3.7) and "assumed_gamma 2.2".

If you do want to port the scene to the right math, here's what I expect to be the most important steps:

  1. In the ini-file, set the "Display_Gamma" to whatever fits your system; set "File_Gamma" to the same. (Ideally, your system should have a Display_Gamma of 2.2.)
  2. In the scene file, use "#version 3.7", and remove any "assumed_gamma" statement.
  3. Gamma-adjust all color literals, by raising the R,G,B components to the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the color literal). Check your scene for colour values that are computed from some other values - you may (or may not) want to gamma-adjust these as well.
  4. Check your scene for input image files, and whether they are handled properly regarding gamma. For images that are used as anything non-color (e.g. height field data, bump map, texture map or what-have-you), explicitly specify "file_gamma 1.0" after the filename (next beta will also support "gamma 1.0" here). For any images that do wind up being used as a colour, try the default first (i.e. no "file_gamma" statement); if the colours appear too washed-out or too strong, try explicitly specifying "file_gamma srgb".
  5. Toy around with overall brightness and/or brightness of individual light sources, until you feel comfortable with the illumination. You may also want to tweak some of the colours in your scene (both pigment and light sources). If you're using self-made input image files, you may also want to tweak their file_gamma setting, but try to avoid this with 3rd party input images (you should usually find a way to make them work by tweaking the scene rather than the image).