ARToolKit | Mailing List Archive |
![]() |
From: | Alexander Hornung <hornung@c ................> | Received: | Nov 24, 2004 |
To | artoolkit@h .................. | ||
Subject: | camera image suddenly dark | ||
This is a multi-part message in MIME format. --Boundary_(ID_gDIkWK21HXWNzbei+Fc4Dg) Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT hi all, i currently have an annoying problem, which i couldnt resolve yet. i am using artoolkit using a firefly firewire cam (but this also happens with other firewire cams). my artoolkit initialization code is pretty much simply based on the "simple" example app. all in all everything is running as expected, but from time to time the rendered camera image will suddenly turn somewhat darker for a few seconds, and then comes back to its old brightness. any idea why this could happen? thanks, alex (i attached two very small screenshots showing the effect) -- Dipl.-Inform. Alexander Hornung Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21815 Fax ++49 (0)241 80-22899 mailto:hornung@c ................ http://www.rwth-graphics.de --Boundary_(ID_gDIkWK21HXWNzbei+Fc4Dg) Content-type: image/jpeg; name=artoolkitbright_small.jpg Content-transfer-encoding: base64 Content-disposition: inline; filename=artoolkitbright_small.jpg /9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD/2wBDACgcHiMe GSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6 /+b9//j/2wBDASstLTw1PHZBQXb4pYyl+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4 +Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj/wAARCAAtADwDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAA AAAAAAAAAwQBAgUABv/EACoQAAICAQQCAQQABwAAAAAAAAECAxEABBIhMRNBURQiYXEFIzJC UqHx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAC/8QAGxEBAQEAAgMAAAAAAAAAAAAAAAERAmES ITH/2gAMAwEAAhEDEQA/AI2HcBuH6yJn8Q2ht1+gesHGsmpcC6X2RhfoJByGU/vCNXoBGeMi qYsP6RzWMaqKQyR7FKrVmvRy66IqoYP/ADPkY2D44wZHHHZOKDijUsJDJuYCufWTLNHGm5uR 1wMBAsc4N0SO6ztUHjjKoCY65HeUqqzTHbuKMq3ya6yp07sdyzMwPIOJpPNXjDnniqwqPPAo RUcjsEf8xWndNGIoQti+zhs8/vb/ACOH0uqaGUFiSp4Iwxa2cpLGJFo8HsH4zi48e8cirxXV 6gGMopO6xdDgDKTT0MsAiZWQFmHFk1xh8Wg1DsQhT7hRu+x84y5pCeOveV9L4Q1Y2gkbCD0R 2MV+pegAx4/OM6hyNvkNjo1hF0enkUOAaIvg1iyycJCnklVfk84PG/4eAZWPwuNBmOUwEoeQ esJ4nLEqFDci29c/jvKSqNtGjQ7rL6SQuCp/t6zEaQkMhTyCQFj6I/1jKRgRbG5H5yGH3Iw4 o1X7wuKLTQAglQOewfeRC6xwIpNcYyReZslFyK4BoYW43w4eVf/Z --Boundary_(ID_gDIkWK21HXWNzbei+Fc4Dg) Content-type: image/jpeg; name=artoolkitdark_small.jpg Content-transfer-encoding: base64 Content-disposition: inline; filename=artoolkitdark_small.jpg /9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD/2wBDACgcHiMe GSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6 /+b9//j/2wBDASstLTw1PHZBQXb4pYyl+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4 +Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj/wAARCAAtADwDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAA AAAAAAAAAAECAwQF/8QAIhAAAgIBBQACAwAAAAAAAAAAAQIAESEDEjFRYQQyEyJB/8QAFQEB AQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAAREx/9oADAMBAAIRAxEA PwDzaiY1i4C3Pkf4z2IVIse+SnBsUMRjToXeZfAyYCAzd2YMwAswKC6uS9gUOIDLYujUW0nI YmQGbi4wWUUAYRogpQJU5bMpHKnyFdETLYoxqpcGiBgmyYt9sAxJOLuJNpJtwgADZOZUAhdm oWEzdytPcHBDBGGbuOFYPjqRvPc0c5zxAaakXCMY1FsBFL0vsYGmm2xxms89Tq+QU2/qtu1k MwogXz7ORpQ1Gf7EmhQvqFapv0NtlW3Ddjo/yJ2U4VaAuuyPZMIEstwUgKAZUyPMasmv/9k= --Boundary_(ID_gDIkWK21HXWNzbei+Fc4Dg)-- |
From: | Alexander Hornung <hornung@c ................> | Received: | Nov 24, 2004 |
To | artoolkit@h .................. | ||
Subject: | Re: camera image suddenly dark | ||
hi again, i think i found the reason and the solution is probably interesting for some of you. i wrote a combination of artoolkit, the open dynamics engine for physics stuff, and a new render-engine to integrate things like toon shading. and the reason for the _sometimes_ darker camera image was actually a single line of opengl code in the render engine where i set the texture environment to gl_modulate instead of gl_replace. glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); strange enough that i just leads to this error in "some" seldom cases. (fun to debug...) solution is of course to set glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); after rendering. this makes we wonder, if it would not be better to provide an option in the artoolkit, so that it sets all neccessary gl states and so on before every rendering pass, so that integrated foreign opengl code does not interfere with the displaying of the camera images... with around 30fps this should not be a big performance hit anyway, but providing it optionally using a kind of flag or whatever could help a lot in applications with lots of rendering work. anyway, artoolkit is great ;) best, alex Alexander Hornung wrote: > hi all, > > i currently have an annoying problem, which i couldnt resolve > yet. i am using artoolkit using a firefly firewire cam (but this also > happens with other firewire cams). my artoolkit initialization code is > pretty much simply based on the "simple" example app. > all in all everything is running as expected, but from time to time the > rendered camera image will suddenly turn somewhat darker for a few > seconds, and then comes back to its old brightness. any idea why this > could happen? > > thanks, > alex > > (i attached two very small screenshots showing the effect) -- Dipl.-Inform. Alexander Hornung Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21815 Fax ++49 (0)241 80-22899 mailto:hornung@c ................ http://www.rwth-graphics.de |
From: | Philip Lamb <phil@e ..........> | Received: | Nov 25, 2004 |
To | Alexander Hornung <hornung@c ................>, artoolkit@h .................. | ||
Subject: | Re: camera image suddenly dark | ||
At 1:07 PM +0100 24/11/04, Alexander Hornung wrote: >a single line of opengl code in the render engine where i set the >texture environment to gl_modulate instead of gl_replace. >glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); >strange enough that i just leads to this error in "some" seldom cases. >(fun to debug...) >solution is of course to set >glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); >after rendering. > >this makes we wonder, if it would not be better to provide an option >in the artoolkit, so that it sets all neccessary gl states and so on >before every rendering pass, so that integrated foreign opengl code >does not interfere with the displaying of the camera images... Alex, What you suggest is exactly what is done by the function arglDispImage in libARgsub_lite (a replacement for libARgsub). New projects should use libARgsub_lite in preference to libARgsub where possible. You can find the library, example usage (simpleLite) and documentation in ARToolKit v2.69 (http://sourceforge.net/project/showfiles.php?group_id=116280). Regards, Phil. -- Philip Lamb Research Student, Human Interface Technology Laboratory New Zealand, University of Canterbury, Christchurch, NZ. +64 3 3642987 x3070 |