WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-16-2009, 01:49 PM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
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
Reply With Quote
  #2  
Old 12-17-2009, 04:41 AM
IGoudt IGoudt is offline
Member
 
Join Date: Sep 2009
Posts: 20
<vizact>.fadeTo() might do want you want.

fadeAction = vizact.fadeTo(viz.BLACK,time=2)
object.addAction(fadeAction)
Reply With Quote
  #3  
Old 12-18-2009, 11:10 AM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
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?)
Reply With Quote
  #4  
Old 12-18-2009, 11:19 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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))
Reply With Quote
  #5  
Old 12-23-2009, 11:09 AM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
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).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Black spots on avatars v-jbinney Vizard 7 09-07-2010 06:51 PM
black outs enkeli Vizard 4 05-09-2006 12:05 PM


All times are GMT -7. The time now is 11:21 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC