WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-19-2008, 01:53 PM
michaelrepucci michaelrepucci is offline
Member
 
Join Date: Jul 2008
Posts: 53
lighting and on-the-fly objects

I'm not understanding how to get the correct lighting effects for my on-the-fly objects.

First of all, there are only three types of lights - directional, point, and spot - none of which seem to have an ambient light component. So is ambient light only specified by the material property <node3d>.ambient as set for each on-the-fly object?

Secondly, I can't seem to shut off all lights. If I have the code:
Code:
viz.startlayer(viz.QUADS)
viz.vertexcolor(0.7,0.5,0.5)
viz.vertex([x,y,0])
viz.vertex([-x,y,0])
viz.vertex([-x,-y,0])
viz.vertex([x,-y,0])
square = viz.endlayer()
square.enable(viz.LIGHTING)

headLight = viz.MainView.getHeadLight()
headLight.disable()
I can still see my square, albeit darker than without lighting enabled.

Finally, if I check the various lighting properties of the node:
Code:
print 'square.getAmbient() =', square.getAmbient()
print 'square.getColor() =', square.getColor()
print 'square.getEmissive() =', square.getEmissive()
print 'square.getShininess() =', square.getShininess()
print 'square.getSpecular() =', square.getSpecular()
they're all the same as the vertexcolor I originally set. And if I set any one of these properties (square.ambient, square.color, square.emissive, square.shininess, or square.specular) to something else, it changes them all to the new value. This doesn't make sense to me. Please can somebody explain this?
Reply With Quote
 

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 issue cantwelljm Vizard 3 02-18-2006 08:21 AM
The effect of lighting on performance JRichizzle Vizard 1 06-18-2004 10:40 AM
Problems with lighting in 2.0 murm Vizard 6 04-21-2004 09:59 AM
Lighting Problem Plasma Vizard 1 02-03-2004 11:09 AM
Vizard 2.0x lighting FlyingWren Vizard 4 08-11-2003 12:20 PM


All times are GMT -7. The time now is 01:35 AM.


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