#1
|
|||
|
|||
cinematic fade to black?
Hi,
Can anyone point me to the best way to achieve a cinematic fade to black? (Well, what they really want to do is fade to blue). After our experiment finishes we want it to gradually fade to black rather than abruptly end. I could use fog but I am not getting good results with gradual onset of fog. I could probably code that better. However, I think there is an easier way, simple elegant way to do this. Weeks ago I stumbled across something in the manual that seemed to be devoted just to fade to black or really fade to any color, however I did not know I needed it for our experiment then. Now, when I need it, I can't find it in the manual nor the forum having searched on "fade", "black", etc. (An alternate method might be to change the color of every object. But again this seems inelegant). Thanks, Bill |
#2
|
|||
|
|||
<vizact>.fadeTo() might do want you want.
fadeAction = vizact.fadeTo(viz.BLACK,time=2) object.addAction(fadeAction) |
#3
|
|||
|
|||
Thanks for the reply....right, so the question with a solution like the one you suggested is what to bind object to? I suppose I could map through every single object in the scene. But as I said in my original post, this seems inelegant (and not the kind of solution I remember thinking I glanced at several weeks/months ago).
Further, even if I do map through all objects and apply the fade to black action, then how do I make the rest of the world fade to black. To make this concrete, see the code below which applies the solution you suggested. You'll see the dude fades to black but the world/room (aka "lab") does not. If someone can tell me how there's an easy way to make the rest of the word/room fade to black then perhaps I am done (I will next have to map through every object (node?) but I think I have some ideas on how to do that).. Okay, here's the code..... viz.go() dude = viz.addAvatar('vcc_male.cfg') lab = viz.add('lab.ive') fadeAction = vizact.fadeTo(viz.BLACK,time=10) dude.addAction(fadeAction) lab.addAction(fadeAction) ....when you'll run it you'll see the dude fade to black but the room not. (Tangential question: why does dude go from a state where's he's frozen in a kind of "scarecrow" posture to the "idle" posture (i.e. where he's standing relatively still but like a normal person, shifting he weight a little, looking around etc...state = 1 or somesuch??)...I never told vizard to make him change his state. Why does it do this?) |
#4
|
|||
|
|||
I've implemented a similar effect in the past by creating a fullscreen black quad and fading the alpha from 0 to 1. Here is a simple example:
Code:
import viz viz.go() viz.add('gallery.ive') blackScreen = viz.addTexQuad(parent=viz.SCREEN,scale=[100.0]*3,color=viz.BLACK) blackScreen.alpha(0.0) vizact.onkeydown(' ',blackScreen.runAction,vizact.fadeTo(1.0,time=2.0)) |
#5
|
|||
|
|||
thanks - problem solved
thanks! i tested it inside my program and it works great. just the kind of simple solution i was looking for. (and also different than the aforementioned 'fade to black' i thought i saw in the manual several weeks/months back....probably what i thought i saw is in reality mirage, i.e. not really an implementation of fade to black).
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Black spots on avatars | v-jbinney | Vizard | 7 | 09-07-2010 07:51 PM |
black outs | enkeli | Vizard | 4 | 05-09-2006 01:05 PM |