POV-Ray : Newsgroups : povray.general : Does declaring an object reduce the rendering time? : Re: Does declaring an object reduce the rendering time? Server Time
13 Jul 2024 09:03:50 EDT (-0400)
  Re: Does declaring an object reduce the rendering time?  
From: Mr
Date: 4 May 2020 02:35:00
Message: <web.5eafb768c7817eb16adeaecb0@news.povray.org>
"Kima" <nomail@nomail> wrote:
> Consider
> union{
>     sphere{<0,0,0>,1}
>     sphere{<1,0,0>,1}
>     sphere{<2,0,0>,1}
> .... 10,000th sphere
> texture{}
> }
> Is the rendering faster if we write it as
> #declare S=sphere{<0,0,0>,1}
> union{
>     object{S translate<0,0,0>}
>     object{S translate<1,0,0>}
>     object{S translate<2,0,0>}
> .... 10,000th object
> texture{}
> }
> Note that the question is not about applying texture and normals, as they are
> applied after the union.
> I understand that the latter case consumes less memory, but the key problem is
> the rendering time.
> To my understanding, the time-consuming process is when POVRAY applies the
> light. Otherwise, placing the object is the rapid step.

I'm glad an initial declaration is indeed what we chose for Blender exporter, so
that Blender user object instances are kept as POV instances with only a matrix
transform. It made a huge difference when we did that change, though I'm sure
it's the place where subtle changes are to be optimized to hunt for even more
potential improvement.

Post a reply to this message

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