WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 08-26-2009, 07:46 PM
jaylocco jaylocco is offline
Join Date: Jun 2009
Posts: 19
Cool viz.Screen Images overlap and Interface Button


I created an interface that stick to the screen by using TexQuad and viz.Screen. The interface resemble a video player that can play video. Since the interface would be overlapping with the video, what I did was, I initialized the interface first then the video, and these enabled the video to be displayed in front the interface. The problem is, when I applied the alpha to the interface, why did the video's opacity was affected as well? here is the sample code..

#the player interface
intface = viz.add('videoPlayer.jpg')
vidPlayer = viz.addTexQuad(parent=viz.SCREEN,pos=(0.5,0.5,0.1))

#the video
vid = viz.addVideo('vizard.mpg',loop=1,play=1)
movie = viz.addTexQuad(parent=viz.SCREEN,pos=(0.5,0.52,0))
Attached together is the interface jpg file for your ease..

Another matter is, I was wondering, how do I create the button for this Player? Is it by creating another image,a Close button for instant, translate it to the desired location, and apply the 'vizact.onpick' function. Or do you have any better solution?

Attached Thumbnails
Click image for larger version

Name:	videoPlayer.jpg
Views:	1690
Size:	103.8 KB
ID:	341  
Reply With Quote
Old 08-28-2009, 03:18 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
Try giving the video quad a very high draw order. This should force it to render after the interface:
If your entire interface is a single texture, then you will need to handle mouse button events and check if the mouse is clicked on certain interface features. Using this method will require you to hard code where the position of each object is on screen.
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 10:12 AM.

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