global_settings { assumed_gamma 1.5 } default { pigment { rgb 1 } } //background { rgb <0.5,0.7,1> } background { rgb 1 } #declare Hollow=false; /* If true all level 2 sponges will be hollow. */ #declare Debug=true; /* Debug short messages when macroes are invoked */ #declare Render_X_Wall_Only=0 ; /* Creates a wall (or carpet) instead of a sponge. */ #declare s1=" " #declare s2=" " #include "SPONGE.INC" camera { c1 } //object { test_light } object { light_group1 } object { center_light } #declare Sponge_Txtr = texture { pigment { rgb <0.55,1,0.8> } //{ color red 1 } //{ rgb 1 } //finish { diffuse 0.7 } } //Number of objects #declare Render_Level_1 = yes; //20 #declare Render_Level_2 = no; //1 #declare Render_Level_3 = no; //1 #declare Render_Level_4 = no; //20 #declare Render_Level_5 = no; //400 #declare Render_Level_6 = no; //8000 #declare Render_Level_7 = no; //8000 #declare Render_Level_8 = no; //160000 //--------------------------------------------// // -Level 1- // //--------------------------------------------// #if(Render_Level_1) #declare Level0 = mesh { BOX(0,0,0,1,1,1,true,true,true) } #declare Recursion_Level=1; object { Build_Sponge(Level0, Recursion_Level) scale 9 texture { Sponge_Txtr } } #end //--------------------------------------------// // -Level 2- // //--------------------------------------------// #if(Render_Level_2) mesh { Build_Mesh(1) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level3- // //--------------------------------------------// #if(Render_Level_3) mesh { Build_Mesh(2) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level4- // //--------------------------------------------// #if(Render_Level_4) object { Build_Sponge(mesh { Build_Mesh(2) },1) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level5- // //--------------------------------------------// #if(Render_Level_5) object { Build_Sponge(mesh {Build_Mesh(2)},2) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level6- // //--------------------------------------------// #if(Render_Level_6) #declare Level3 = mesh { Build_Mesh(2) } #declare Level5 = union { Build_Sponge2(Level3) scale 1/9 } #undef Level3 object { Build_Sponge(Level5,1) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level7- // //--------------------------------------------// // On a AMD-K6 350 MHz with 96 MB RAM // this level renders in ~ 5 minutes // ( QUICKRES.INI [640x480, No AA] ) #if(Render_Level_7) #declare Level4 = mesh { Build_Mesh(3) scale 1/9 } object { Build_Sponge(Level4,3) texture { Sponge_Txtr } scale 9 } #end //--------------------------------------------// // -Level8- // //--------------------------------------------// #if(Render_Level_8) //#declare Hollow=true; #declare Level4 = mesh { Build_Mesh(3) scale 1/9 } #declare Level6 = union { Build_Sponge2(Level4) scale 1/9 } #undef Level4 union { //Build_Sponge2(Level6) Build_Sponge2_Color(Level6) texture { Sponge_Txtr } } #end #if(Debug) #debug concat(spc1,"\nSPONGE.INC returned ",str(tc,1,0)," triangles") #end