Hi Carsten, 1) what's the real use for this: We are literally using the file I'm sharing. The only difference is the mask image and that the faces position come from an OpenCV face detection application passing their location through sockets. So this is the "real use" for this :)
More specifically we have to draw the webcamera image on top of the BGE scene. We have a working workflow with .Net applications forcing to be on top of blender and drawing with alpha channel on. However this proved to be too slow and we spent some time last week investigating better workflows for our project. We ended up doing all the image processing outside BGE and using Video Texture to show a cropped image of the detected face in realtime. Making long short we needed to have a custom texture (mask.png) and the webcam accessible to be used with BGL at scene.post_draw time. Benoit helped a lot on figuring that out btw. 2) "The example files are a bit "dry" to made artists interested ;-)" Who knows what make artists interested anyways? :) But to be frank I thought on those more as a reference code itself. I myself had a really bad time trying to go over VideoTexture and BGL and to create nice scripts with it. I went over the (few) online documentation, the code, debugged some functions, got some help from Benoit ... Bottomline being: I would love to find those code snips, and I think they can help tech-artists to not spend so much time on research as I did. Also to use BindId you do need to know openGL. Therefore I'm a bit afraid that "pure" artists wouldn't really get what the possibilities are anyway. Basically anything that you can do with OpenGL you can do here. 3) BTW: I am used to (NaN times) and willing to work with all developers who need good test scenes for new features, and also willing to help while documenting new features. Just ask! That's great. I'll keep that in mind :) Cheers, Dalai http://blenderecia.orgfree.com 2010/3/20 Carsten Wartmann <[email protected]> > Am 20.03.2010 01:11, schrieb Dalai Felinto: > > Log Message: > > ----------- > > BGE: bindId property in VideoTexture.Texture (to get the openGL id of the > texture) > > > > Now if you have a VideoTexture.Texture you can use its id and draw it > with bgl > > The Id is only going to be valid if the obj you are getting the > VideoTexture.Texture from has a valid texture. In the examples you will see > them as planes, that become invisible at load time, but are needed to > validate the texture id. > > > > This is a simple example file: > > I tried both files and they worked. However I am not sure what the use > of this is? Drawing GUIs in the BGE? > > Is it also possible to draw into textures which are mapped onto an > object? (sorry no time to try). > > The example files are a bit "dry" to made artists interested ;-) > > BTW: I am used to (NaN times) and willing to work with all developers > who need good test scenes for new features, and also willing to help > while documenting new features. Just ask! > > Carsten > > -- > Carsten Wartmann: Autor - Dozent - 3D - Grafik > Homepage: http://blenderbuch.de/ > Das Blender-Buch: http://blenderbuch.de/redirect.html > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
