Screen from my new game working on
Community Forums/Showcase/Screen from my new game working on
| ||
eie toy for windows ;) look at my worklog please now with blue box (chroma key) mfg panno |
| ||
chroma key implement 80% |
| ||
PANNO, I don't know exactly what it is, but I feel like it's something rrreally cool! Is this the new Webcam DLL in Action? What is my Fish doing there? Has it become a Pirhana and is trying to bite in your Finger? Please describe what it does! |
| ||
no no i give him feed and them he get bigger and bigger and then crashed he into many particels and over the screen runs blood ! i've got 10 point's LOL yes this is my special webcam dll in action i am working on because motion capture is a haevy act (for me) look at this ! this is a link for the ps2 www.eyetoy.com mfg panno |
| ||
Sounds good :) Yes, Motion Tracking is difficult when you don't use special Markers. You could use infrared LEDs - they are invisible to the human eye but can be seen by the camera, check out conrad.de for cheap LEDs. |
| ||
looks neat |
| ||
Wow Panno, Eye Toy from Blitz? Good man - I like it!!!! Keep us posted as this would be a great fun thing for Christmas!!! IPete2. |
| ||
i will do all my best to release it at start december |
| ||
This is very worthy. Good luck! If you can get it all happening nicely it could be huge fun. |
| ||
hm motion tracking is a hard way command "HIT" 80% implementet command "SPEED" 0.1 % implementet please wait a while |
| ||
new pic now with buttons and the best !it works!!! but 62 millisecs per frame grrrrr i need a inline asm and pointer .Please ! hit is ok but the movement sux at the moment ps: a bit do dark here |
| ||
Hey Panno, I just tried your old Camera DLL with my new ultracheap Camera. First it gave me a real low framerate, but then I edited the source a bit and now I got about 15 FPS or something! I edited it the following way: callDll("pbca3d","START") is called only once, before the main loop. callDll("pbca3d","ENDCAP") is called only once, after the main loop. callDll("pbca3d","GIVEIMAGE") is called every Frame. Then I use the following waiting Code: a=0 while a=0 and keydown(1)=0 a=peekbyte(out_bank,0) wend Now it works perfectly!!! It is the fastest solution I found yet, perfect!!! The good news is: this new cheap cam doesn't fail like the other cams I had before. I already wrote a little Source that allows to use TV Remote Control as a Mouselike Input device. This works up to 3 Meter Distance, I can draw Pictures on the Screen using the TV-Remote-Control :) (only had to mirror the x-axis) I will now think about a simple solution to determine the Depth of the Marker to use it as a 3D Cursor. EDIT: ARRRGH! There's just another Problem popped up :/ (See PM @ blitzforum) |
| ||
New DLL FOR B3D with source ! runs fine in xp www.napalm.de/webcamdll/webcamdll.rar have fun |
| ||
the example text.exe dont work for me. I have memory access violation in pointer=pointer+4 with debug mode on. Any idea? |
| ||
Panno, Yes me too, as L Draven above, pointer=pointer+4 is highlighted in Debug with a crash. I have a USB logitech clicksmart 310 web cam. Is there something else I am missing? Does this work with EyeToy? Thanks, IPete2. *** HOLD IT L-Draven **** Don't select the driver in the dialog box, just click okay instead. I get a picture but it is not synched IPete2. |
| ||
mm the test.exe and the source both work as far as they do not crash, but the imagery I get is really distorted. See this screenshot Ive got a Philips Vesta Pro cam. Any idea how this is happening? |
| ||
Thanks Ipete2 but i continue with the same error. :-( thanks again. L_DRAVEN |
| ||
sorry i have forgott : make sure u have the foolowing settings in your softwareapplication from the developer 320*240 24 bit what will works |
| ||
and itete 2 and l_draven have win98 i guess |
| ||
Hi PANNO NOTHING!!! dont work!! grrr :-)) i have XP. I think that the problem is in my webcam because is bad. (it is D-MAX 4 in 1) :-( (BAD BAD :-)) |
| ||
Just had an idea. You might be doing it this way already - in any case here goes :- My idea relates to FAST motion detection. Say you are using a screen size of 800x600. Now, you don't need to test *every* pixel for movement but instead have 1 pixel per 'zone'. With the 800x600 example, if you wanted 100 zones, you'd test pixel 80,60 / 160,60 / 240,60 etc. (simply put, one pixel in every box on an invisible grid). Then, you test each of your pixels to see if there has been a change in colour. Now, bearing in mind that on live video you're always going to get some artefacts and small colour variation, you'll need to build in a 'tolerance' setting so that zones aren't triggered accidentally (analog sources generally have that 'creep' thing as well). Now, the clever part. You can then decide what direction something is moving by comparing currently active zones with previously active zones. For example if the zone at 0,80 is active now, and the zone at 0,0 was active before, then you can deduce that the movement is *probably* heading from left -> right. You could remember as many 'previous poses' as you needed to get a good result. You could also gain accuracy by remembering the different colours moving through different zones, and vector math / probability tables (any human figure is always going to move in similar ways). The great thing about this method is that it does NOT require a uniform background colour, provided the camera never moves (background pixels will be fixed, hence they will never trigger movement). Hope that's of some help :) |
| ||
Panno, I am using XP. I have a Logitech clicksmart 310 camera, works perfectly with its own software to do all sorts of things. It is set at 320,240. I get a picture and I can see movement but the picture is made of diagonally out of synch bits of picture. I'll try and post a picture. My output is a lot worse than the picture shown by Defiance... Ipete2. |
| ||
Ipete - also make shure it is set to 24 Bit! Hey PANNO, I tried it and it works a charm on WinME with Creative WebcamIII. And -hohoho- I have a little toy for you kids, that is actually kinda funny :) It's called (fanfare): TV-Remotecontrol Painting, or IRDRAW :) All you need is a TV Remote Control and a webcam and of course PANNOs DLL (see above). Look, me, painting: It's really funny since the webcam image is mirrored and if you position the cam on the Screen, it really feels like a mirror. Colors can be choosen as well using the RC, and there is a Button to clear the Drawing which demonstrates it's capabilities as an input device. Tho it's a bit new and raw to navigate this "cursor". Here the source (pasta) ; *********** IRDRAW 0.00001 - TV Remotecontrol Painting - Brought to you by CSP *********** ; Credit to PANNO - thanks for the incredible WEBCAM.DLL !!! ; For this you need a TV-RC and a Webcam. Webcam settings MUST be 320*240 in 24 Bit! ; The Picture must be relatively dark with low contrast. AppTitle "IRDRAW 0.00001 - TV Remotecontrol Painting" Global hwnd_width=640 Global hwnd_height=480 Graphics3D hwnd_width,hwnd_height,32,2 ; btw: also works in fullscreen! :) ;This is an Input device, the Infrared Point of a TV Remotecontrol, when aimed to a camera ;IRDot is 1 if a button was pressed (something like mousedown()) Global IRDot,IRDotX,IRDotY Global IRDotBrightness=650 ; (max=765=white) Global IRDotSize=2 Global WebcamRefresh=100 ; Camera texture refresh every n millisecs Global in_bank = CreateBank(1) ; ask PANNO :) Global out_bank = CreateBank (321*241*4): ; 320*240 pixels for image exchange with DLL Global img = CreateImage (320,256) ; used as a buffer for webcam image camera=CreateCamera() CameraClsMode camera,0,1 Global tex=CreateTexture(256,256,256) ; screen-covering sprite semitransparent webcam image ols=CreateSprite() EntityTexture ols,tex ScaleTexture tex,-1,1 TranslateEntity ols,0,0,1.0 EntityBlend ols,3 EntityFX ols,1 cube=CreateCube() ; had to add this since radeon 9200 is somehow crazy TranslateEntity cube,16,12,20 ok = CallDLL("B3DCAPtest","INIT",in_bank,Out_bank); Delect WebCam Device ok = CallDLL ("B3DCAPtest","START"); start thread that will continuelsy copy webcam images to our bank!! SetBuffer BackBuffer() font=LoadFont("arial",32) SetFont font butth=40 ; initialize some buttons and stuff butt1$=" Clearcanvas " butt1x=0 butt1w=StringWidth(butt1$) Global doodle=CreateImage(hwnd_width,hwnd_height-butth) rgbimg=CreateImage(256,butth-1) ; colorpick palette SetBuffer ImageBuffer(rgbimg) jstep#=butth/255.0 For j=0 To 255 For i=0 To 255 Color i, j ,Abs(127-j) Plot i,yj# Next yj#=yj#+jstep# Next SetBuffer BackBuffer() butt2x=butt1w butt2w=256 draw_r=255 draw_g=255 draw_b=255 ; -----------------------------------------MAIN LOOP-------------------------------------- While Not(KeyHit(1)) Cls m_old=m m=MilliSecs() If m>next_refresh Then WebCamJobs() next_refresh=m+WebcamRefresh EndIf If IRDot=1 ; TV-RC Button pressed? SetBuffer ImageBuffer(doodle) Color draw_r,draw_g,draw_b If old_IRDot=1 Line IRDotX,IRDotY-(butth),old_IRDotX,old_IRDotY-(butth) Else Plot IRDotX,IRDotY-(butth) EndIf SetBuffer BackBuffer() EndIf old_IRDot=IRDot old_IRDotX=IRDotX old_IRDotY=IRDotY DrawImage doodle,0,butth ; overlay masked painting-canvas ; draw buttons etc. Color 100,100,100 Rect butt1x,0,butt1w,butth-1,0 Text butt1x,butth/2,butt1$,0,1 DrawBlock rgbimg,butt1w,0 ; show pickable palette Color draw_r,draw_g,draw_b Rect butt2x+butt2w+10,0,100,butth-1,1 ; show current color ; preform button actions if required If IRDot=1 And IRDotY<butth Then If IRDotX>butt1x And IRDotX<butt1x+butt1w ; CLS SetBuffer ImageBuffer(doodle) Color 0,0,0 Rect 0,0,hwnd_width,hwnd_height-butth SetBuffer BackBuffer() IRDot=0 EndIf If IRDotX>butt2x And IRDotX<butt2x+butt2w ; select color SetBuffer ImageBuffer(rgbimg) rgb=ReadPixel(IRDotX-butt2x,IRDotY) SetBuffer BackBuffer() draw_r=(rgb Shr 16) And $ff draw_g=(rgb Shr 8) And $ff draw_b=(rgb And $ff) IRDot=0 EndIf EndIf ;Text hwnd_width-40,10,m-m_old ;DrawBlock img,MouseX(),MouseY() RenderWorld Flip Wend ok = CallDLL("B3dCAPtest","ENDCAP") ; leave nicely EndGraphics() End ; --------------------------------------end of main loop-------------------------------------- Function WebCamJobs() IRDot=0 ; flush Buttonstate cbright=0 SetBuffer ImageBuffer(img) LockBuffer ImageBuffer(img) pointer =0 For LoopX = 32 To 287 ; copy neccessary part from bank to image... For LoopY = 24 To 215 Pointer = (Loopy+(Loopx*240))*4 argb = PeekInt(out_bank,pointer) WritePixelFast(Loopx-32,Loopy,argb) r=argb Shr 16 g=(argb Shr 8) And $ff b=argb And $ff sum=r+g+b If sum>IRDotBrightness ; (find White IR-Dot) cbright=cbright+1 If cbright>=IRDotSize IRDot=1 IRDotX=hwnd_width-(((loopx-32)/256.0)*hwnd_width) IRDotY=((loopy-24)/192.0)*hwnd_height EndIf Else cbright=0 EndIf Next Next UnlockBuffer ImageBuffer(img) CopyRect 0,0,256,256,0,8,ImageBuffer(img),TextureBuffer(tex) ; ...and from image to texture SetBuffer BackBuffer() ; maybe it would be better to move it directly from bank to texture. However... End Function |
| ||
lol |
| ||
I can't even make a normal paint program, and you can make a T.V. remote control/ use your hands, paint on a webcam! Cool :D |
| ||
I can't even make a normal paint program, and you can make a T.V. remote control/ use your hands, paint on a webcam! Cool :D |
| ||
L_Draven : try moving the web cam to another USB port, that's how I got mine semi-working! Looking at the above, fantastic! What a lot of fun can be had with this! Well done guys! Now if only, I could make it work on my camera... 24 bit I'll give it a try and report back. ...Er I can't seem to change the web cam colour settings... My nVidia card doesn't do 24 bit only 16 and 32. I set it to 16 bit and...no that doesn't seem to be the problem. Here is a picture. IPete2. |
| ||
IPete - maybe you can set your camera color depth (no need to set screen depth!) using the following tool: http://ictcm.tamu.edu/Phoenix_2002/vidcap.zip which was listed on this handy lil link list: http://ictcm.tamu.edu/Phoenix_2002/links.html it's from microsoft, but they even don't host it on their downloads zone anymore. |
| ||
Hey thanks, I'll certainly try that tonight! The web cam is at my home office at the moment. Cheers, IPete2. |
| ||
Panno, this might interest you : http://www.blitzbasic.com/Community/posts.php?topic=27730 :) If you ever get this lib to a rock-solid state that works with any camera then I'd be interested in buying a license - or you could always make it freeware ;) |
| ||
he skitchy this lib to a rock-solid state that works with any camera ? LOL but i will try ! |
| ||
mm mine still dont work.. now it doesnt produce anything anymore, just an 'illegal memory address' error.. when I set the cam res to 320x240 using the lil vidcap tool I cant change the depth to 24bits. only thing it will let me select is the value '1420' .. whatever that may be... ps. I also have an nvidia card which doesnt support 24 bit screendepth |
| ||
i420 whats werry wery evil !!! its a decoded format for the image let me see what i can do ! |
| ||
PANNO - could you include a "Picture on Demand"-Mode? Atm it works in a continous Mode in the Background and delivers Images "as fast as possible", but this makes the 3D rendering very slow. Would it be possible to send a request to the dll, which will then grab one image and then go in standby mode? initialize capture while game read image from bank send single grab request to dll ... renderworld flip wend endcap thing |
| ||
yes no problem |
| ||
This is very cool. I just purchased an Eye Toy before I saw this post. Also, here at RISD we've started messing with video input for various stuff; people have been using video input with Director and Max/MSP, but now I get to mess with it in Blitz! Can you provide the download as a zip archive? |
| ||
Doenn't work with...some of Ipete2 logitech messanger GeForce 4 Windows XP |
| ||
So what happened? The link is dead. Where is webcam? |
| ||
Yes please, I would like the webcam DLL very much :/ |
| ||
http://members.tripod.com/BLITZPANNO/ to prevent the user from using the close button of a window, use BlitzClose to allow ending Webcam capturing correctly under all circumstances (it will crash if you don't): http://www.blitzbasic.com/Community/posts.php?topic=44032 |
| ||
That's really impressive!!!! Im quite amazed! |
| ||
can i get any link to the dll and source? :) Im making some kind of motion capture app. |
| ||
Panno, can you post two lines of comments about your webcam dll? I don't know how to use it!! |
| ||
Halooo!! Can someone explain me how to use Panno's dll? |
| ||
iam at work please wait som hour's |
| ||
Just a Q- Was there a new version of it released Panno? I'd like to recode my motion detection so I can share it :) I can show you my current code, but it's very very dirty as it was not planned out. I think I wanted to show you before too. :) |
| ||
:-( Please help me! |
| ||
soo lastmethyl.rar is the last dll version ! in this rar is a bb source , my server is down and i have a update on cd but i have 230 update cd's and an chaotic system . @DABBEDE PLEASE WAIT @CYGNUS help dabbede please, because i have not much time in the moment sorry i come back on 12.sept |
| ||
Hmm, I notice that most Macs, like the MacBook and iMac have built-in webcams right into the monitors. I'm sort of wondering if doing an iToy (Eye-Toy, iToy, get it?) would be worth anything doing. Windows and Linux are cool, too, just as long as you have a good quality webcam in which to do this, and that it's supported (I even wonder what webcams are even supported for Linux). |
| ||
I'm sorry for the problems I'm creating to the community (and in particoular Panno)! I appreciate a lot your effort!! |
| ||
I've got a copy of Methyl on my server: http://www.melog.ch/dl/panno_webcam_dec2005_lastmethyl.rar |
| ||
Yuppie!! :D |
| ||
Thank you all! |
| ||
well jfk - my friend :) thx |
| ||
whatabout the userlib / example for the dll ? I see only a runtime in the archive |