WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-09-2010, 12:10 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
more examples of AR?

I'm trying this feature in vizard but i cant do simple things that i was able to do in vizard for virtual environments.

Like make an avatar walk to pre-defined position or just rotate it, i searching for more examples to do more advanced applications that just display a model in the marker but i couldn't find more.

i want to do an application that combines VR and AR, having a window for my vr and another for AR make operations in AR like when two markers are close run an action in my vr or displaying the items in the AR window that i recollect from my vr world.

If someone has examples to help me achieve this, i will be thankful.

Sorry for my bad english.
Reply With Quote
  #2  
Old 03-10-2010, 11:48 AM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
some know why when i move the avatar to another position doesnt change the position?, for example when i run an action of walk is like he is walking in the same place, doesn't looks like the example of animals that is show in video example where the animals are walking around the marks
Reply With Quote
  #3  
Old 03-15-2010, 07:25 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
i was trying to get work the artoolkit plugin but i dont know how to have another window in my virtual application with AR.

this is my code:
[CODE
]ar = viz.add('artoolkit.dle')

# Create a new window in the down left of the main window
DownLeftWindow = viz.addWindow(pos=(0,0),size=(0.2,0.2))
DownLeftWindow.visible(0,viz.SCREEN)

video = viz.add('VideoCamera.dle')
cam = video.addWebcam()

ar.addCamera(cam,param=None,flipVertical=False,thr esh=None,globalScale=None,window=DownLeftWindow)
[/CODE]

but this error throws me:
Warning: TextureRectangle::apply(..) failed, texture rectangle is not support by your OpenGL drivers.

i dont know how to resolve my error.
Reply With Quote
  #4  
Old 03-16-2010, 10:32 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
For your first question about having the avatar walk around, set the marker to be a global marker. Then add the walk action. The marker will be used for the origin and you will not need to link the two.
Code:
marker = camera.addMatrixMarker(0,width=1000)
camera.setGlobalMarker(marker)
Regarding the error, what kind of graphics card do you have? Do you have the most recent drivers?

Try adding a second window like this.
Code:
ar = viz.add('artoolkit.dle')
subWindow = viz.addWindow(pos =[0,0.2])
ar.addWebCamera(window=subWindow)
Reply With Quote
  #5  
Old 03-16-2010, 11:54 AM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
thanks jeff it works the walking avatar example just like you told me, but what i understand is that i can have only one marker defined like global marker? because if i have two markers each with a model and walking around but with the reference of their own mark, how i accomplish that?

and for the second problem i tried what you tell me but doesn't work for me, im trying this in the "winview" example adding this below of the code and compiles everything fine but i cant move around the gallery and the subWindow doesnt show the camera video instead shows a copy of the main view.

My video card is a chipset of intel with windows 7, i think thats the problem because im trying this examples on another computer with a nvidia Quadro FX 540 and windows xp doesnt throw me this error but im having the problem that i mention before

i hope i explain me, sorry for my bad english

Last edited by Darkmax; 03-16-2010 at 11:57 AM.
Reply With Quote
  #6  
Old 03-16-2010, 10:18 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
nevermind about my first question, i was trying different things with artoolkit and i understand how it works now, about the second question i'm in the same problem.

i try the subwindow in an empty application and it works but when i add a 3d model "viz.add('room.wrl')" in the virtual application it starts to do what i told you, i cant move and it show the same view on both windows ( the main and the subwindow that i create)

why i want to do this is mainly because i have like a virtual book story application where the main character is controlled by the user with the help of marks when he put marker A with B close enough, the main character play an action when he put A with C the character do another thing or when he puts A to the left of the B do another action and so on.

So i was thinking in split the window in two in the main window where it runs the virtual application(the book story) and in the subwindow where i have the markers interaction(where the marker A shows the main character model and on the other marks words of the different actions).

i hope you understand me.

Last edited by Darkmax; 03-16-2010 at 10:28 PM.
Reply With Quote
  #7  
Old 03-17-2010, 01:59 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
Also i detect that when you active the anaglyphic something weird happens because doesn't refresh the screen also the vertical or horizontal stereo just one part of the window shows the video(maybe i need to add another webcam with the right distance to emulate the both eyes) , but the interlace doesn't show this problems.
Reply With Quote
  #8  
Old 03-17-2010, 06:33 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
Ok now i'm going somewhere, this is my code right now:

Code:
import viz

viz.go()

ar = viz.add('artoolkit.dle')

#mainwindow in set scene 1
#viz.scene(1) #by default starts in scene 1

#Mainwindow size and position
#viz.MainWindow.setPosition([0,0.33])
#viz.MainWindow.setSize([1,0.66])

#Adding a window  and set scene 2
subWindow = viz.addWindow(pos =[0,0.33],size=(1,0.33))
subView = viz.addView()
subView.setScene(2)
subWindow.viewpoint(subView) 
cam = ar.addWebCamera(window=subWindow)

#Adding room in scene 1 (VR)
room = viz.add("../tutorials/gettingstarted/room.wrl",viz.WORLD, 1)

#Adding room in scene 2 (AR)
mark = cam.addMatrixMarker(10,width=1000)
logo = viz.add("logo.ive",viz.WORLD, 2)
viz.link(mark,logo)
but i'm having now a problem that i can't set the size of the main window because when i try to move the view of the VR app with the mouse also detects the when i click in the subwindow, so the main window its covering all the window and only the subwindow it over the main window.

PD. I don't know if vizard permits running the simulation with two windows of "Windows SO" so if i have two monitors move one window of the ar app to the left monitor and the other window of the vr app to the right monitor.

if someone knows how to resolve this i will be thankful.
Reply With Quote
  #9  
Old 03-18-2010, 05:03 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
What about using a joystick for moving the viewpoint around the VR scene?

You can set your display to horizontal span and then display to two monitors. However, mouse navigation will still use the main window which spans both monitors.
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
Documentation error (nonexistent examples) JimC Vizard 1 10-08-2009 08:08 AM
Custom node and other examples? moooh Plug-in development 1 03-10-2009 03:04 PM
Which software can be used to edit .cfg (CAL3D) files luakt Vizard 4 09-12-2008 07:18 AM
more advanced network examples? halley Vizard 0 04-05-2006 07:07 AM


All times are GMT -7. The time now is 10:36 AM.


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