POV-Ray : Newsgroups : povray.binaries.animations : radiosity in animation-- a partial solution to 'flicker' : Re: radiosity in animation-- a partial solution to 'flicker' Server Time
25 Apr 2024 09:06:29 EDT (-0400)
  Re: radiosity in animation-- a partial solution to 'flicker'  
From: William F Pokorny
Date: 7 Dec 2020 11:41:17
Message: <5fce5b2d$1@news.povray.org>
On 12/6/20 3:48 PM, Kenneth wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:

> 
> Do you happend to know how those string representations can be 'decoded'? They
> are written as
>    7ffe7   ,  11ba94 , etc.
> 

Probably, but not sure off the top of my head. Let's see if I can find 
the code. Yep. Decoding shown below:

// normals aren't very critical for direction precision,
// so they are packed

sscanf(normal_string, "%02x%02x%02x", &tx, &ty, &tz);
normal[X] = ((double)tx * (1./ 254.))*2.-1.;
normal[Y] = ((double)ty * (1./ 254.))*2.-1.;
normal[Z] = ((double)tz * (1./ 254.))*2.-1.;
normal.normalize();

sscanf(to_nearest_string, "%02x%02x%02x", &tx, &ty, &tz);
to_nearest[X] = ((double)tx * (1./ 254.))*2.-1.;
to_nearest[Y] = ((double)ty * (1./ 254.))*2.-1.;
to_nearest[Z] = ((double)tz * (1./ 254.))*2.-1.;
to_nearest.normalize();

> Is it hexadecimal, perhaps? (Sorry, I'm no longer familiar with hex, from my
> university days long ago; I'm way out of practice with it.)
> 
...
> 
> About 'hacking' the saved radiosity file:
> It's an interesting idea, but will probably not work as intended. Here's an
> example of why:
> 1) I rendered a typical still-image radiosity scene, while saving the rad data
> to a file.
> 2) I re-rendered the scene using the saved data, with always_sample off and
> pretrace_start/end changed to 1.0. At this point, I cannot tell how many 'new'
> radiosity light patches have been created (without doing a 'difference'
> comparison in Photoshop); probably more than what is in the saved file.
> 3) I then opened the file in POV-ray and *erased* 90+ percent of the data lines
> there(!), then re-saved the file.
> 4) I re-rendered the scene again with the 'new' file-- and there are just as
> many radiosity light patches as before, except that most are now
> randomly-placed.
> 
> I had *assumed* that this new file would greatly reduce the number of light
> patches, but that's not the case.
> 
> Apparently,POV-ray is always trying to add new light patches when there are 'not
> enough' (?), or something like that. So, editing/hacking the file may not
> produce the intended results.
> 

Yeah. I'm not sure what might work and what might not. I suspect we 
would at least be able to do things like shift hues by mangling the 
saved colors, but time will tell.

Bill P.


Post a reply to this message

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