WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 2.67 average. Display Modes
  #31  
Old 02-21-2005, 08:08 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
vizinfo menues don't seem to work

Hi,
when I looked at my little simulation with the VR-Glasses last Friday I wanted to change some variables with my menues and on screen sliders.

So I had to stop the tracker to gain mouse control again. The on-screen slider worked (also not quite accurate, I had to drag it with an offset) but it was not possible to open the vizinfo menues and to change the sliders or values hidden in there...
Any ideas?
Johannes

P.S. at the beginning I use the following to start the tracker:
Code:
viz.go(viz.PROMPT)
	ppt = viz.add('vizppt.dls')
	v = viz.add('intersense.dls')
	ppt.command(6,'',1,1,1)
	viz.tracker()	
	#ppt.reset()

	viz.eyeheight(-0.3)
P. P.S. I stop and start the tracker like this:

Code:
 
if key == 'x':
		viz.tracker(viz.STOP)
		#global vX
		#vX = viz.input('Please type velocity x (e.g. 1.2 for 1.2 m/s)')
	if key == 'y':
		viz.tracker(viz.START)
Reply With Quote
  #32  
Old 02-22-2005, 10:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Are you viewing your simulation in Stereo mode? If so, then this is your problem. The GUI interaction will work as if Stereo mode is off, this is probably why you noticed an offset with the slider.
Reply With Quote
  #33  
Old 02-22-2005, 10:44 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
So if I would do something like this with a key command I could open my vizinfo
classes (and set the slider without offset)



#Change stereo to Anaglyphic
viz.stereo(viz.STEREO_RIGHT)

Or which command can I type to end and then restart the stereo-mode while running the simulation?

Johannes
Reply With Quote
  #34  
Old 02-22-2005, 10:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Correct, you could temporarily turn off stereo.You would use the following to disable stereo:
Code:
viz.stereo(viz.STEREO_LEFT)
And the following will enable stereo:
Code:
viz.stereo(viz.STEREO) #Or whatever stereo mode you initially used
Reply With Quote
  #35  
Old 02-22-2005, 11:32 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
For right now this is fine, thank you for your help.



And what would you recommend, if people are in the VR (Head mounted display on their head) and don't have access to keyboard to change the values of variables?

We were thinking about a remote mouse control (and then sliders) but they still would have to open the vizinfo-menues first....

Johannes
Reply With Quote
  #36  
Old 02-22-2005, 12:02 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Usually the person observing the user would be in control of changing values. If you have a remote control mouse then you could use that to access the GUI, but it would still be difficult to use it while wearing an HMD.
Reply With Quote
  #37  
Old 02-28-2005, 09:41 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Exit callback from MOUSEMOVE_EVENT

How can I end a callback-function?

def mymousemove(horz, vert):
print 'My mouse moved to: ', horz, vert

viz.callback(viz.MOUSEMOVE_EVENT, mymousemove)

Not important, just to tell you why I need this:
The new idea to add User interaction is to put some sliders in the scene e.g. on the table.
I was thinking about something like this: as soon as the user clicks on his/her mouse (with a tracker-light taped to it) in a certain area of the scene, a UserInterfaceFunction to change a certain slider is called (identification by position).
When he drags the mouse now to a certain position and releases the mouse it changes something in the room, e.g. the light...

When he releases the mouse button the callback-function for mousemoved should exit (performance...), how do I do that?

Johannes
Reply With Quote
  #38  
Old 02-28-2005, 10:30 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
To end a callback event simply pass 0 as the second argument:
Code:
viz.callback(viz.MOUSEMOVE_EVENT,0)
Reply With Quote
  #39  
Old 02-28-2005, 11:02 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Works fine, thank you!
Johannes
Reply With Quote
  #40  
Old 03-02-2005, 01:24 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Hi,
how do I find out if an object is visible?

