POV-Ray : Newsgroups : povray.newusers : trying to fade an object Server Time
1 Nov 2024 11:13:27 EDT (-0400)
  trying to fade an object (Message 1 to 3 of 3)  
From: Barehunter
Subject: trying to fade an object
Date: 25 Sep 2005 15:50:00
Message: <web.4336ff63c2a0a642bb5b55ca0@news.povray.org>
I am trying to render an action sequence. What I'd like to do is have my
"hero" in two positions, but the first location I want him to be somewhat
transparent so to show a motion from first to second position. I tried
adding filter to the called object but didn't notice a change. how do I
fade this object?


Post a reply to this message

From: Florian Brucker
Subject: Re: trying to fade an object
Date: 26 Sep 2005 14:07:17
Message: <433838d5@news.povray.org>
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

From: Warp
Subject: Re: trying to fade an object
Date: 27 Sep 2005 02:17:20
Message: <4338e3f0@news.povray.org>
Note that if you apply a transmit to the object, you will start seeing
the inner surfaces (which are normally occluded). In some cases that might
not be desirable. If it's not, then the problem is harder.

-- 
                                                          - Warp


Post a reply to this message

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