|
|
Chris Colefax's Lens Effect include file has a few disadvantages: sometimes it
substracts color from the background instead of adding to it, and you need a
high max_trace_level for it to work properly.
I tried to make my own lensflare-system to compensate for this problems. First I
tried with functions, but that seemed to be way too slow. This is a test with
averaging pigments. The lensflare itself consists only of 1 plane directly in
front of the camera (using screen.inc :)), with only 1 texture. There is only
one, quite big, problem with this technique: multi-colored lensflares are
impossible, because the colors average to gray :-/
It's a TIP, but again a useless TIP in most cases. Is there a fast way to
combine pigments in an additive way? (already found an addictive way though)
cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x) // ZK http://www.povplace.com
Post a reply to this message
Attachments:
Download 'lensflare.jpg' (50 KB)
Preview of image 'lensflare.jpg'
|
|