POV-Ray : Newsgroups : povray.general : quicker render alternatives to povray : Re: quicker render alternatives to povray Server Time
31 Jul 2024 04:24:42 EDT (-0400)
  Re: quicker render alternatives to povray  
From: Alain
Date: 18 Mar 2008 21:50:58
Message: <47e07f92@news.povray.org>
See my comments in the code

Rahul nous apporta ses lumieres en ce 2008/03/18 01:33:

> *****************************************************************************
> 
> #include "colors.inc"
> #include "textures.inc"
> 
> #declare ATM_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3> metallic}
> #declare RIBBON_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3>}
> #declare SURF_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3>}
3 identical finish declarations.
Change to:
#declare ATM_FINISH = finish{specular 0.9 roughness 0.001 ambient 0.3 metallic}
#declare RIBBON_FINISH = ATM_FINISH
#declare SURF_FINISH = ATM_FINISH

> #declare N_tex = texture { pigment { colour red 0.231 green 0.318 blue 1.000 }
> finish{ ATM_FINISH }}
The pigments can be changed to: pigment{rgb<0.231, 0.318, 1>}
> #declare C_tex = texture { pigment { colour red 0.100 green 0.100 blue 0.100 }
> finish{ ATM_FINISH }}
This can be changed to: pigment{ rgb 0.1}
> #declare O_tex = texture { pigment { colour red 0.700 green 0.000 blue 0.000 }
> finish{ ATM_FINISH }}
No effect on the render time, and only miliseconds on the parse time = totaly 
negligeable. Only shorter code and, in my view, easier to read.
> ....
> [snip]
> ....
> //************ CAMERA *********
> 
> #declare zoom = 15;
> 
> // Define Camera Positions
> #declare xtopview = camera {orthographic direction <1, 0, 0> sky <0, 0, 1> up
> <0, 0, zoom> right<zoom*4/3,0,0> rotate <0,0,180> loca
> tion <0, 0, 20> look_at <0, 0, 0>}
> #declare xfrontview = camera {orthographic location  <0, -20, 0> direction <1,
> 0, 0> sky <0, 0, 1> up <0, 0, zoom> right<zoom*4/3,0>
>  look_at <0, 0,0>}
> 
You may want to use a normal perspective camera. orthographic greatly reduce the 
depth feel.
> .....
> [snip]
> .....
> 
> //************ LIGHTS *********
> 
> #declare Intensity = 1.7;
> 
> light_source
> {
>   0*z // light's position (translated below)
>   color rgb 1.7  // light's color
>   // <widthVector> <heightVector> nLightsWide mLightsHigh
>   area_light
>   <12, 0, 0> <0, 0, 12> // lights spread out across this distance (x * z)
>   4, 4                // total number of lights in grid (4x*4z = 16 lights)
>   adaptive 0          // 0,1,2,3...
>   jitter              // adds random softening of light
>   translate <30, -60, 40>   // <x y z> position of light
>   shadowless
> }
> light_source
> {
>   0*z // light's position (translated below)
>   color rgb 1  // light's color
>   // <widthVector> <heightVector> nLightsWide mLightsHigh
>   area_light
>   <12, 0, 0> <0, 12, 0> // lights spread out across this distance (x * z)
>   6, 6                // total number of lights in grid (4x*4z = 16 lights)
>   adaptive 0          // 0,1,2,3...
>   jitter              // adds random softening of light
>   translate <7.5, 4, 20>   // <x y z> position of light
>   shadowless
> }
Those are area_lights. Even with adaptive 0 and no_shadow, it take longer to 
render. Here, the use of area_light is totaly useless.

> ....
> [snip]
> ....
> //************ Simulation Box ******
> 
> background { color rgb < 1.000, 1.000, 1.000 >}
> 
> 
> //********** CAMERA *************
> 
> camera { xfrontview }
> 
> //********** ATOMS *************
> 
> declare atoms = union {
> sphere   { <1.34073,2.44067,2.09778>,  0.77 texture{C_tex}}
> sphere   { <0.22055,2.50846,2.75588>,  0.73 texture{O_tex}}
> sphere   { <2.20820,2.40215,2.77242>,  0.32 texture{H_tex}}
> sphere   { <-0.54093,2.52909,2.04946>,  0.32 texture{H_tex}}
> sphere   { <0.07183,-0.04000,-0.02136>,  1.3 texture{Pt_tex}}
> sphere   { <2.90433,-0.03858,-0.02034>,  1.3 texture{Pt_tex}}
> sphere   { <1.50770,2.40207,0.19218>,  1.3 texture{Pt_tex}}
> ....
> [around 100 spheres here]
> [snip]
You can do some optimisation here.
> 
> } // End atom union
> object {atoms rotate <0,0,0> translate <-7.50771, -4.47073, 2.07789> scale
> 0.775927395422}
This part have no effect on the render time.
> 
> 
> 
> 
Each atom is individualy textured. It would be much more effecient to group the 
atoms by element in unions and to apply the textures to those "elemental" 
unions. Then, you bind those unions in the "atoms" union to be able to 
manipulate them all as a single object.

-- 
Alain
-------------------------------------------------
EVERYTHING HAS A GENDER

You may not know this but many nonliving things have a gender...

A Hot Air Balloon is Male, because, to get it to go anywhere, you have to light 
a fire under it, and of course, there's the hot air part.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.