Difference between revisions of "HowTo:Use radiosity"

From POV-Wiki
Jump to navigation Jump to search
Line 77: Line 77:
  
 
==Shortcuts==
 
==Shortcuts==
Checks and balances within the radiosity system make it unique!
+
Checks and balances within the radiosity system make it unique!<br>
 +
==Bugs and Work-arounds==
 +
Sometimes radiosity can cause artifacts, one of the most common causes of artifacts is infinite radiosity rays. A good rule is to place any radiosity scene inside a large inverse sphere to avoid any ray colliding with the background or sky_sphere.<br>
 +
Another potential cause of artifacts is coincident surfaces, sometimes a radiosity ray leaks through the corners of a box or between CSG seams, one work-around seems to be using a round box with a small radius instead of a box.<br>
 +
Non-zero ambient values in textures emit light, this is intended, but makes textures look wrong in test renders without radiosity. So it is common to use a declared value to turn on and off lights, ambients, and radiosity, with if statements.<br>
 +
 
 
==Notes==
 
==Notes==
 
#Radiosity is slow and requires lots of calculations. Don't turn on without time to waste.
 
#Radiosity is slow and requires lots of calculations. Don't turn on without time to waste.
 
#Radiosity usage will vary from scene to scene and taste of the artist using it.
 
#Radiosity usage will vary from scene to scene and taste of the artist using it.
 
#Radiosity is haaaaaaard...
 
#Radiosity is haaaaaaard...

Revision as of 01:48, 28 December 2007

Radiosity

Radiosity, also known as global illumination (GI), is a process of calculating diffuse reflecting light in a scene. To use radiosity, include a radiosity block in the global settings. Please note that the default setting for an empty radiosity block is very low quality, if you are unfamiliar with the fourteen different settings that control the look and performance of POV’s radiosity algorithm the easiest way to get started is to use the Rad_Settings macro from rad_def.inc, followed by a boolean for normals and a boolean for medias. The pre-sets from rad_def.inc are...

  • Radiosity_Default
  • Radiosity_Debug
  • Radiosity_Fast
  • Radiosity_Normal
  • Radiosity_2Bounce
  • Radiosity_Final
  • Radiosity_OutdoorLQ
  • Radiosity_OutdoorHQ
  • Radiosity_OutdoorLight
  • Radiosity_IndoorLQ
  • Radiosity_IndoorHQ

So a typical use of radiosity for a scene using rad_def.inc is...

#include rad_def.inc
global_settings {
   radiosity {
      Rad_Settings(Radiosity_Normal,off,off) 
   }
}
#default {finish{ambient 0}}

Uses

Lighting the inside of a house using an outside lightsource.

Specifics

Many small things to consider here.

Here are some good default settings you can use that are fairly fast and yet not horrible looking.

radiosity {
   pretrace_end 4/image_width
   count 50
   error_bound 0.8
   recursion_limit 1
}


For a more realistic appearance use the following.

radiosity {
   pretrace_end 2/image_width
   count image_width/2
   error_bound 128/image_width
   recursion_limit 1
}


For good quality indoor lighting.

radiosity {
     brightness 3
     count 100
     error_bound 0.15
     gray_threshold 0.0
     low_error_factor 0.2
     minimum_reuse 0.015
     nearest_count 10
     recursion_limit 5
     adc_bailout 0.01
     max_sample 0.5
     media off
     normal on
     always_sample 1
     pretrace_start 0.08
     pretrace_end 0.01
}

Shortcuts

Checks and balances within the radiosity system make it unique!

Bugs and Work-arounds

Sometimes radiosity can cause artifacts, one of the most common causes of artifacts is infinite radiosity rays. A good rule is to place any radiosity scene inside a large inverse sphere to avoid any ray colliding with the background or sky_sphere.
Another potential cause of artifacts is coincident surfaces, sometimes a radiosity ray leaks through the corners of a box or between CSG seams, one work-around seems to be using a round box with a small radius instead of a box.
Non-zero ambient values in textures emit light, this is intended, but makes textures look wrong in test renders without radiosity. So it is common to use a declared value to turn on and off lights, ambients, and radiosity, with if statements.

Notes

  1. Radiosity is slow and requires lots of calculations. Don't turn on without time to waste.
  2. Radiosity usage will vary from scene to scene and taste of the artist using it.
  3. Radiosity is haaaaaaard...