WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-11-2013, 08:44 AM
kmkm kmkm is offline
Member
 
Join Date: Jun 2013
Posts: 7
"Dim lights" on scene

Hello,

I'm pretty new to both vizard, python, and programming in general, so any help is greatly appreciated.

I'm creating a task in which the user starts in the center of an invisible torus and had to walk until he collides with the inside edge. On this collision, I need the lights in the scene to dim and text to come up across the screen. Is there a way to do this? Let me know if what I'm asking is unclear.

Thanks!
Reply With Quote
  #2  
Old 06-11-2013, 11:11 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,458
You can change the intensity of lights added in Vizard. In terms of detecting the collision with the torus, are you using desktop navigation or real tracking to move the viewpoint?

The introductory tutorials in the Vizard help are a good place to start if you're new to Python and Vizard. I would also recommend looking at Teacher in a Book, available from our downloads page. It includes a good example related to lighting a scene and a light demo which allows you to modify the different parameters of lights and immediately see the results.
Reply With Quote
  #3  
Old 06-11-2013, 01:33 PM
kmkm kmkm is offline
Member
 
Join Date: Jun 2013
Posts: 7
Hi Jeff,

Thanks for the reply.

To answer your first question, I'm using desktop navigation to move the viewpoint. In this task, the view point will start in a random location each time, and the user will be instructed to navigate forward. By placing the viewpoint at the center of the invisible torus, the idea is to allow the user to walk the same distance each time, no matter what direction he/she walks in.

I looked at the Teacher in a Book, looks like there's a lot of helpful stuff. However, the section on lighting doesn't seem to give me what I need - the objects in the scene change lighting, but I need the entire window to dim - as if a semi-transparent screen has dropped over the whole window. Changing the mainview headlamp just adjusts how light falls on the objects, but doesnt't effect the ground or sky.

Does that help clarify what I'm looking for at all?

Thanks!
Reply With Quote
  #4  
Old 06-12-2013, 09:52 AM
kmkm kmkm is offline
Member
 
Join Date: Jun 2013
Posts: 7
Hi Jeff,

Thanks for the reply. To answer your first question, I am using desktop navigation (mouse or control pad) to move the viewpoint.

In this scenario, the viewpoint starts at a random location each time. I want the viewpoint to be centered inside an invisible torus, so that when the user is instructed to walk forward, he/she will only be able to walk the same distance no matter which direction.

I downloaded the "Teacher in a Book" and although the lighting tutorial was helpful, I'm not sure it gives me what I'm looking for. Turning off the headlamp just changes how light falls on the objects in the view, but doesn't affect the appearance of the ground or sky. When the user collides with the torus, I want the whole window to dim, as if a semi-transparent screen has dropped over everything. I thought about trying to have a wall pop up right in front of the user, but I'm afraid that wont look smooth. Any ideas?

Thanks!
Reply With Quote
  #5  
Old 06-13-2013, 12:05 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,458
You could try fading a quad placed on the screen:
Code:
import viz
viz.go()

viz.add('gallery.osgb')

blackScreen = viz.addTexQuad(parent=viz.SCREEN,scale=[100.0]*3,color=viz.BLACK)
blackScreen.alpha(0.0)

vizact.onkeydown(' ',blackScreen.runAction,vizact.fadeTo(0.7,time=2.0))
Also take a look at the post process section in the Vizard help. Post process effects are applied to the whole window. You can experiment with built-in effects using the PostProcess.py example script( File -> Quick Open: type 'PostProcess')
Reply With Quote
Reply

Tags
actions, lights

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Lighting for a new Scene jassel41 Vizard 2 11-10-2010 10:14 PM
Warping Rendered Scene? rwgray Vizard 3 03-25-2010 03:19 PM
Copying Scene? Brett Lindberg Vizard 0 08-29-2009 12:56 AM
addWindow only in one special scene lilio Vizard 1 08-20-2009 10:45 AM
Active scene Chrissy2009 Vizard 2 07-13-2009 10:49 AM


All times are GMT -7. The time now is 05:29 PM.


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