POV-Ray : Newsgroups : povray.general : Does declaring an object reduce the rendering time? : Does declaring an object reduce the rendering time? Server Time
23 Apr 2024 10:47:15 EDT (-0400)
  Does declaring an object reduce the rendering time?  
From: Kima
Date: 3 May 2020 11:40:00
Message: <web.5eaee4abf2f979bdecc0fada0@news.povray.org>
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.


Post a reply to this message

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