Autor Tema: Escena de Eagle3D con un background muy pesado  (Leído 1666 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado cdrpo

  • PIC18
  • ****
  • Mensajes: 317
Escena de Eagle3D con un background muy pesado
« en: 04 de Febrero de 2010, 01:33:07 »
Hola

El background de la siguiente escena se tarda una eternidad
?Como se podría simplificar el tiempo computacional de renderizado?

http://www.imagico.de/

Código: C++
  1. // Persistence Of Vision Ray Tracer Scene Description File
  2. // File: radiosity.pov
  3. // Vers: 3.5
  4. // Desc: radiosity demo scene
  5. // Date: August 2001
  6. // Auth: Christoph Hormann http://www.imagico.de/
  7.  
  8. // -w320 -h240
  9. // -w512 -h384 +a0.3
  10.  
  11. #version 3.5;
  12.  
  13. global_settings {
  14.   assumed_gamma 1
  15.    
  16.         /*
  17.   radiosity {             // --- Settings 1 (fast) ---
  18.     pretrace_start 0.08
  19.     pretrace_end   0.02
  20.     count 50
  21.     error_bound 0.5
  22.     recursion_limit 1
  23.   }     */
  24.      /*  
  25.   radiosity {             // --- Settings 2 (medium quality) ---
  26.     pretrace_start 0.08
  27.     pretrace_end   0.01
  28.     count 120
  29.     error_bound 0.25
  30.     recursion_limit 1
  31.   }  */
  32.        
  33.   radiosity {             // --- Settings 3 (high quality) ---
  34.     pretrace_start 0.08
  35.     pretrace_end   0.00125
  36.     count 800
  37.     error_bound 0.05
  38.     recursion_limit 1
  39.   }      
  40.        /*
  41.   radiosity {             // --- Settings 4 (medium quality, recursion_limit 2) ---
  42.     pretrace_start 0.08
  43.     pretrace_end   0.005
  44.     count 350
  45.     error_bound 0.15
  46.     recursion_limit 2
  47.   }      */
  48. }
  49.  
  50. fog {
  51.   fog_type 2
  52.   fog_alt 1.3
  53.   fog_offset 0
  54.   color rgb <0.7, 0.8, 0.9>
  55.   distance 800
  56. }
  57.  
  58. // ===================================================
  59.  
  60.  
  61. camera {                  // --- Camera 1 ---
  62.   location    <2.8, 12.3, 6.0>
  63.   right       (4/3)*x
  64.   look_at     <0, 0.4, 0>
  65.   angle       25
  66. }
  67.  
  68. /*
  69. camera {                  // --- Camera 2 ---
  70.   ultra_wide_angle
  71.   location    <7.5, 1.3, 6.5>
  72.   right       (4/3)*x
  73.   look_at     <0, 1.3, 0>
  74.   angle       126
  75. }*/
  76.  
  77. // ===================================================
  78.  
  79. // --- Three alternative light sources,
  80. // --- also try without light
  81.  
  82.  /*
  83. light_source {            // --- Light 1 ---
  84.   <-5000, 14000, 15000>
  85.   color rgb <1.0, 0.9, 0.78>*0.3
  86. }  */
  87.  
  88.  
  89. /*
  90. light_source {            // --- Light 2 ---
  91.   <-5000, 4000, 15000>
  92.   color rgb <1.1, 0.93, 0.78>*2.1
  93. }*/
  94.  
  95. /*
  96. light_source {            // --- Light 3 ---
  97.   <5000, 14000, -15000>
  98.   color rgb <1.0, 0.9, 0.78>*2.3
  99. }*/
  100.  
  101. // ===================================================
  102.  
  103. sphere {                  // --- Sky ---
  104.   <0, 0, 0>, 1
  105.   texture {
  106.    pigment {
  107.      gradient y
  108.      color_map {
  109.        [0.0 color rgb < 3.0, 3.0, 3.0 >]
  110.        [0.3 color rgb < 1.5, 1.6, 1.5 >]
  111.      }
  112.    }
  113.    finish { diffuse 0 ambient 1 }
  114.   }
  115.   scale 10000
  116.   hollow on
  117.   no_shadow
  118. }
  119.  
  120. // ===================================================
  121.  
  122. #declare Tex_1=
  123. texture {
  124.   pigment {
  125.     color rgb 0.8
  126.   }
  127.   finish {
  128.     ambient 0.0
  129.     diffuse 0.6
  130.     specular 0.0
  131.   }
  132. }
  133.  
  134. #declare Tex_2=
  135. texture {
  136.   pigment {
  137.     color rgb <0.9, 0.65, 0.3>
  138.   }
  139.   finish {
  140.     ambient 0.0
  141.     diffuse 0.6
  142.   }
  143. }
  144.  
  145. // ===================================================
  146.  
  147. plane {
  148.   y, 0
  149.   texture { Tex_2 }
  150. }
  151.  
  152. #declare Column_Block=
  153. union {
  154.   #declare Cnt=0;
  155.   #while (Cnt < 8.8)
  156.     cylinder { <4.4, 0.2, 4.4-Cnt>, <4.4, 3.6, 4.4-Cnt>, 0.2 }
  157.     #declare Cnt=Cnt+(8.8/6);
  158.   #end
  159. }
  160.  
  161. #declare Walls=
  162. difference {
  163.   box { <-10, -0.1, -10>, <10, 4, 10> }
  164.   box { < -9,  0.3,  -9>, < 9, 3.5,  9> }
  165.   box { < -4,  0.1,  -4>, < 4, 5,  4> }
  166.  
  167.   intersection {
  168.     merge {
  169.       cylinder { <0, 0.3, 0>, <0, 0.3, 12>, 2 }
  170.       cylinder { <0, 0.3, 0>, <0, 0.3, 12>, 2 rotate 180*y }
  171.       cylinder { <0, 0.3, 0>, <0, 0.3, 12>, 2 rotate  90*y }
  172.       cylinder { <0, 0.3, 0>, <0, 0.3, 12>, 2 rotate -90*y }
  173.     }
  174.     plane { y, 0.3 inverse }
  175.   }
  176. }
  177.  
  178. #declare Col_Base=
  179. difference {
  180.   box { <-4.7,    0, -4.7>, <4.7, 3.6, 4.7> }
  181.   box { <-4.1, -0.1, -4.1>, <4.1,   4, 4.1> }
  182.   box { < -5,  0.5,  -5>, < 5, 3.3,  5> }
  183. }
  184.  
  185. union {
  186.   object { Walls }
  187.   object { Column_Block }
  188.   object { Column_Block rotate 180*y }
  189.   object { Column_Block rotate  90*y }
  190.   object { Column_Block rotate -90*y }
  191.   object { Col_Base }
  192.   texture { Tex_1 }
  193. }
  194.            
  195. union{          
  196. #declare X=-4.1;
  197. #while (X < 4.1)
  198.  
  199.     #declare Y=-4.1;
  200.     #while (Y < 4.1)
  201.         cylinder { <X, -0.2, Y>, <X, 0.2, Y>, 0.1  texture { Tex_1 }}
  202.         sphere { <X, 0.2, Y> 0.1  texture { Tex_1 }}
  203.         sphere { <X+0.1, 0.1, Y+0.1> 0.1  texture {
  204.   pigment {
  205.     color rgb 1.8
  206.   }
  207.   finish {
  208.     ambient 0.0
  209.     diffuse 0.6
  210.     specular 0.0
  211.   }
  212. }}
  213.         #declare Y=Y+0.2;
  214.     #end
  215.    
  216.     #declare X=X+0.2;
  217.  
  218. #end
  219.  
  220. }
  221.  
  222.  
  223. //changes the apperance of resistors (1 Blob / 0 real)
  224. #declare global_res_shape = 1;
  225. //randomize color of resistors 1=random 0=same color
  226. #declare global_res_colselect = 0;
  227. //Number of the color for the resistors
  228. //0=Green, 1="normal color" 2=Blue 3=Brown
  229. #declare global_res_col = 1;
  230. //Set to on if you want to render the PCB upside-down
  231. #declare pcb_upsidedown = off;
  232. //Set to x or z to rotate around the corresponding axis (referring to pcb_upsidedown)
  233. #declare pcb_rotdir = x;
  234. //Set the length off short pins over the PCB
  235. #declare pin_length = 2.5;
  236. #declare global_diode_bend_radius = 1;
  237. #declare global_res_bend_radius = 1;
  238. #declare global_solder = on;
  239.  
  240. #declare global_show_screws = on;
  241. #declare global_show_washers = on;
  242. #declare global_show_nuts = on;
  243.  
  244. #declare global_use_radiosity = on;
  245.  
  246. #declare global_ambient_mul = 0;
  247. #declare global_ambient_mul_emit = <50,50,80>;
  248.  
  249. //Animation
  250. #declare global_anim = off;
  251. #local global_anim_showcampath = no;
  252.  
  253. #declare global_fast_mode = off;
  254.  
  255. #declare col_preset = 2;
  256. #declare pin_short = on;
  257.  
  258. #declare env = off;
  259.  
  260. #local cam_x = 0;
  261. #local cam_y = 344;
  262. #local cam_z = -184;
  263. #local cam_a = 20;
  264. #local cam_look_x = 0;
  265. #local cam_look_y = -8;
  266. #local cam_look_z = 0;
  267.  
  268. #local pcb_rotate_x = 0;
  269. #local pcb_rotate_y = 0;
  270. #local pcb_rotate_z = 0;
  271.  
  272. #local pcb_board = on;
  273. #local pcb_parts = on;
  274. #local pcb_wire_bridges = off;
  275. #if(global_fast_mode=off)
  276.         #local pcb_polygons = on;
  277.         #local pcb_silkscreen = on;
  278.         #local pcb_wires = on;
  279.         #local pcb_pads_smds = on;
  280. #else
  281.         #local pcb_polygons = off;
  282.         #local pcb_silkscreen = off;
  283.         #local pcb_wires = off;
  284.         #local pcb_pads_smds = off;
  285. #end
  286.  
  287. #local lgt1_pos_x = 38;
  288. #local lgt1_pos_y = 56;
  289. #local lgt1_pos_z = 42;
  290. #local lgt1_intense = 0.814286;
  291. #local lgt2_pos_x = -38;
  292. #local lgt2_pos_y = 56;
  293. #local lgt2_pos_z = 42;
  294. #local lgt2_intense = 0.814286;
  295. #local lgt3_pos_x = 38;
  296. #local lgt3_pos_y = 56;
  297. #local lgt3_pos_z = -28;
  298. #local lgt3_intense = 0.814286;
  299. #local lgt4_pos_x = -38;
  300. #local lgt4_pos_y = 56;
  301. #local lgt4_pos_z = -28;
  302. #local lgt4_intense = 0.814286;
  303.  
  304. //Do not change these values
  305. #declare pcb_height = 1.500000;
  306. #declare pcb_cuheight = 0.035000;
  307. #declare pcb_x_size = 100.000000;
  308. #declare pcb_y_size = 80.000000;
  309. #declare pcb_layer1_used = 1;
  310. #declare pcb_layer16_used = 1;
  311. #declare inc_testmode = off;
  312. #declare global_seed=seed(948);
  313. #declare global_pcb_layer_dis = array[16]
  314. {
  315.         0.000000,
  316.         0.000000,
  317.         0.000000,
  318.         0.000000,
  319.         0.000000,
  320.         0.000000,
  321.         0.000000,
  322.         0.000000,
  323.         0.000000,
  324.         0.000000,
  325.         0.000000,
  326.         0.000000,
  327.         0.000000,
  328.         0.000000,
  329.         0.000000,
  330.         1.535000,
  331. }
  332. #declare global_pcb_real_hole = 2.000000;
  333.  
  334. #include "tools.inc"
  335. #include "user.inc"    
  336.  
  337. //#include "c:\eagle3d\povray\tools.inc"
  338. //#include "c:\eagle3d\povray\user.inc"
  339.  
  340.  
  341.  
  342. //#include "test2.pov"  
  343.                        
  344. //object{ TEST2(-28.500000,5.7,-28.000000,0,0,0) scale 0.07 rotate<0,-90,0> translate<0,0,-0.8>}
  345.  
  346. /*
  347. #include "modsmega.pov"   // incluya aca la escena de su PCB
  348. object{  MODSMEGA(-49.530000,2.5,-39.370000,0,0,0) rotate<0,90,0> scale 0.07
  349.   finish {
  350.     ambient 0.0
  351.     diffuse 0.6
  352.   }
  353.    }
  354. */  


 

anything