WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-10-2010, 10:03 AM
jassel41 jassel41 is offline
Member
 
Join Date: Nov 2009
Posts: 24
Lighting for a new Scene

Hi,

Can anyone help me set up the lighting for a different scene number? Below is what I have originially.

Code:
viz.disable(viz.LIGHTING)		# Disables the lighting of the world
viz.collision(viz.ON) 			
viz.phys.enable() 				# Needed to catch collision events

# Adding object
obj = viz.add(object, viz.WORLD);
obj2 = viz.add(object, viz.WORLD);

headLight = viz.MainView.getHeadLight()

mylight = viz.addLight(viz.WORLD)
mylight.enable()
mylight.position(0, 100, 0)
mylight.intensity(0.85)
The above code runs fine and the lighting is right, but if I make it so obj and obj 2 get added to scene 2, then they show up dark. I tried putting mylight in scene 2, but no change.

Any suggestions?

Thank you in advance,
Jassel41
Reply With Quote
  #2  
Old 11-10-2010, 07:11 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try adding another light to scene 2.
Reply With Quote
  #3  
Old 11-10-2010, 09:14 PM
jassel41 jassel41 is offline
Member
 
Join Date: Nov 2009
Posts: 24
I tried that, any other thoughts on why I can't get it to light correctly in scene 2? This is what I tried:

Code:
viz.disable(viz.LIGHTING, 2)		# Disables the lighting of the world
viz.collision(viz.ON) 			
viz.phys.enable() 				# Needed to catch collision events

# Adding object
obj = viz.add(object, viz.WORLD, 2);
obj2 = viz.add(object, viz.WORLD, 2);

headLight = viz.MainView.getHeadLight()

mylight = viz.addLight(viz.WORLD, 2)
mylight.enable()
mylight.position(0, 100, 0)
mylight.intensity(0.85)
Is there any other way to approach setting up the lighting?
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
basic lighting question malte Vizard 6 12-01-2010 12:25 PM
Warping Rendered Scene? rwgray Vizard 3 03-25-2010 02:19 PM
Copying Scene? Brett Lindberg Vizard 0 08-28-2009 11:56 PM
lighting issue cantwelljm Vizard 3 02-18-2006 08:21 AM
Vizard 2.0x lighting FlyingWren Vizard 4 08-11-2003 12:20 PM


All times are GMT -7. The time now is 02:51 PM.


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