home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 May / PCWorld_2000-05_cd.bin / Software / TemaCD / povray / povwin3.exe / %MAINDIR% / include / rad_def.inc < prev    next >
Encoding:
Text File  |  2000-04-06  |  5.6 KB  |  134 lines

  1. #ifdef(Rad_Def_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Rad_Def_Inc_Temp = version;
  5.  
  6. #ifdef(View_POV_Include_Stack)
  7. #   debug "including rad_def.inc\n"
  8. #end
  9.  
  10. // Set some common radiosity settings.  These settings are extremely general
  11. // and are intended for ease of use and don't necessarily give the
  12. // best results.
  13.  
  14.  
  15. // These constants are defined in "consts.inc"
  16. // #declare Radiosity_Debug = 1;
  17. // #declare Radiosity_Fast = 2;
  18. // #declare Radiosity_Normal = 3;
  19. // #declare Radiosity_2Bounce = 4;
  20. // #declare Radiosity_Final = 5;
  21.  
  22. // The correct format for using this file is:
  23. //      #include "consts.inc"
  24. //      #declare Rad_Quality = Radiosity_Debug;
  25. //      #include "rad_def.inc"
  26.  
  27. // Uses ray_count and error_bound as the main speed/quality tradeoffs
  28. // Other changes made to emphasize or minimize effects.
  29. global_settings {
  30.  
  31. #ifdef(Rad_Quality)
  32. // do nothing
  33. #else
  34. #   debug "\nFile rad_def.inc reports:"
  35. #   debug "\nRad_Quality not set.  Using Radiosity_Normal by default."
  36. #   debug "\nOptions are:"
  37. #   debug "\n  #declare Rad_Quality = Radiosity_Debug"
  38. #   debug "\n  #declare Rad_Quality = Radiosity_Fast"
  39. #   debug "\n  #declare Rad_Quality = Radiosity_Normal"
  40. #   debug "\n  #declare Rad_Quality = Radiosity_2Bounce"
  41. #   debug "\n  #declare Rad_Quality = Radiosity_Final"
  42. #   debug "\n  This must be set before you '#include' rad_def.inc.\n"
  43. #   declare Rad_Quality = Radiosity_Normal;
  44. #end
  45.  
  46.  
  47. #switch(Rad_Quality)
  48.  
  49.     // Run it fast, don't try to make it look good, make sure that
  50.     // you can actually see where the radiosity boundaries are.
  51.     #case (Radiosity_Debug)
  52.     radiosity {
  53.         count 10                 // Quick, but very blotchy
  54.         error_bound 0.3          // Match to value of the quality you're debugging
  55.         gray_threshold 0         // Emphasize color bleeding drastically
  56.         distance_maximum 10      // Scene-dependent!  Leave 0 if unsure of proper value.
  57.         low_error_factor 0.8     // Match to value of the quality you're debugging
  58.         nearest_count 1          // Will tend to cause boundaries to show
  59.         minimum_reuse 0.015      // Match to value of the quality you're debugging
  60.         brightness 3.3           // Doesn't really matter.  Not used in final output.
  61.         recursion_limit 1        // 1 is quickest
  62.     }
  63.     #debug "\nRadiosity_Debug in use"
  64.     #break
  65.  
  66.     // Make it look as good as you can, but I'm in a hurry
  67.     #case (Radiosity_Fast)
  68.     radiosity {
  69.         count 80                 // Do more calculations to calculate each sample
  70.         error_bound 0.4          // Main quality/time adjustment = sample spacing
  71.         gray_threshold 0.6       // Higher than usual to hide colour bleed errors
  72.         distance_maximum 10      // Scene-dependent!  Leave 0 if unsure of proper value.
  73.         low_error_factor 0.9     // Only slightly lower error bound during preview
  74.         nearest_count 5
  75.         minimum_reuse 0.025      // Don't do too many samples in corners
  76.         brightness 3.3           // doesn't really matter.  Not used in final output.
  77.         recursion_limit 1        // can be 1 (usual) or 2 (for patient people)
  78.     }
  79.     #debug "\nRadiosity_Fast in use"
  80.     #break
  81.  
  82.     // Typical values
  83.     #case (Radiosity_Normal)
  84.     radiosity {
  85.         count 200                // Calculate reasonable accurate samples
  86.         error_bound 0.3          // Main quality/time adjustment = sample spacing
  87.         gray_threshold 0.5       // Try 0.33-0.50. Just a matter of taste
  88.         distance_maximum 10      // Scene-dependent!  Leave 0 if unsure of proper value.
  89.         low_error_factor 0.75
  90.         nearest_count 7
  91.         minimum_reuse 0.017      // reasonable number of samples in corners
  92.         brightness 3.3           // doesn't really matter.  Not used in final output.
  93.         recursion_limit 1        // can be 1 (usual) or 2 (for patient people)
  94.     }
  95.     #debug "\nRadiosity_Normal in use"
  96.     #break
  97.  
  98.     // Typical values, but with 2 bounces.  Starts slow, but picks up steam!
  99.     #case (Radiosity_2Bounce)
  100.     radiosity {
  101.         count 200                // Calculate reasonable accurate samples
  102.         error_bound 0.3          // Main quality/time adjustment = sample spacing
  103.         gray_threshold 0.5       // Try 0.33-0.50. Just a matter of taste
  104.         distance_maximum 10      // Scene-dependent!  Leave 0 if unsure of proper value.
  105.         low_error_factor 0.75
  106.         nearest_count 7
  107.         minimum_reuse 0.017      // reasonable number of samples in corners
  108.         brightness 3.3           // doesn't really matter.  Not used in final output.
  109.         recursion_limit 2        // Slow at first, but don't give up, it gets faster
  110.     }
  111.     #debug "\nRadiosity_2Bounce in use"
  112.     #break
  113.  
  114.     // For patient quality freaks with fast computers about to leave on vacation
  115.     #case (Radiosity_Final)
  116.     radiosity {
  117.         count 800                // Ensure that we get good, accurate samples
  118.         error_bound 0.2          // And calculate lots of them.  (more important than count)
  119.         gray_threshold 0.5
  120.         distance_maximum 4       // Scene-dependant!
  121.         low_error_factor 0.7     // force many extra samples to be calculated...
  122.         nearest_count 9          // so we can average them together for smoothness
  123.         minimum_reuse 0.01       // get quite tightly into corners
  124.         brightness 3.3           // doesn't really matter.  Not used in final output.
  125.         recursion_limit 1        // Try this = 2, but drop the count to maybe 300
  126.    }
  127.    #debug "\nRadiosity_Final in use"
  128.    #break
  129. #end
  130. }
  131.  
  132. #version Rad_Def_Inc_Temp;
  133. #end
  134.