Inside3D!
     

Quake3 Ingame videostream

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Thys



Joined: 29 Mar 2010
Posts: 5

PostPosted: Mon Mar 29, 2010 9:36 pm    Post subject: Quake3 Ingame videostream Reply with quote

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!! Smile

Greetings, Thys
Back to top
View user's profile Send private message
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Mon Mar 29, 2010 10:16 pm    Post subject: Reply with quote

A bit of something related got commented here:

http://forums.inside3d.com/viewtopic.php?t=2038&postdays=0&postorder=asc&highlight=flash+quake&start=15
Back to top
View user's profile Send private message
Thys



Joined: 29 Mar 2010
Posts: 5

PostPosted: Mon Mar 29, 2010 10:40 pm    Post subject: Reply with quote

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! Smile
Back to top
View user's profile Send private message
Thys



Joined: 29 Mar 2010
Posts: 5

PostPosted: Wed Mar 31, 2010 3:01 pm    Post subject: Reply with quote

anyone? i'm really getting desperate
Back to top
View user's profile Send private message
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Wed Mar 31, 2010 4:19 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Mar 31, 2010 4:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Thys



Joined: 29 Mar 2010
Posts: 5

PostPosted: Wed Mar 31, 2010 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Mar 31, 2010 7:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Spirit



Joined: 20 Nov 2004
Posts: 476

PostPosted: Thu Apr 01, 2010 7:39 am    Post subject: Reply with quote

You can use links in any decent filesystem. http://en.wikipedia.org/wiki/Symbolic_link
_________________
Quake Maps
Back to top
View user's profile Send private message Visit poster's website
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Thu Apr 01, 2010 11:26 am    Post subject: Reply with quote

Spirit wrote:
You can use links in any decent filesystem. http://en.wikipedia.org/wiki/Symbolic_link


That include NTFS now. Even If the normal programs are not aware.
Back to top
View user's profile Send private message
Thys



Joined: 29 Mar 2010
Posts: 5

PostPosted: Thu Apr 01, 2010 11:34 am    Post subject: Reply with quote

great idea! currently testing it on our server
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group