WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   screen image (

erchrastil 06-11-2008 02:37 PM

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!

farshizzo 06-11-2008 02:53 PM

The following code will add a textured quad to the upper left corner of the screen. Is this what you are needing?

import viz

texture = viz.add('ball.jpg')
quad = viz.addTexQuad(viz.SCREEN,align=viz.TEXT_LEFT_TOP,pos=(0,1,0))

erchrastil 06-11-2008 02:59 PM

thanks, that's perfect.

erchrastil 06-24-2008 11:14 AM

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.

erchrastil 06-24-2008 11:19 AM

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:


mapPos = [0.1,0.1,0]
mapScale = [8,8,8]
map = viz.addTexQuad(viz.SCREEN, align = viz.TEXT_LEFT_TOP, pos=mapPos, scale =mapScale)

farshizzo 06-25-2008 11:23 AM

The following code will scale the quad to 20% of the window size:

p = 0.2

erchrastil 06-26-2008 10:05 AM

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?

farshizzo 06-26-2008 11:01 AM

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.

erchrastil 06-27-2008 11:45 AM

thanks, that worked

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

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