POV-Ray : Newsgroups : povray.advanced-users : output an octree file : Re: output an octree file Server Time
28 Sep 2024 18:54:16 EDT (-0400)
  Re: output an octree file  
From: jazzman
Date: 12 Aug 2010 18:00:00
Message: <web.4c646dd0e632d53a9ea3f41b0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> jazzman wrote:
>
> > I was wondering if someone knows if there's an option to output an octree of the
> > rendered scene from POV-ray. All I need is to know for each cell in a 3d grid of
> > the scene whether it's occupied or not.
>
> I'm not sure if the internal data built during the render
> is suitable for your needs, but even if so you'd need to
> modify the source code of POV-Ray to get at it.
>
> Alternatively, you can divide the scene into cubes in SDL
> and use the trace function to check if they're empty or not
> (within some error margin). In 3.7 you could even write
> the data out in a binary format (such as df3).

Could you please specify how exactly I'm supposed to divide the scene up into
cubes? I'm not an expert in the SDL, so pointers to specific functions would be
helpful.
Also, how does the macro "trace" help me find out which cubes contain objects?
From my understanding, the macro traces a specific ray and returns its color.


Post a reply to this message

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