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/blenloader
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/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4797e85d2f4..9f6ba376180 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4119,6 +4119,7 @@ static void do_versions(Main *main)
}
if(main->versionfile <= 232) {
Tex *tex= main->tex.first;
+ World *wrld= main->world.first;
while(tex) {
/* copied from kernel texture.c */
@@ -4138,6 +4139,13 @@ static void do_versions(Main *main)
tex= tex->id.next;
}
+
+ while(wrld) {
+ if(wrld->aodist==0.0) wrld->aodist= 10.0;
+ if(wrld->aosamp==0.0) wrld->aosamp= 5;
+ wrld= wrld->id.next;
+ }
+
}