WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-11-2008, 02:37 PM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
screen image

we want to create an image that attaches to the screen, much like the GUI features of screentext and the slider, but use an image file instead. we haven't found a way to go outside of the options in the vizard GUI for adding screen elements.

basically, we would like to add a top-down view of the environment, but the bird-eye view function is only adding it to one eye of the screen (we want to use stereo view), and we really only want to add a basic image of the environment (which we have separately), which does not necessarily include all of the objects in the environment.

thanks for your help!
Reply With Quote
  #2  
Old 06-11-2008, 02:53 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The following code will add a textured quad to the upper left corner of the screen. Is this what you are needing?
Code:
import viz
viz.go(viz.STEREO)

texture = viz.add('ball.jpg')
quad = viz.addTexQuad(viz.SCREEN,align=viz.TEXT_LEFT_TOP,pos=(0,1,0))
quad.texture(texture)
Reply With Quote
  #3  
Old 06-11-2008, 02:59 PM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
thanks, that's perfect.
Reply With Quote
  #4  
Old 06-24-2008, 11:14 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
is it possible to scale the texQuad as a percentage of the screen size? we'd like to have it at 20% of the screen, no matter what the size or resolution of the image we are putting in the texQuad.
thanks.
Reply With Quote
  #5  
Old 06-24-2008, 11:19 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
we tried doing something like this to set the scale, but that just multiplied it by the size of the image, not the size of the screen. The position does seen to be a function of the screen size, however:

Code:
mapPos = [0.1,0.1,0]
mapScale = [8,8,8]
map = viz.addTexQuad(viz.SCREEN, align = viz.TEXT_LEFT_TOP, pos=mapPos, scale =mapScale)
Reply With Quote
  #6  
Old 06-25-2008, 11:23 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The following code will scale the quad to 20% of the window size:
Code:
p = 0.2
quad.setScale([12.8*p,10.24*p,1])
Reply With Quote
  #7  
Old 06-26-2008, 10:05 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
that worked great. one more question about texQuad stuff...if we want to have two texQuads layered, how can we get one of them to appear on top of the other one?
Reply With Quote
  #8  
Old 06-26-2008, 11:01 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Just add a second quad, and it will appear over the existing one. You can use the node.drawOrder() command to manually control the order in which the quads are rendered.
Reply With Quote
  #9  
Old 06-27-2008, 11:45 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
thanks, that worked
Reply With Quote
Reply

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
View an image on the Fakespace HMD roman_suvorov Vizard 16 05-23-2008 07:51 AM
position of html-file on screen active_world Vizard 1 05-16-2008 07:24 PM
GUI Image? codexter Vizard 2 04-19-2007 01:45 PM
Only part of tiled image vizmaster Vizard 5 09-11-2006 12:11 PM
accessing screen buffer hotspur1 Vizard 3 08-22-2003 03:31 PM


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


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