I hope you help me guys because I feel lost
I decided to learn panda3d because of augmented reality
but the problem there is no any tutorial
so I tried with myself to get started
but I found many problems stops in my way
like
1- How to use multi markers in the same scene
2- How to get animation to the augmented reality
I only know how to get model nothing more
3- is that able to mix between augmented reality and panda to make a traditationl card game
I hope you help me
one more thing here is the code I use for now
from pandac.PandaModules import *
from direct.directbase.DirectStart import *
from direct.actor import Actor
loadPrcFileData("", "auto-flip 1")
def update(task):
if cursor.ready():
cursor.fetchIntoTexture(0, videoTexture, 0)
toolkit.analyze(videoTexture)
return task.cont
base.camLens.setNear(0.1)
option = WebcamVideo.getOption(0)
cursor = option.open()
videoTexture = Texture('movie')
cursor.setupTexture(videoTexture)
videoTextureScale = Vec2(option.getSizeX()/float(videoTexture.getXSize()), option.getSizeY()/float(videoTexture.getYSize()))
cardMaker = CardMaker('cardMaker')
cardMaker.setFrame(-4/3.0,4/3.0,-1,1)
cardMaker.setUvRange(Point2(videoTextureScale[0],0), Point2(0,videoTextureScale[1]))
card = render.attachNewNode(cardMaker.generate())
card.setTexture(videoTexture)
card.setTwoSided(True)
card.setY(5)
card.setScale(1.50)
card.setSx(-card.getSx())
card.setBin("fixed", -1)
model = loader.loadModel("panda")
model.reparentTo(render)
model.setBin("fixed", 1)
model.setScale(0.112,0.112, 0.112)
model.setPos(+8, -42, 0)
model2 = loader.loadModel("teapot")
model2.reparentTo(render)
model2.setBin("fixed", 1)
model2.setScale(0.112, 0.112, 0.112)
model2.setPos(-8, 42, 0)
toolkit = ARToolKit.make(base.cam, Filename("camera_para.dat"), .5)
toolkit.attachPattern(Filename("patt.hiro"), model)
toolkit.attachPattern(Filename("patt.kanji"), model2)
taskMgr.add(update, "update")
run()
Thank you in advance guys