View previous topic :: View next topic |
Author |
Message |
Thys
Joined: 29 Mar 2010 Posts: 5
|
Posted: Mon Mar 29, 2010 9:36 pm Post subject: Quake3 Ingame videostream |
|
|
Hello!
I'm a interaction student from belgium and currently working on a Quake3 project, I've setup a linux box that sends out messages to Max/MSP (or PureData) from ingame Quake, now I want to try to add a live webcam stream INGAME, so some kind of dynamic texture or just a swf or something, how do I do this?
Any help is greatly appreciated!!
Greetings, Thys |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
|
Back to top |
|
 |
Thys
Joined: 29 Mar 2010 Posts: 5
|
Posted: Mon Mar 29, 2010 10:40 pm Post subject: |
|
|
Hi Teiman, thanks for the link!
The thread offers no real answer, is it done before or is there a 3D engine that supports webcams or any kind of streaming swf or something?
thanks!  |
|
Back to top |
|
 |
Thys
Joined: 29 Mar 2010 Posts: 5
|
Posted: Wed Mar 31, 2010 3:01 pm Post subject: |
|
|
anyone? i'm really getting desperate |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
Posted: Wed Mar 31, 2010 4:19 pm Post subject: |
|
|
Try to join the ioquake3 mail list
http://ioquake3.org/
And ask there. There will be probably more minds that can solve problems in a Quake3 enviroment.
I hope you success.. I want you to success. I can't do much more than give you this advice, since I am mostly a webmaster and this things are beyond me.
Even if the ioquake3 mail list fails to you. Do more research. Theres always lots of info about creating things using quake, you already did the right thing chossing to develop under a quake engine  |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Mar 31, 2010 4:36 pm Post subject: |
|
|
tbh, I've not looked in all that much detail at all the twiddles of q3, but hey...
qfusion (yes, q2, not q3) supports roq textures on shaders, and I imagine q3 does too, though I don't remember seeing any.
Point is, once you have one video stream being played that way, all that remains is to change the feed to something else.
There are two APIs that permit streaming a video, one is gstreamer which is cross-platform, but I've no personal experience of it, and DirectShow, which is windows only, buggy, and utterly vile, but I have played with it before.
Quick overview of directshow.
Initialise DirectShow and create your DirectShow 'graph' (aka: context).
Create a standard video source filter, in this case a camera capture device. Set up its property bag so it uses the right camera.
Write a video sink filter (use the relevent base classes). Make it accept ideally a BGR video format.
Use the graph functions to attempt to connect the capture device to the sink. DirectShow should automatically add colourspace conversion filters between as required.
Start up the graph.
Your video sink filter will now be called periodically with raw video data. Be warned that it'll be in a seperate thread. You need to upload that video data to OpenGL. The simplest way to do it is to memcpy the data over and glTexImage from your rendering thread. The better way perhaps is to share the GL context between both threads and do the upload from the filter directly - you won't have access to the data if you just save a pointer. I guess you could also use a semaphore and pause the sink until the rendering thread is able to use it.
I think. _________________ What's a signature? |
|
Back to top |
|
 |
Thys
Joined: 29 Mar 2010 Posts: 5
|
Posted: Wed Mar 31, 2010 6:56 pm Post subject: |
|
|
thx so much for the repleys!
I've currently installed Graphstudio and I'm experimenting with the filters, it's not that easy for a first time user but I'm starting to get it, just how do I export to a file?
Also my friend is bashing his head against the wall with the RoQ file playback, we've managed to get a RoQ file playing IN the game but the ROQ is loaded from the /video directory in your .pk3, how do we make the RoQ video load from an external source?
again, thanks for all your help!!! |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Mar 31, 2010 7:29 pm Post subject: |
|
|
By getting a C compiler, the documentation for the API you wish to use to stream stuff, and a lot of patience, that's how you play videos from external sources.
I've never used graphstudio, nor microsoft's original version. Probably it won't help in any way other than to demonstrate the most basic concepts of DirectShow. _________________ What's a signature? |
|
Back to top |
|
 |
Spirit

Joined: 20 Nov 2004 Posts: 476
|
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
Posted: Thu Apr 01, 2010 11:26 am Post subject: |
|
|
That include NTFS now. Even If the normal programs are not aware. |
|
Back to top |
|
 |
Thys
Joined: 29 Mar 2010 Posts: 5
|
Posted: Thu Apr 01, 2010 11:34 am Post subject: |
|
|
great idea! currently testing it on our server |
|
Back to top |
|
 |
|