POV-Ray : Newsgroups : povray.binaries.images : Futrther ligthdome development and testing : Futrther ligthdome development and testing Server Time
30 Jul 2024 18:16:08 EDT (-0400)
  Futrther ligthdome development and testing  
From: Trevor G Quayle
Date: 18 Feb 2011 17:00:01
Message: <web.4d5eeb26ace0ebf381c811d20@news.povray.org>
I have been doing some more development with my HDR lightdome system.  To speed
up parsing, the current system 'pixelizes' the HDR to do the calculations
according to the user setting, rather than sampling every pixel.  (e.g for a
setting of 200, it would pixelize it into 400x200).  However, this meant that
small, localized light sources could get missed, so the only choice was to
increase the pixelization level, which exponentially increases parse time.  I
have been experimenting with adding in a subsampling system with some good
results.
If first try to establish a general lighting profile of the base pixelization,
which is based on a power curve passing through 3 values: <0,0>, <0.5, A=total
average colour of the pixeled image>, <1, M=maximum sampled colour of the
image>.   From these I get the exponential power 'P' for the curve y=Mx^P, for a
general distribution curve.  Then I set a sub-sample threshold as a % of the
maximum value (e.g. x=0.9=90%).  For any pixel sample that is greater than the
corresponding colour (y), subsampling gets initiated.  Essentially the sampled
'pixel' is divided into 3x3 and the 8 new samples are taken in the immediate
vicinity (the 9th sample is the center which is already known).  If any of these
values is greater than the previously sampled value, then it is substituted in,
and that sub-pixel is then further sub-sampled in the same manner, and so on.  I
have added in two recursion limiters 1) variance value, if the previous sample
is within the variance of the new sample (eg. 0.99), thne recursion is
terminated. 2) number of recursions, if the recursion limit is reached, it is
terminated.

In the attached image, the HDR used for the lighting has a very bright but small
sun.    Based on manually checking, the maximum pixel value in the HDR is
~10,294.  For the top image, a pixel level of 200 is used, the maximum pixel
value found is 1,689 (~16% of the actual max).  In the bottom image, the
sub-sample threshold is set to 0.9, the susbsample variance is set to 0.99, and
the recursion limit is set to 5.  The parse (not including render) time for the
top image was 26.25s.  For the bottom image, the parse time was 28.75s.  To get
the equivalent pixelization level would mean setting the value at 48,600 instead
of 200, and parsing (if even possible) would be expected to take at least 60,000
times as long (3^5^2=59,049) or about 18 days!


Post a reply to this message


Attachments:
Download 'lightdome-sstest.jpg' (476 KB)

Preview of image 'lightdome-sstest.jpg'
lightdome-sstest.jpg


 

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