ARtoolkit fun

Return to Showcase

ARtoolkit fun

Postby ThomasEgi » Sun Jan 17, 2010 10:24 am

Hi everyone,

while i was bored again i thought i might aswell do something "usefull". so here it is:
http://www.youtube.com/watch?v=HJV3DucbErM

source with all nececssary files included can be found here.
http://home.arcor.de/positiveelectron/files/project-files/artoolkit-stickfigure.zip
i only tested it on linux. dunno if you need to change stuff for windows but if someone has windows and can test it and get it to work feel free to post the code-changes.
User avatar
ThomasEgi
 
Posts: 2147
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby enc » Sun Jan 17, 2010 11:25 am

With approximately 0.6 seconds i could come up with more than 10 very cool or useful things you could do with this. Unfortunately its not in my intrests list, but i know it will make many people very happy to see an open source solution for it.

Just wanted to say.
Know your self and you shall know everything you need to know.
My games: http://moba.ee/
My doodles: http://hendrikkangro.deviantart.com/gallery/
enc
 
Posts: 166
Joined: Wed May 27, 2009 3:35 am
Location: Estonia, Tartu

Postby astelix » Sun Jan 17, 2010 12:36 pm

hah cute! thanks for sharing it
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby radu » Mon Jan 18, 2010 4:04 am

I played with artoolkit as well, but this was a nice idea, well done.

p.s. buy a printer ;)
Adopt a Panda (thread)
and get your funky Panda avatar here
User avatar
radu
 
Posts: 150
Joined: Fri Nov 06, 2009 11:09 am
Location: Bucharest

Postby archengle » Sat Feb 20, 2010 10:25 pm

ThomasEgi, love your posts.
I'm new to the whole artoolkit and want to know how you would, if you could, replace the camera image with the window from your developed game (say for motion capture within a fictional environment).
archengle
 
Posts: 20
Joined: Tue Feb 09, 2010 10:38 am

Postby rdb » Sun Feb 21, 2010 5:14 am

That's easy by just passing a rendered texture to ARToolKit instead of a camera image. But it makes no sense whatsoever ot do that. The whole point of this is to acquire 3D coordinates of a pattern in the real-world - in the virtual world, you'll already have those coordinates.
rdb
 
Posts: 8575
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby triselectif » Wed Mar 24, 2010 5:22 pm

hi. i m new to panda.
i precisely wonder how to get the rendered texture out of panda (the whole main window of panda3d in an opengl format) in order to pass it to another opengl application (like an opengl pygame window for ex). What s the command for that ?

rdb wrote:That's easy by just passing a rendered texture to ARToolKit instead of a camera image. But it makes no sense whatsoever ot do that. The whole point of this is to acquire 3D coordinates of a pattern in the real-world - in the virtual world, you'll already have those coordinates.
triselectif
 
Posts: 3
Joined: Wed Mar 24, 2010 5:14 pm

Postby rdb » Thu Mar 25, 2010 2:22 am

That involves rendering the content of the main window to a buffer (setting "window-type" to "offscreen" helps), and then getting the RAM image data via base.win.getTexture().getRamImage(). (or the slower getRamImageAs() for format conversion).
rdb
 
Posts: 8575
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby triselectif » Thu Mar 25, 2010 12:11 pm

Ok. Thanks for answering.
I ve tried .getTexture().getRamImage() yesterday but at the end i couldn't run both pygame and panda3d at the same time in the same program, since panda3d has to run in the main thread apparently (under python). Any idea ?
triselectif
 
Posts: 3
Joined: Wed Mar 24, 2010 5:14 pm

Postby drwr » Thu Mar 25, 2010 12:27 pm

Running Panda in a child thread is possible, but you'd probably have to compile Panda yourself to support true threading. But you don't need to do this; you can run Panda in the main thread, and coexist happily with pygame--just call taskMgr.step() from time to time instead of calling taskMgr.run().

Still, it seems like a weird thing you're doing, to have two different OpenGL contexts running in the same process. I doubt you'll get very good performance that way (your graphics card will have to switch back and forth between the two different contexts). Whatever problem you're trying to solve, are you sure that's the best solution?

David
drwr
 
Posts: 11253
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby triselectif » Thu Mar 25, 2010 1:10 pm

Using taskMgr.step() is a great idea. I was wondering how to call panda3d step by step

I know it sounds weird. The thing is i wanna use occasionally 3d within a multitouch context using pymt (a mt framework built on pygame). i m gonna try your suggestion. THXS!
triselectif
 
Posts: 3
Joined: Wed Mar 24, 2010 5:14 pm


Return to Showcase

Who is online

Users browsing this forum: No registered users and 0 guests