diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-06 01:04:13 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-06 01:04:13 +0400 |
commit | 2a90de034826cd172117e6dd9764bfb481c1b14f (patch) | |
tree | a33d07ed7346bc7f7266857195a48efc0ddb957f /source/blender/makesdna/DNA_world_types.h | |
parent | e4ce73c99eca48d7d494f5e2d0ca0e034f7d4a62 (diff) |
Eeshlo AO patch, revised
- Ambient Occlusion is a more sophisticated ambient trick, which takes
nearby faces into account by firing a hemisphere of shadow-rays
around. AKA 'dirt shader'.
- Eeshlo made it a Lamp type, which doesn't fit well. I've moved the
settings to the World menu, and let the Material->ambient value control
the amount it contributes
- currently, the AO value is added/subtracted/mixed with the 'diffuse'
factor while shading, before it is multiplied with Material color
Buttons are in new Panel 'Amb Occ" in F8 menu. Note:
- "Dist:" by shortening the length of rays you get subtler effects and it
renders faster too
- "DistF:" the attennuation factor gives control over how the 'shadow'
spreads out.
Further it's just raytracing, so tends to be slooooow.... :)
Here same tricks as for other raytraced scenes apply, especially try to
keep the environment as small as possible (exclude faces from Octree by
giving them no Material Traceable).
I still have to think over a couple of aspects, will await feedback on it:
- AO color? Now it just adds 'white'
- other sampling patterns? I tried dithering, which was so-so
- method of controlling final 'samples' in F10? Might be useful for other
oversampling too (area light) to have it reacting to a percentage or so..
Diffstat (limited to 'source/blender/makesdna/DNA_world_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_world_types.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index efa17af4996..c325c2d1b8a 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -91,8 +91,13 @@ typedef struct World { float starsize, starmindist; float stardist, starcolnoise; + /* unused now: DOF */ short dofsta, dofend, dofmin, dofmax; - + + /* ambient occlusion */ + float aodist, aodistfac; + short aomode, aosamp, aomix, aototsamp; + int physicsEngine; struct Ipo *ipo; @@ -117,6 +122,17 @@ typedef struct World { #define WO_STARS 2 #define WO_DOF 4 #define WO_ACTIVITY_CULLING 8 +#define WO_AMB_OCC 16 + +/* aomix */ +#define WO_AOADD 0 +#define WO_AOSUB 1 +#define WO_AOADDSUB 2 + +/* aomode (use distances & random sampling modes) */ +#define WO_AODIST 1 +#define WO_AORNDSMP 2 + /* mapto */ #define WOMAP_BLEND 1 |