POV-Ray : Newsgroups : povray.newusers : Make blobby object fade to transparent Server Time
27 Dec 2024 11:40:41 EST (-0500)
  Make blobby object fade to transparent (Message 1 to 6 of 6)  
From: SecondCup
Subject: Make blobby object fade to transparent
Date: 12 Apr 2016 11:20:01
Message: <web.570d10df88748ef1be6b2e390@news.povray.org>
Hi All,

Im back ha!

Ive been working on this issue for about three days now so I think I need a
little help getting me over the finish line. Its a simple fade to transparent
coding problem.

I have a blobby object in the middle of the screen. The object is textured to
look like a rock surface. I'm trying to use the clock command to have the whole
blobby object fade to transparent in a couple of animated screen shots.

As you can see from my coding below I'm aware of the 'transmit' command and also
the 'filter' command. Ive tried the 'rgbt' and rgbf' commands also but so far
all I can do is fade the blob to black. i.e when I run my code the texture fades
but the object itself remains as a blob but with no colour.

Can anyone offer some commentary on my coding issue? I feel it might be that I'm
fading just the texture but not the entire object. Ive taken out the 'clock'
variables from my code to void confusion. Here is my code:

#declare basetexture =  texture {
      pigment {granite
        color_map {
          [0.0 rgbt <.2, 0, 0, 0> ]
          [0.2 rgbt <.7, .4, .07, 0> ]
          [1.0 rgbt <1, 1, 1, 0> ]
                }
                }
                normal {bumps .8 scale .4}
                }


#declare blobbody =
blob {
threshold .5
sphere { <.5,0,-.4>, .8, 1}         //a bunch of random spheres with .5
threshold
sphere { <-.5,0,-.7>,.8, 1}
sphere { <-.6,.3,-.1>,.8, 1}
sphere { <.5,0,.2>,.8, 1 }
sphere { <-.1,.1,-.2>,.8, 1}
sphere { <-.7,.4,.8>,.8, 1}
sphere { <.5,.5,0>,.8, 1}
sphere { <-.5,0,0>,.8, 1}


    }


object {blobbody
        rotate z*60
        translate <.8,-5,0>
        scale <7,1.5,3>
        texture{basetexture}
        finish { ambient .05 }
        }


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Make blobby object fade to transparent
Date: 12 Apr 2016 11:55:10
Message: <570d1a5e$1@news.povray.org>

>          color_map {
>            [0.0 rgbt <.2, 0, 0, 0> ]
>            [0.2 rgbt <.7, .4, .07, 0> ]
>            [1.0 rgbt <1, 1, 1, 0> ]
>                  }

  I think just using "clock" on the t component should do the trick...
but you should have tried that already, or you did not?

--
jaime


Post a reply to this message

From: SecondCup
Subject: Re: Make blobby object fade to transparent
Date: 12 Apr 2016 12:15:00
Message: <web.570d1e40974d491bbe6b2e390@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> >          color_map {
> >            [0.0 rgbt <.2, 0, 0, 0> ]
> >            [0.2 rgbt <.7, .4, .07, 0> ]
> >            [1.0 rgbt <1, 1, 1, 0> ]
> >                  }
>
>   I think just using "clock" on the t component should do the trick...
> but you should have tried that already, or you did not?
>
> --
> jaime

Christ...that worked. I tried multiple combinations of things (clock variable in
the basetexture with pigment {filter} command in the blob code. Tried a union of
both with the filter commands...amongst a few others)

Man sometimes it just takes someone to point out the obvious stuff. I guess days
of trying different combinations in an attempt to crack it can fry the brain and
one doesn't see the forest for the trees. Thank you Jaime


Post a reply to this message

From: dick balaska
Subject: Re: Make blobby object fade to transparent
Date: 12 Apr 2016 13:43:47
Message: <570d33d3$1@news.povray.org>
Am 2016-04-12 12:11, also sprach SecondCup:

> Christ...that worked.

May I suggest,
watch my movie http://www.buckosoft.com/tteoac/
Steal any techniques from the source
http://git.buckosoft.com/gitweb/pov.cgi/?p=tteoac.git
or git clone http://git.buckosoft.com/git/pov/tteoac.git

It seems to me you're following a lot in my footsteps. Sorry I don't 
have any awesome .de tutorials, but, so far, your two questions are 
answered in my code. (moving a camera, and fade to transparent.)
I'd bet your next stumbling block is something I struggled with years 
ago ;) .

Most of my stuff is basic algebra and geometry; I don't grok 4th order 
Opus Dei derivatives.  But I can fade to transparent and make a camera's 
motion look smooth. :)

There's 5 scenes, ttco, tteo, ttho, ttko, ttfo.  Each scene has a 
direct.inc ("I love acting, but what I really want to is direct") which 
is where you should poke first.

Oh, here's some scripts to turn a pile of PNGs and a .wav into a movie 
with a soundtrack.
git clone http://git.buckosoft.com/git/pov/tteoacScripts.git

Here's two generic tips.
1) Do everything at the origin <0,0,0> and then translate it into 
position.  Try to let povray do as much of the heavy math lifting as 
possible.  rotate y*90 rotate x*22 is your friend.
2) Reduce every motion to 0..1.  Working with 0..0.4 then 0.4..1.0 is a 
pita.  There's a couple of macros in my direct.inc to assist with that. 
  Once you do that, then your fade to transparent is a simple calc. 
Plus, once you decide that 0.4 seconds is too short of a duration, you 
only change one number to 0.5 and it all cascades out.

Good luck, fellow pov animator!
-- 
dik


Post a reply to this message

From: dick balaska
Subject: Re: Make blobby object fade to transparent
Date: 12 Apr 2016 14:00:57
Message: <570d37d9$1@news.povray.org>
Am 2016-04-12 13:43, also sprach dick balaska:

BTW, this is my latest incarnation.
http://www.buckosoft.com/tteoac/video/tteoac-480p-20160312.mp4
http://www.buckosoft.com/tteoac/video/tteoac-720p-20160325.mp4

Those who have seen it, there's two new pieces.
1) @3:20 Two shiny ball ring eruptions timed with two cymbal crashes.
I like this bit.
2) @6:40 A comically poor mushroom cloud explosion.  It looks more like 
a Ghost Rastafarian.

I've decided not to work on that anymore until I can work on it in 
povclipse2, which still needs a lot of work.

-- 
dik


Post a reply to this message

From: Bald Eagle
Subject: Re: Make blobby object fade to transparent
Date: 12 Apr 2016 15:20:01
Message: <web.570d4a16974d491bb488d9aa0@news.povray.org>
dick balaska <dic### [at] buckosoftcom> wrote:

> Here's two generic tips.

Here's 3 more:
Figure out how to do things with a simple model system, so that you don't get
bogged down trying to debug a complex problem
In the case of your progressive fading,  use a simple sphere with rgbt <1, 1, 1,
clock> and then progressively make your texture more complex.


Periodically save a copy of your scene with a different filename "MyFile_1" or
"MyFile (backup copy)" perhaps in a completely separate folder.
That way you can always return to a "last known good" scene configuration.
For really big and complicated scenes, you might want to do "MyFile_1"
"MyFile_2" "MyFile_3" "MyFile_3a", etc.  depending on how many things you're
experimenting with.


Write parts of your scenes in include files, and then make your master scene a
collection of those include files.   That way you can narrow down errors that
can drive you truly crazy.   You'd be AMAZED at what a misplaced command or
parentheses or something else ridiculous can lead to....

Hope you're having fun   :)


Post a reply to this message

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