WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-20-2015, 05:38 AM
Samuli Samuli is offline
Member
 
Join Date: Aug 2015
Posts: 15
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()
Is there a solution to that problem?
Reply With Quote
  #2  
Old 08-21-2015, 10:07 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,454
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?
Reply With Quote
  #3  
Old 08-21-2015, 02:55 PM
Samuli Samuli is offline
Member
 
Join Date: Aug 2015
Posts: 15
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.
Reply With Quote
  #4  
Old 08-24-2015, 02:11 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,454
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
  • check the 'turn off lighting' option in the OSG exporter
  • disable lighting on the model through the script
Reply With Quote
  #5  
Old 08-25-2015, 04:14 AM
Samuli Samuli is offline
Member
 
Join Date: Aug 2015
Posts: 15
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 ?
Reply With Quote
  #6  
Old 08-25-2015, 09:50 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,454
Use the following to disable real time lights on the model:

Code:
model.disable(viz.LIGHTING)
Reply With Quote
  #7  
Old 08-28-2015, 12:33 AM
Samuli Samuli is offline
Member
 
Join Date: Aug 2015
Posts: 15
Thanks, that code solves the problem.
Reply With Quote
Reply

Tags
disable, headlight, vizard5

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
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


All times are GMT -7. The time now is 06:17 PM.


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