WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-21-2004, 10:59 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi David,

Could you try the following script? Replace tree.png with any of your transparent textures. When you run the script it should display the texture spinning in front of you. Press the spacebar to toggle between enabling/disabling lighting. At first the texture should be dim, but when you disable lighting it should always be lit. Let me know if this is not the case.
Code:
import viz
viz.go()
quad = viz.add(viz.TEXQUAD)
quad.translate(0,1.6,3)
quad.spin(0,1,0,90)
quad.texture(viz.add('tree.png'))
quad.lit = 1
def mykey(key):
	if key == ' ':
		quad.lit = not quad.lit
		if quad.lit:
			quad.enable(viz.LIGHTING)
		else:
			quad.disable(viz.LIGHTING)
viz.callback(viz.KEYBOARD_EVENT,mykey)
Thanks!
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


All times are GMT -7. The time now is 04:14 PM.


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