![]() |
#1
|
|||
|
|||
Headlight is not disabled
Hi,
I've started to develop using Vizard and VizMove and I encountered a following problem: the headlight isn't disabled using the following code: Code:
import viz viz.go() showroom=viz.add('ShowroomLightmap1.osgb') headlight=viz.MainView.getHeadLight() headlight.disable() |
#2
|
|||
|
|||
If the model is exported with a light map it will be lit without real-time lights. What are you trying to achieve with lighting?
|
#3
|
|||
|
|||
Thanks for your answer. For now the model is only partially light mapped because it's under development. The light mapped parts of the model were self illuminated in Vizard, but it seemed that the parts that were not light mapped got illuminated by the headlight, which is what I didn't want. I guess I can avoid the problem in the future by giving a self illuminating texture to all parts of the model. So far I'm trying to achieve a lighting without the headlight, just self illuminating textures or black unlit objects.
|
#4
|
|||
|
|||
The code you posted will disable the headlight. Do you have any other real time lights added in your script?
To prevent real time lights from affecting the model you can either
|
#5
|
|||
|
|||
Thanks for your answer. There are no other real time lights added in the script. The osg export settings of the model were probably wrong. There were lights in the scene of the model file and they were surely exported, which might have caused the problem. Also the 'turn off lighting' option wasn't checked. How do you disable lighting (else than the headlight) of a model through the script, if there are not any lights added via script ?
|
#6
|
|||
|
|||
Use the following to disable real time lights on the model:
Code:
model.disable(viz.LIGHTING) |
#7
|
|||
|
|||
Thanks, that code solves the problem.
|
![]() |
Tags |
disable, headlight, vizard5 |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vizard Headlight in Shader | shivanangel | Vizard | 1 | 06-27-2012 01:19 PM |
Vizact onupdate events that wont be disabled | Reca | Vizard | 1 | 11-16-2011 05:25 PM |
Headlight Question | new_horizon | Vizard | 5 | 03-04-2011 09:45 AM |
how to remove velocity when mouse is disabled? | jvacare1 | Vizard | 2 | 02-18-2010 10:25 AM |
headlight defaults | michaelrepucci | Vizard | 3 | 08-22-2008 10:44 AM |