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>2003-12-16 17:12:01 +0300
committerTon Roosendaal <ton@blender.org>2003-12-16 17:12:01 +0300
commit97d4dbc9c317e6d5cd171a9e76ce4aeca2bdf93c (patch)
tree3136f667159fdaa3d0c804f9a0f16c7d27f2d1a7 /source/blender/blenloader
parent356cf7953482891afe3dd289b1584b355de23b17 (diff)
Another commit for raytracing, now with glass refraction & fresnel!
Changelog: - enable refraction with button "Ray Transp" in Material buttons. - set "Angular Index" value for amount of refraction. - use the "Alpha" value to define transparency. - remember to set a higher "Depth" too... glass can bounce quite some more than expected. - for correct refraction, 3D models MUST have normals pointing in the right direction (consistently pointing outside). - refraction 'sees' the thickness of glass based on what you model. So make for realistic glass both sides of a surface. - I needed to do some rewriting for correct mirroring/refraction, especially to prevent specularity being blended away. Solved this with localizing shading results in the rendercore.c. Now specularity correctly is added, and reduces the 'mirror' value. - Localizing more parts of the render code is being planned. The old render heavily relies on struct Render and struct Osa to store globals. For scanline render no problem, but recursive raytracing dislikes that. - done test with gamma-corrected summation of colors during tracing, is commented out still. But this will give more balanced reflections. Now dark reflections that are reflected in a bright surface seem incorrect. - Introduced 'Fresnel' effect for Mirror and Transparency. This influences the amount of mirror/transparency based at viewing angle. Next to a new Fresnel slider, also a 'falloff' button has been added to define the way it spreads. - Fresnel also works for Ztransp rendering - created new Panel for Raytrace options I have to evaluate still where it all should be logically located. - material preview shows fake reflection and fake refraction as well.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f57961e8482..a94c8e79dd6 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3929,7 +3929,19 @@ static void do_versions(Main *main)
}
}
}
-
+ if(main->versionfile <= 231) {
+ Material *ma= main->mat.first;
+ while(ma) {
+ if(ma->ang==0.0) {
+ ma->ang= 1.0;
+ ma->ray_depth= 2;
+ ma->ray_depth_tra= 2;
+ ma->falloff_mir= 1.0;
+ ma->falloff_tra= 1.0;
+ }
+ ma= ma->id.next;
+ }
+ }
/* don't forget to set version number in blender.c! */
}