WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-09-2014, 08:37 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
How to create illuminated objects in an otherwise dark room

Here's how to simulate flashlight exploration of a dark room. I struggled with this for the reason that it requires use of the not-yet-documented function "vizfx.setAmbientColor(viz.BLACK)"

Many thanks to the Vizard support team for helping me figure this one out.

It's pretty straightforward, assuming you've followed their many guides to correctly create and export the *.osgb file.

First, replace the headlamp with a vizfx spotlight. Then, set the ambient color of your object to black.

Quote:
headLamp = viz.MainView.getHeadLight()
headLamp.disable()
mylight = vizfx.addSpotLight()
mylight.position(0,1,0)
mylight.spread(50)
mylight.intensity(2)
mylight.spotexponent(20)

viz.link(viz.MainView, self.mylight)

# Now, create an object and set its ambient color to black using vizfx
object = vizfx.addChild('myObject.OSGB')
vizfx.setAmbientColor(viz.BLACK)
Reply With Quote
Reply

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
Dark room illuminated by flashlight? performlabrit Vizard 2 04-11-2014 10:29 AM
create group of objects Veronika Vizard 4 04-02-2012 11:45 PM
artoolkit load 3d objects into application xcuddlex Vizard 8 04-18-2011 02:00 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 04:12 AM.


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