WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   headlight defaults (https://forum.worldviz.com/showthread.php?t=1610)

michaelrepucci 08-19-2008 04:50 PM

headlight defaults
 
Hi, does anyone know the defaults for the headlight? I can't seem to find that in the documentation or anywhere online. Thanks!

farshizzo 08-21-2008 10:42 AM

By default the head light is directional, pointing in the +Z direction, with the following color values:

diffuse: [0.8,0.8,0.8]
ambient: [0.05,0.05,0.05]
specular: [1,1,1]

michaelrepucci 08-21-2008 11:02 AM

Oh, I didn't realize that lights could have diffuse, ambient, and specular components. Some follow-up questions. Do all new lights also have those same defaults? And if you set the color to say, viz.RED, then do you get diffuse=[0.8,0,0], ambient=[0.5,0,0], and specular=[1,0,0]? What about the default headlight values for the three types of attenuation, spread, and intensity? And is setting a light's position, say light.position(0,1,0), the same as translating it with light.translate(0,1,0)?

farshizzo 08-22-2008 10:44 AM

Yes, all new lights default to these values. Setting the color of a light to viz.RED will set the diffuse to [1,0,0] and leave the ambient/specular alone. If you want to change those values then you can use the .ambient and .specular commands.

Here are the defaults for the other values:
spotexponent: 0.0
spread: 180
constant attenuation: 1
linear attenuation: 0
quadratic attenuation: 0
intensity: 1

Translating a light has the same effect as setting the position.


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

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