Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-04-06 01:04:13 +0400
committerTon Roosendaal <ton@blender.org>2004-04-06 01:04:13 +0400
commit2a90de034826cd172117e6dd9764bfb481c1b14f (patch)
treea33d07ed7346bc7f7266857195a48efc0ddb957f /source/blender/blenkernel/intern/world.c
parente4ce73c99eca48d7d494f5e2d0ca0e034f7d4a62 (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/blenkernel/intern/world.c')
-rw-r--r--source/blender/blenkernel/intern/world.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index a5872c0abe9..a31c33e76e6 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -198,6 +198,11 @@ void init_render_world()
R.wrld.miststa+= (float)fabs(R.viewmat[3][2]);
}
}
+
+ /* ambient occlusion */
+ R.wrld.aototsamp= R.wrld.aosamp*R.wrld.aosamp;
+
+
}
else {
memset(&R.wrld, 0, sizeof(World));