POV-Ray : Newsgroups : povray.binaries.programming : Blurred transparence patch - BlurTrans.zip (1/1) Server Time: 21 Sep 2020 16:12:19 GMT
  Blurred transparence patch - BlurTrans.zip (1/1) (Message 1 to 1 of 1)  
From: Chris Huff
Subject: Blurred transparence patch - BlurTrans.zip (1/1)
Date: 26 Jan 2000 22:55:25
Message: <chrishuff_99-24522A.17542326012000@news.povray.org>
Here it is, the new version of my blurred transparence patch. It is 
quite a bit different from my previous patch in both syntax and the way 
it is coded. This version is based on the MegaPOV 0.3 source, so you 
need to have a working compile of MegaPOV 0.3 in order to use it.
I haven't had the time to write any decent documentation, but this is 
the syntax for the blurred transparence patch, it should be pretty 
obvious:

finish {
    transparence {
        transparence_blur AMOUNT
        blur_samples SAMPLES
    }
}
global_settings {
    transparence {
        blur_samples SAMPLES
        blur_max_trace LEVEL
        blur_max_adc AMOUNT
    }
}


These are the files I had to modify and a brief description of the 
changes in each one.

frame.h (Finish_Struct data)
tokenize.c (added tokens)
parse.h (added tokens)
parstxtr.c (added parse code to Parse_Finish)
parse.c (global_settings parse code)
povray.h (added Transparence_Blur_Max, Transparence_Blur_Max_ADC 
variables for global_settings options)
povray.c (added initializers for global_settings options)
texture.c (added initializers for finish variables)
lighting.c (modified Refract(), Refract_Guts(), BacktraceRefract(), 
compute_backtrace_texture(), etc. to allow blur, and added 
Blurry_Trace(). Photons, motion blur, etc should work fine, but are 
untested.)


Note: In layered textures, only the top layer will blur transparency. I 
will try to fix this in a later version, but it shouldn't be a serious 
problem for now.
Also, there is a "fix" for something that might be a bug with the 
max_adc global setting for blurred reflection. It was stored as an 
integer, and I think it should be a float. Those changes are in parse.c 
and povray.h.
Also, this patch has just barely been tested. I don't think there are 
any bugs left(other than the thing with layered textures), but there are 
no guarantees.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message


Attachments:
Download 'BlurTrans.zip' (189 KB)

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