grt-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[grt-talk] RGBTF colors?


From: Nikodemus Siivola
Subject: [grt-talk] RGBTF colors?
Date: Thu, 17 Jul 2003 16:23:21 +0300
User-agent: Mutt/1.5.4i

Just thinking out loud:

I know that it was I who originally said that transmission and
filtering are properties of surface, not color... but.

It just dawned to me that the ugliest aspects of shader-system can be
circumvented if we have RGBTF-colors.

Let me explain: Plain shaders give us only solid shadows. Soft shadows
will happen with area-lights, yes, but *transparent* shadows would
require photons with shaders and RGB-colors.

Alternative each object can also have a filter-function that gives the
attenuation at intersection point for a shadow-ray.

Or we could do the RenderMan thing and have a constant Opacity per
object. Or, or, or...

The problem with these solutions is that they're payoff is small
compared to the work and architecture required.

However, if colors have filter and transmission components, then
shader-functions can provide the information required -- and with no
extra work in the usual cases. 

The efficiency will be ok with a minor addition to
ray-semantics: shadow rays have a negative depth. Then SHADER can
become:

(defmacro shader (&body forms)
   `(lambda (*ray*)
       (cond ((minusp (ray-depth *ray*)) (local-color pigment))
             (t ,@forms))))

Those who need wish to write shaders without procedural pigments, or
shaders that filter light "abnormally" cannot naturally use this, but
since the whole macro is ment to be a "common case" convenience that's
ok.

What do we lose? We lose the nice theoretical separation between color
and other surface properties. Can't think of anything else right now.


Cheers,

 -- Nikodemus

Attachment: pgpb6GAnUSgAo.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]