POV-Ray : Newsgroups : povray.newusers : Texture declarations and object grouping : Re: Texture declarations and object grouping Server Time
5 Nov 2024 01:25:05 EST (-0500)
  Re: Texture declarations and object grouping  
From: Tom Melly
Date: 5 Feb 2001 09:50:37
Message: <3a7ebdbd$1@news.povray.org>
"The Cegorach" <ceg### [at] yahoocom> wrote in message
news:u7dt7t4d0icvdmt1h1nv954dlebkd0ucg1@4ax.com...
>
> Is there any advantage to grouping all of the columns around a
> particular building in one declared group, and defining their texture
> at that group level, as opposed to leaving the texture declaration
> within the declaration of "Column?"
>

Well, I've run a quick test using the code below and moving the texture
parts from one place to another.

It is quicker to place your texture definitions as "late" as possible (i.e.
against the union rather than the object). This is only an issue with
parse-time, since the code is plainly quicker to execute (less texture
definitions to parse). Render time is unaffected, since the final scene is
the same.

light_source{<0,0,0> color rgb<1,1,1> translate <-30, 30, -30>}
camera{location  <0.0, 5, -10.0> look_at   <0.0, 0.5,  0.0>}

#declare test_object =
  sphere{0,1}

#declare n = 0;
union{
  #while(n<= 50000)
    object{
      test_object
      translate z* (2*n)
      texture{pigment{White} normal{agate}} // slower parsing here
    }
    #declare n = n + 1;
  #end
  texture{pigment{White} normal{agate}} // faster parsing here
}


Post a reply to this message

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