You have to make sure you add filter/transmit to *all* your pigments. It
is not possible to do something like that:
#declare Hero = object {
// your object
texture { ... }
}
object {
Hero
pigment { rgb 1 filter 0.9 }
}
because that would use the last texture only for non-textured parts of
the hero object. One way is to do sth like this:
//hero.inc
#ifndef(FILTER) #declare FILTER = 0; #end
#declare Hero = object {
...
texture {
pigment { ... filter FILTER }
...
}
}
//main scene file
#declare FILTER = 0;
#include "hero.inc"
object { Hero translate somewhere }
#declare FILTER = 0.5;
#include "hero.inc"
object { Hero translate somewhereelse }
You'll have to include your hero file anew each time you change the
FILTER setting, because it's evaluated at parse-time. An other option
would be to let a macro create your hero object and call the macro with
an appropriate filter parameter.
HTH,
Florian
Post a reply to this message
|