home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / include / rad_def.inc < prev    next >
Text File  |  1997-12-12  |  6KB  |  135 lines

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