WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 01-14-2009, 08:38 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
I run into a similar problem when creating GUIs. Some child nodes don't take the alpha of their parent. In the following example the texture quad does inherit the parent's alpha, the text and on-the-fly objects do not.

By the by, I only got the texture quad to take the parent's alpha when I set the alpha call's op mode to viz.OP_OVERRIDE.

Code:
import viz
viz.go()
viz.clearcolor(viz.SKYBLUE)
forceIDRoot = viz.addGroup(parent=viz.SCREEN, pos=[.40, .92, 0])
forceIDRoot.alpha(.5, op=viz.OP_OVERRIDE) # viz.OP_OVERRIDE gets the quad alphaed
forceIDQuad = viz.addTexQuad(parent=forceIDRoot, scale=[4.5,1,0]) #yes alpha
#no text alpha
t = viz.addText('afdasdf asdfasdf', parent=forceIDRoot, pos=[-.165, .01, 0], scale=[.3]*3)
t.color(viz.BLACK)

viz.startlayer(viz.QUADS)
viz.vertex([0,0,0])
viz.vertex([.5,0,0])
viz.vertex([.5,.5,0])
viz.vertex([0,.5,0])
viz.endlayer(parent=forceIDRoot) #no alpha?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
 


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
Pivot points for child objects in Vizard with 3ds Max Gladsomebeast Vizard 0 09-19-2006 11:21 AM


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


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