(I need this for something like:
if object == resetStartSwitch.switchOFF and resetStartSwitch.switchOFF.isvisible??

If it is difficult I will work with counter-variables that tell me if it is visible or not..
Johannes
Reply With Quote
  #41  
Old 03-02-2005, 01:30 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is no command to get the visibility of an object. You can keep track of it manually by setting a variable everytime you change the visiblity of an object.
Code:
object.visible(0)
object.isVisible = 0
.
.
.
if object.isVisible:
	print 'object is visible'
Reply With Quote
  #42  
Old 03-04-2005, 02:48 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
thank you, that is what I tried to say somehow complicated with countervariable...

How do I match the normal rgb-color scheme with the vizard colors?

As I read in the help-file vizard uses something like

<node3d>.color(
[r,g,b]
subchild = '' )

and ball.color(1,0,0) #Turn the ball red

But as I "know" it is normally 255,0,0 for red...
So how could I translate a color 0,61,136 to vizard-colors?

I tried: pointGraphColor=(0,61/255,136/255) but it did not work...


Johannes
Reply With Quote
  #43  
Old 03-04-2005, 03:14 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Since you are dividing an integer with another integer, the result will be an interger. You need to use floating point numbers instead:
Code:
pointGraphColor=(0,61/255.0,136/255.0)
Reply With Quote
  #44  
Old 03-07-2005, 06:05 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Thank you,
Johannes
Reply With Quote
  #45  
Old 06-03-2005, 03:18 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
A while ago we discussed:

Quote:
3) The 3ds and wrl formats don't support reflection textures. You will have to manually apply the texture to the object within your script. You could also export your object to the .osg format, which supports reflection textures. The exporter is called OSGExp. The following page shows where you can download it:http://www.worldviz.com/products/vizard/tools.html

I did the workaround looking at the minicooper example
innerCoil=coil.getchild('innerCoil')
texGold=viz.add('../resources/joNew/Lakerem2.jpg')
innerCoil.texture(texGold,'',1)
innerCoil.appearance(viz.TEXGEN,'',1)

Looks fine on the screen but when I look at it with the HMD I only see the golden reflecting innercoil as black?!

If this will solve itself when I use the open scene Graph exporter for 3DS do not worry much if it is too much work to descripe that...

Johannes
Reply With Quote
  #46  
Old 06-03-2005, 03:27 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Are you using the same computer when viewing on screen and through the HMD?
Reply With Quote
  #47  
Old 06-03-2005, 03:29 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Yes
Reply With Quote
  #48  
Old 06-03-2005, 04:47 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Wow, that is really weird. So if you turn on stereo and just view it on screen the texture is black also?
Reply With Quote
  #49  
Old 06-06-2005, 06:19 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Hi,
no when I'm using stereo on the normal screen it is fine (golden and reflecting), only in the HMD it appears black.

So I guess it has to do with the quality of the HMD?!

Johannes
Reply With Quote
  #50  
Old 06-06-2005, 07:40 AM
mspusch mspusch is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 211
hi,

A) HMD settings
the HMD (you use the Virtual Research V8 from what I know) needs 480 by 640 resolution and 60Hz.

B) GRAPHICS DRIVER
If this is the case, then I would suspect that output on one eye different than the other eye might have something to do with your graphics card / driver. please make sure you use the latest driver for your graphics hardware and (in case you use nVidia hardware) that you use horizontal span mode, NOT dualview.
See also

http://www.worldviz.com/support/hardware_faqs.html

for more details on this driver issue.

C) if nothing helps and one eye continues to look different from the other, run the HMD in mono mode (i.e. only provide input for the left eye) and see if one eye still shows funcky stuff. if yes, there is a problem with your HMD and you need to get in touch with Virtual research.

Please let us know if any of above helps.
Reply With Quote
  #51  
Old 06-05-2006, 03:34 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Text Entry

I'm trying to figure out a way to write a scenario where a word (scrambled) would be placed on screen and the user would have to type out the word (unscrambled). Is there anyway to have the user be able to type in some text in vizard?

Thanks
Reply With Quote
  #52  
Old 06-06-2006, 07:42 AM
halley halley is offline
Member
 
Join Date: Oct 2005
Posts: 27
betancourt, looks like you wanted to start a new thread with that question.

In brief, I would just have a global string variable hold the letters typed so far; whenever you get a keyboard event that's a letter, add it to the string, and whenever you get a keyboard event that's a backspace, remove the last character from the string. If you want to discuss this or other options, consider starting a new thread so it's not confused with this thread's topic.
__________________
--
[ e d h a l l e y ]
I'm just a user, not a representative of WorldViz. Hope I've been helpful.
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


All times are GMT -7. The time now is 03:10 PM.


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