[Bf-extensions-cvs] [eaf47415] master: *Added POV Scene Description Language templates to be used by text editor

Maurice Raybaud noreply at git.blender.org
Sun Jun 11 16:31:24 CEST 2017


Commit: eaf47415b2687621fb0e542ba4195476d1e6c7d8
Author: Maurice Raybaud
Date:   Sun Jun 11 16:31:00 2017 +0200
Branches: master
https://developer.blender.org/rBAeaf47415b2687621fb0e542ba4195476d1e6c7d8

*Added POV Scene Description Language templates to be used by text editor

===================================================================

A	render_povray/templates_pov/abyss.pov
A	render_povray/templates_pov/biscuit.pov
A	render_povray/templates_pov/bsp_Tango.pov
A	render_povray/templates_pov/chess2.pov
A	render_povray/templates_pov/cornell.pov
A	render_povray/templates_pov/diffract.pov
A	render_povray/templates_pov/diffuse_back.pov
A	render_povray/templates_pov/float5.pov
A	render_povray/templates_pov/gamma_showcase.pov
A	render_povray/templates_pov/grenadine.pov
A	render_povray/templates_pov/isocacti.pov
A	render_povray/templates_pov/mediasky.pov
A	render_povray/templates_pov/patio-radio.pov
A	render_povray/templates_pov/subsurface.pov
A	render_povray/templates_pov/wallstucco.pov

===================================================================

