![]() |
|
#1
|
|||
|
|||
Thanks for the prompt reply! It helps a lot!
|
#2
|
|||
|
|||
Another question
Hi,
Back to the marker/tracking question: I know it's probably OK to render the virutal object in another location rather than stick it on the marker (i.e. apply some tranformations). However, if the marker is used as a tracking reference, i mean for matching the 2D projection of the marker and the virutal object, how do you then work out the projection angle of the virtual object when it is placed at another location? For example, if we place the marker on the wall, how do you make the virtual object stand vertically on the table rather then sticking horizontally on the marker on the wall? Of course, this is a simple case because of they are roughly right-angled, we will appreciate a more general approach. We will definitely wriite Vizard into our budget plan if this can be solved. Many thanks! |
#3
|
|||
|
|||
You can use the ARCamera.setGlobalMarker() command to use a marker as a global reference frame. For example, if you have a marker that is 300mm wide and hanging on the wall 1 meter away and 0.5 meters above the table, then you would use the following code:
Code:
import viz viz.go() #Add ARToolkit extension ar = viz.add('artoolkit.dle') #Create camera from texture camera = ar.addWebCamera() #Create marker from pattern file marker = camera.addMarker('ar/patt.worldviz',width=300) #Generate matrix of marker in global reference frame m = viz.Matrix() m.setPosition(0,0.5,1) m.setEuler(0,-90,0) #Use marker as global reference frame for camera camera.setGlobalMarker(marker,m) #Add object that should appear on table viz.add('logo.ive') |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
General question and question regarding arrays | dan12345 | Vizard | 1 | 01-15-2008 10:15 AM |
Another general (curious) Questions... | k_iwan | Vizard | 5 | 08-29-2006 03:44 PM |
General Questions about Vizard: World Viz | dav | Vizard | 5 | 08-28-2006 03:44 PM |
Antialiasing questions | oodini | Vizard | 1 | 12-06-2005 12:08 PM |
Vizard 2.51 beta testing questions | Gladsomebeast | Vizard | 2 | 03-03-2005 05:09 PM |