diff --git a/render_povray/templates_pov/abyss.pov b/render_povray/templates_pov/abyss.pov
new file mode 100644
index 00000000..6cb39da8
--- /dev/null
+++ b/render_povray/templates_pov/abyss.pov
@@ -0,0 +1,834 @@
+// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
+// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
+// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
+
+// Persistence Of Vision raytracer sample file.
+//============================================
+// The field, new improved version  October. 2001
+// Copyright Gilles Tran 2001 
+// http://www.oyonale.com
+//--------------------------------------------
+// Render with a 2.67 ratio such as 320*120, 640*240, 1024*384, 1280*480
+//--------------------------------------------
+// -w320 -h120
+// -w640 -h240 +a0.1
+// -w768 -h288 +a0.1
+// -w1024 -h384 +a0.1
+
+// Uncomment AreaOK=true below to turn on the area light
+// This will blur the shadow under the submarine
+// but the rendering time will extremely slow
+
+#version 3.6;
+
+global_settings{ assumed_gamma 1.0 max_trace_level 15 }
+
+#declare AreaOK=false;
+//#declare AreaOK=true;
+
+#include "colors.inc"
+#include "functions.inc"
+//============================================
+// General
+//============================================
+//--------------------------------------------
+// Camera
+//--------------------------------------------
+#declare PdV=<-20, -20, -400>;
+camera{
+        location PdV
+        angle 65 //   direction z*2
+        up y
+        right x*image_width/image_height // keep propotions with any aspect ratio  //right 8*x/3
+        look_at <-20, 30, 0>
+}
+
+//--------------------------------------------
+// reorientation macro
+//--------------------------------------------
+#macro mOrient(P1,P2)
+#local yV1=vnormalize(P2-P1);
+#local xV1=vnormalize(vcross(yV1,z));
+#local zV1=vcross(xV1,yV1);
+                matrix <xV1.x,xV1.y,xV1.z,yV1.x,yV1.y,yV1.z,zV1.x,zV1.y,zV1.z,P1.x,P1.y,P1.z>
+#end
+
+//--------------------------------------------
+// colors
+//--------------------------------------------
+#declare colWater1=rgb<0,79,159>/255;
+#declare colWater2=rgb<7,146,217>/255;
+#declare colWater3=rgb<82,239,238>/255;
+#declare colSub=<7/255,146/255,217/255>;
+
+//--------------------------------------------
+// lights
+//--------------------------------------------
+light_source {<-10, 1000, -10> color colWater2*10
+#if (AreaOK)
+    area_light x*200,z*200, 3,3 adaptive 1 jitter orient
+#end
+
+}
+light_source {<-200, -1000, -300> color colWater2*2 shadowless media_interaction off}
+light_source {PdV color colWater2*2 shadowless media_interaction off}
+
+//--------------------------------------------
+// mine textures
+//--------------------------------------------
+#declare txtMine=texture {
+        pigment{color colWater3*0.1}
+        finish{ambient 0 diffuse 0.4 specular 0.03 roughness 0.2 reflection 0.05}
+}
+#declare txtCable=texture {
+        pigment{color colWater3*0.1}
+        finish{ambient 0 diffuse 0.1 specular 0.02 roughness 0.2}
+}
+
+//--------------------------------------------
+// sub textures
+//--------------------------------------------
+#declare txtSkin=texture{
+        pigment{
+                function{min(1,max(0,y))}
+                turbulence 0.01 omega 1.5 lambda 5 poly_wave 1.5
+                color_map{[0 Clear][0.25  rgbt<0,0,0,0.7>] [0.4 rgbt<0,0,0,0.3>]}
+                scale 38 translate -y*17
+                }
+                
+        finish{ambient 0 diffuse 0.6 specular 0.1 roughness 1/10}
+}
+#declare trb=0.0001;
+#declare pigLettre=pigment{bozo color_map{[0 White*1.3][1 White*0.5]}}
+#declare txtLettre=texture{ // submarine name
+        pigment {
+                object {
+                        text{ttf "cyrvetic.ttf" "PERSISTENCE" 10, 0.3*x
+                             translate -z*0.5 scale <1,1,10>
+                        }
+                        pigment{color Clear}, pigment{pigLettre}
+                }
+                rotate y*90
+        scale 1.5 translate <-10,-1,-25>
+        }
+
+        finish{ambient 0 diffuse 0.4}
+
+}
+
+#declare txtSub0=texture {
+    pigment{rgb colSub*0.2}
+    finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+}
+// Thanks to Bob H. for the help regarding these textures
+#declare txtSubBase=texture {
+    pigment {
+    
+        cells
+        color_map {
+            [.45 rgb <colSub.x*0.1,colSub.y*0.1,colSub.z*0.1>]
+            [.55 rgb <colSub.x,colSub.y,colSub.z>*0.8]
+        }
+        scale <100,.125,1>
+    }
+    
+    scale 3
+    finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+}
+
+#declare txtSubTop=
+
+    texture{txtSubBase}
+    texture {
+        pigment {
+            cells
+            color_map {
+                [.25 rgbf <colSub.x*0.1,colSub.y*0.1,colSub.z*0.1,0>]
+                [.75 rgbf <colSub.x,colSub.y,colSub.z,1>]
+            }
+            scale <100,0.75,1>
+        }
+        scale 3.5
+        finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+    }
+
+    texture {
+        pigment {
+            cells
+            color_map {
+                [.25 rgbf <colSub.x*0.4,colSub.y*0.4,colSub.z*0.4,0>]
+                [.75 rgbf <colSub.x,colSub.y,colSub.z,1>]
+            }
+            scale <100,0.45,1>
+        }
+        scale 2.5
+        finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+    }                                 
+    
+    texture{txtSkin}
+
+#declare txtSubBottom=
+
+    texture{txtSubBase}
+    
+    texture {
+        pigment {
+            cells
+            color_map {
+                [.25 rgbf <colSub.x*0.5,colSub.y*0.5,colSub.z*0.5,0>]
+                [.75 rgbf <colSub.x,colSub.y,colSub.z,1>]
+            }
+            scale <100,.75,1>
+        }
+        scale 5
+        finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+    }
+    
+    texture {
+        pigment {
+            cells
+            color_map {
+                [0 rgbf <colSub.x*0.5,colSub.y*0.5,colSub.z*0.5,.5>]
+                [1 rgbf <colSub.x,colSub.y,colSub.z,1>]
+            }
+            scale <100,0.25,1>
+        }
+        scale 5
+        translate 1
+        finish {ambient 0 diffuse 0.3 specular 0.05   roughness 0.1}
+    } 
+    
+    texture{txtLettre}  
+    texture{txtSkin}
+
+
+//============================================
+// Mine
+//============================================
+//--------------------------------------------
+// Spikes
+//--------------------------------------------
+
+#declare Spike = union{
+        #declare rSpike1=0.08;
+        #declare rSpike2=rSpike1*0.3;
+        #declare ySpike=0.4;
+        cone{0,rSpike1,y*ySpike,rSpike2}
+        sphere{0,rSpike2 translate y*ySpike}
+        sphere{0,rSpike1*1.5 scale <1,0.3,1>}
+        #declare i=0;#while (i<360) sphere{0,0.015 scale <2,1,2> translate <rSpike1*2.8,-0.04,0> rotate y*i} #declare i=i+30;#end
+        translate y
+}
+
+
+
+
+
+//--------------------------------------------
+// Mine body
+//--------------------------------------------
+#declare rd=seed(0);
+#declare MineBody=union {
+        isosurface {
+                function{x*x+y*y+z*z-1 +f_noise3d(x*10,y*10,z*10)*0.05}
+                max_gradient 2.492
+                contained_by{sphere{0,1}}
+        }
+
+        #declare i=0;
+        #while (i<360)
+                #declare j=0;
+                #while (j<180)
+                        object{Spike rotate z*(i+rand(rd)*2) rotate y*(j+rand(rd)*2)}
+                        #declare j=j+45;
+                #end
+                #declare i=i+45;
+        #end
+
+        object{Spike rotate 90*y}
+        object{Spike rotate -90*y}
+        rotate 360*rand(rd)
+
+}
+
+//--------------------------------------------
+// Mine cable and decorative collar
+//--------------------------------------------
+#declare rFil=0.03;
+#declare yFil=100;
+#declare MineCable=isosurface{
+        function{f_helix1(x,y,z,3,35,0.35*rFil,0.55*rFil,2,1,0)}
+        contained_by {box {<-rFil,0,-rFil>,<rFil,yFil,rFil>}}
+        max_gradient 2.552
+        scale <1,-1,1>*3 translate -y
+}
+
+
+#declare MineCollar=lathe{
+	cubic_spline
+	15,
+	<0.058,0.003>,<0.081,0.000>,<0.101,0.055>,<0.099,0.085>,<0.104,0.132>,<0.066,0.152>,
+	<0.095,0.169>,<0.089,0.194>,<0.144,0.227>,<0.143,0.281>,<0.145,0.307>,<0.109,0.325>,
+	<0.067,0.353>,<0.031,0.362>,<0.030,0.363>
+	translate -y*0.363
+}
+
+//--------------------------------------------
+// Mine
+//--------------------------------------------
+#declare Mine=union{
+        object{MineBody}
+        sphere{0,1 scale <0.4,0.14,0.4> translate -y*0.91}
+        #declare i=0;#while (i<360) cylinder{0,-y*0.1,0.02 translate <0.35,-0.91,0> rotate y*i} #declare i=i+30;#end
+        object{MineCollar scale <1.2,2,1.2> translate -y*0.92}
+        object{MineCollar translate -y*2}
+        object{MineCable}
+        texture{txtMine}
+}
+
+
+
+//============================================
+// Submarine
+//============================================
+#declare Sc=3; // general scaling parameter
+#declare SX=6*Sc; // x scaling
+#declare SYbot=10*Sc;// y scaling for the bottom
+#declare SYtop=2*Sc; // y scaling for the top
+#declare SZfront=20*Sc; // z scaling for the front
+#declare SZrear=100*Sc;// z scaling for the rear
+
+//--------------------------------------------
+// Main parts
+//--------------------------------------------
+#declare Part1=blob{ // bottom front
+        threshold 0.6
+        sphere{0,1,1}
+        cylinder{-z*2,z,0.04,-1 translate <-0.2,-0.3,1> pigment{Black}}
+        cylinder{-z*2,z,0.04,-1 translate <-0.17,-0.18,1> pigment{Black}}
+        sphere{0,1,1 scale <0.1,0.45,1.05>}
+        sphere{0,1,1 scale <0.3,0.45,0.8>}
+}
+#declare Part2=blob{ // top front
+        threshold 0.6
+        sphere{0,1,1}
+        sphere{0,1,1 scale <0.3,0.45,0.8>}
+        sphere{0,1,1 scale <0.2,1.2,1.05>}
+}
+#declare Part3=blob{ // bottom rear
+        threshold 0.6
+        sphere{0,1,1}
+        cylinder{-x,0,1,1 scale <0.5,0.03,0.02> translate <0,-0.05,0.45>}
+ 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list