GEM and multiple video signals
@sonsofsol said:
@dioioib said:
Well yes I need to take 3 video signals and stack a section of them to form one body or image.
for this id use 3 separate gemchains
everyone looking like:[gemhead]
I
[translateXYZ] -- 0 -1 0 for 1st, 000 for 2nd, 0 1 0 for 3rd
I
[pix_video] -- device 1 - 3 or so
I
[pix_crop] (if needed)
I
[pix_texture]
I
[rectangle]
Sonsofsol regarding [pix_crop]I am having issues with setting dimensions and offsets as there is no information on the sizes. I find that I usually end up with a crop that does not fit to the dimensions required or is not in the proper offset. Am I correct in saying that the dimensions of the capture source are not the same as the rectangle and/or Gem window? If not how do I correct for this issue or does the placement of the [pix_crop] before the [pix_texture] correct the problem I was having?
Isight gem question
nope, works like a charm here.
macbook 13" alu osx 10.5.8
pd-extended 0.41.4
you don't have another program open which might access the cam?!
pd main window sayst:
[pix_videoDarwin]: height 320 width 240
[pix_videoDarwin]: SG channnel Device List count 3 index 2
[pix_videoDarwin]: SG channnel Device List DV Video
[pix_videoDarwin]: SG channnel Device List IIDC FireWire Video
[pix_videoDarwin]: SG channnel Device List USB Video Class Videoem/Library/QuickTime/QuickTimeIIDCDigitize
error: [pix_videoDarwin]: SGSetChannelDevice returned error -9408
... you might be able to track this down from the Find menu.
[pix_videoDarwin]: vdigName is Built-in iSight
[pix_videoDarwin]: digitizer rect is top 0 bottom 1200 left 0 right 1600
[pix_videoDarwin]: active src rect is top 0 bottom 1200 left 0 right 1600
error: [pix_videoDarwin]: could not set SG Rect
[pix_videoDarwin]: set SG NormalQuality
[pix_videoDarwin]: using YUV
GemwinMac: width - 500 height - 500
GemWindow Activate err = 0
GEM: GLEW version 1.5.0
GEM: Start rendering
GL: invalid numerant
i've had this problem too on windows - it has something to do with [pix_texture] , at least in my case it was. it was resolved by sending the message [mode 0 { to [pix_texture] . not sure what caused it, and now I don't have the problem anymore... i ended up making a patch called [pix_texture0] that just loadbang'd [mode 0 { to [pix_texture] , with an inlet/outlet so it could be used to replace [pix_texture] without manually sending the message every time
2 texture streams into one, as either mix, subtraction or screen?
hmm, no luck. Basically, is there a way to put a pix_mix object AFTER two pix_texture objects? or some other way to blend two pix texture objects?
I have no luck in getting any output when I pix_mix two pix_texture objects. And I need to mix after, because colour treatment in pd of one pix_video before a pix_texture object affects the whole gemwin, when I want it to be limited to that video stream only.
2 texture streams into one, as either mix, subtraction or screen?
Hey arif, thanks! Alas, this is exactly where I hit the wall. Because any colour tinting object added to the left pix_video streams (whether pix_curve, colorRGB, emissionrgb) affects all subsequent shapes pix_video or pix_film. In other words any parallel pix_video or pix_film will be coloured by the first (left) pix_video color effect, regardless of what object is in their string.
So if I understand ClaudiusMaximus correctly, it may work if I mix separate pix_textures, ie do the mixing after two textures are created, not mixing two pix_videos into one pix_texture.
This may maintain the distinct colouring applied to the separate video streams.
Any thoughts on how to mix/overlay/blend two pix_textures?
cheers
ps if this is not clear, I've attached a pd file set up with colorRGB on separate pix_films. you need to load your own video files into a folder with the patch to use it (same pix dimensions, same names as in patch). Only the left color object will have an effect on the final image.
Screen flipping with pix\_flip
Thank you for answering me so quickly.
This is the structure I'm actually using:
gemhead->pix_video->pix_texture->rectangle
As I try to apply the "pix_flip" element between "pix_texture" and "rectangle", the picture starts flipping back and forth.
I'm giving a look at "pix_coordinate", but that sequence of "eight numbers" seems messy to me (I couldn't find anything useful on the web about it).
Are you suggesting me to use the "pix_coordinate" for the image flipping instead of the "pix_flip"? It would be great, 'cause according to my first tests, "pix_coordinate" seems to work properly. I'm desperatly trying to figure out the right sequence of number for an horizontal flip. Any reference, patch or explaination would be really appreciated.
Thank you.
Guido
Next Tricky Problem
Okies. I got the previous problem working by myself but i now have a new problem. I need the patch to play a different video clip each time the users volume is above or below certain values. My next problem is finding suitable code to understand when the number is between two different values.
For example. when the users vocal volume drops below 60, clip X will be played, when the volume is between 60 and 70, clip Y will be played, when the volume is between 70 and 80, clip Z will be played and when the volume is over 80, clip A will be played.
The problem I'm having is i can't get pd to recognize when the vocal volume is between two different values. I have it going into an object |>=60 ; <=70| but that doesn't seem to be working. Can anyone help please ?? It's driving me mad
3d extrusion from pix\_texture?
hi forum~
this is what i want to do:
1. load an input (pix_film/pix_movie/pix_video = ok).
2. remove colors / make parts of the input transparent (pix_alpha = ok).
3. apply this modified input to a rectangle geo (pix_texture = ok).
4. then *extrude* this 2d texture into a simple 3d geo (like a cuboid) while preserving the alpha channel (i.e. transparent parts of the image look like 'holes' in the 3d object).
i am really not sure how to proceed with 4. i stole the image below as the closest example i could google (although it doesn't demonstrate the alpha preservation).
my first thought was to use pix_texture on a cuboid, however this doesn't seem to be the solution as it applies the 2d texture to all 6 surfaces (i.e. i guess a cuboid has no 'front' or 'back'). i want the 2d texture to stay facing the camera and extrude the texture back farther into the 3d space. or is there a way of modifying the default pix_texture behaviour on 3d geos? like having control on how it fills the 'Z' dimension...
is there an OpenGL object that achieves this effect?
glBindTexture?
should i install an OpenGL external? http://linas.org/gle/index.html
should i switch to blender or something?
help!
Gem object list.
I patched my Pd to print out all classes created, here's what Gem provides (current CVS version compiled on Linux with most options enabled):
accumrotate alpha ambient ambientRGB camera circle color colorRGB colorSquare colour colourRGB cone cube cuboid curve curve3d cylinder depth diffuse diffuseRGB disk emission emissionRGB fragment_program Gem gemframebuffer GEMglAccum GEMglActiveTextureARB GEMglAlphaFunc GEMglAreTexturesResident GEMglArrayElement GEMglBegin GEMglBindProgramARB GEMglBindTexture GEMglBitmap GEMglBlendEquation GEMglBlendFunc GEMglCallList GEMglClear GEMglClearAccum GEMglClearColor GEMglClearDepth GEMglClearIndex GEMglClearStencil GEMglClipPlane GEMglColor3b GEMglColor3bv GEMglColor3d GEMglColor3dv GEMglColor3f GEMglColor3fv GEMglColor3i GEMglColor3iv GEMglColor3s GEMglColor3sv GEMglColor3ub GEMglColor3ubv GEMglColor3ui GEMglColor3uiv GEMglColor3us GEMglColor3usv GEMglColor4b GEMglColor4bv GEMglColor4d GEMglColor4dv GEMglColor4f GEMglColor4fv GEMglColor4i GEMglColor4iv GEMglColor4s GEMglColor4sv GEMglColor4ub GEMglColor4ubv GEMglColor4ui GEMglColor4uiv GEMglColor4us GEMglColor4usv GEMglColorMask GEMglColorMaterial GEMglCopyPixels GEMglCopyTexImage1D GEMglCopyTexImage2D GEMglCopyTexSubImage1D GEMglCopyTexSubImage2D GEMglCullFace GEMglDeleteTextures GEMglDepthFunc GEMglDepthMask GEMglDepthRange GEMglDisable GEMglDisableClientState GEMglDrawArrays GEMglDrawBuffer GEMglDrawElements GEMglEdgeFlag GEMglEnable GEMglEnableClientState GEMglEnd GEMglEndList GEMglEvalCoord1d GEMglEvalCoord1dv GEMglEvalCoord1f GEMglEvalCoord1fv GEMglEvalCoord2d GEMglEvalCoord2dv GEMglEvalCoord2f GEMglEvalCoord2fv GEMglEvalMesh1 GEMglEvalMesh2 GEMglEvalPoint1 GEMglEvalPoint2 GEMglFeedbackBuffer GEMglFinish GEMglFlush GEMglFogf GEMglFogfv GEMglFogi GEMglFogiv GEMglFrontFace GEMglFrustum GEMglGenLists GEMglGenProgramsARB GEMglGenTextures GEMglGetError GEMglGetFloatv GEMglGetMapdv GEMglGetMapfv GEMglGetMapiv GEMglGetPointerv GEMglGetString GEMglHint GEMglIndexd GEMglIndexdv GEMglIndexf GEMglIndexfv GEMglIndexi GEMglIndexiv GEMglIndexMask GEMglIndexs GEMglIndexsv GEMglIndexub GEMglIndexubv GEMglInitNames GEMglIsEnabled GEMglIsList GEMglIsTexture GEMglLightf GEMglLighti GEMglLightModelf GEMglLightModeli GEMglLineStipple GEMglLineWidth GEMglLoadIdentity GEMglLoadMatrixd GEMglLoadMatrixf GEMglLoadName GEMglLoadTransposeMatrixd GEMglLoadTransposeMatrixf GEMglLogicOp GEMglMap1d GEMglMap1f GEMglMap2d GEMglMap2f GEMglMapGrid1d GEMglMapGrid1f GEMglMapGrid2d GEMglMapGrid2f GEMglMaterialf GEMglMateriali GEMglMatrixMode GEMglMultiTexCoord2fARB GEMglMultMatrixd GEMglMultMatrixf GEMglMultTransposeMatrixd GEMglMultTransposeMatrixf GEMglNewList GEMglNormal3b GEMglNormal3bv GEMglNormal3d GEMglNormal3dv GEMglNormal3f GEMglNormal3fv GEMglNormal3i GEMglNormal3iv GEMglNormal3s GEMglNormal3sv GEMglOrtho GEMglPassThrough GEMglPixelStoref GEMglPixelStorei GEMglPixelTransferf GEMglPixelTransferi GEMglPixelZoom GEMglPointSize GEMglPolygonMode GEMglPolygonOffset GEMglPopAttrib GEMglPopClientAttrib GEMglPopMatrix GEMglPopName GEMglPrioritizeTextures GEMglProgramEnvParameter4dARB GEMglProgramEnvParameter4fvARB GEMglProgramLocalParameter4fvARB GEMglProgramStringARB GEMglPushAttrib GEMglPushClientAttrib GEMglPushMatrix GEMglPushName GEMglRasterPos2d GEMglRasterPos2dv GEMglRasterPos2f GEMglRasterPos2fv GEMglRasterPos2i GEMglRasterPos2iv GEMglRasterPos2s GEMglRasterPos2sv GEMglRasterPos3d GEMglRasterPos3dv GEMglRasterPos3f GEMglRasterPos3fv GEMglRasterPos3i GEMglRasterPos3iv GEMglRasterPos3s GEMglRasterPos3sv GEMglRasterPos4d GEMglRasterPos4dv GEMglRasterPos4f GEMglRasterPos4fv GEMglRasterPos4i GEMglRasterPos4iv GEMglRasterPos4s GEMglRasterPos4sv GEMglRectd GEMglRectf GEMglRecti GEMglRects GEMglRenderMode GEMglRotated GEMglRotatef GEMglScaled GEMglScalef GEMglScissor GEMglSelectBuffer GEMglShadeModel GEMglStencilFunc GEMglStencilMask GEMglStencilOp GEMglTexCoord1d GEMglTexCoord1dv GEMglTexCoord1f GEMglTexCoord1fv GEMglTexCoord1i GEMglTexCoord1iv GEMglTexCoord1s GEMglTexCoord1sv GEMglTexCoord2d GEMglTexCoord2dv GEMglTexCoord2f GEMglTexCoord2fv GEMglTexCoord2i GEMglTexCoord2iv GEMglTexCoord2s GEMglTexCoord2sv GEMglTexCoord3d GEMglTexCoord3dv GEMglTexCoord3f GEMglTexCoord3fv GEMglTexCoord3i GEMglTexCoord3iv GEMglTexCoord3s GEMglTexCoord3sv GEMglTexCoord4d GEMglTexCoord4dv GEMglTexCoord4f GEMglTexCoord4fv GEMglTexCoord4i GEMglTexCoord4iv GEMglTexCoord4s GEMglTexCoord4sv GEMglTexEnvf GEMglTexEnvi GEMglTexGend GEMglTexGenf GEMglTexGenfv GEMglTexGeni GEMglTexParameterf GEMglTexParameteri GEMglTexSubImage1D GEMglTexSubImage2D GEMglTranslated GEMglTranslatef GEMglUniform1fARB GEMgluPerspective GEMglUseProgramObjectARB GEMglVertex2d GEMglVertex2dv GEMglVertex2f GEMglVertex2fv GEMglVertex2i GEMglVertex2iv GEMglVertex2s GEMglVertex2sv GEMglVertex3d GEMglVertex3dv GEMglVertex3f GEMglVertex3fv GEMglVertex3i GEMglVertex3iv GEMglVertex3s GEMglVertex3sv GEMglVertex4d GEMglVertex4dv GEMglVertex4f GEMglVertex4fv GEMglVertex4i GEMglVertex4iv GEMglVertex4s GEMglVertex4sv GEMglViewport gemhead gemkeyboard gemkeyname gemlist gemlist_info gemlist_matrix gemmouse GemSplash gemwin GLdefine glsl_fragment glsl_program glsl_vertex imageVert light linear_path mesh_square model multimodel newWave ortho part_color part_damp part_draw part_follow part_gravity part_head part_info part_killold part_killslow part_orbitpoint part_render part_sink part_size part_source part_targetcolor part_targetsize part_velcone part_velocity part_velsphere part_vertex pix_2gray pix_2grey pix_a_2gray pix_a_2grey pix_add pix_aging pix_alpha pix_artoolkit pix_background pix_backlight pix_biquad pix_bitmask pix_blob pix_blur pix_buf pix_buffer pix_buffer_read pix_buffer_write pix_chroma_key pix_clearblock pix_color pix_coloralpha pix_colormatrix pix_colorreduce pix_colour pix_colouralpha pix_colourmatrix pix_colourreduce pix_compare pix_composite pix_contrast pix_convert pix_convolve pix_coordinate pix_crop pix_curve pix_data pix_deinterlace pix_delay pix_depot pix_diff pix_dot pix_draw pix_dump pix_duotone pix_emboss pix_fiducialtrack pix_film pix_film pix_filmNEW pix_filmQT pix_filmQT pix_flip pix_freeframe pix_gain pix_get pix_gray pix_grey pix_halftone pix_histo pix_hit pix_hsv2rgb pix_image pix_imageInPlace pix_info pix_invert pix_kaleidoscope pix_levels pix_lumaoffset pix_mask pix_mean_color pix_metaimage pix_mix pix_motionblur pix_movement pix_movement2 pix_movie pix_movieNEW pix_multiblob pix_multiimage pix_multiply pix_multitexture pix_normalize pix_offset pix_pix2sig pix_pix2sig~ pix_posterize pix_put pix_puzzle pix_rds pix_record pix_rectangle pix_refraction pix_resize pix_rgb2hsv pix_rgba pix_roll pix_rtx pix_scanline pix_separator pix_set pix_share_read pix_share_write pix_sig2pix pix_sig2pix~ pix_snap pix_snap2tex pix_subtract pix_takealpha pix_test pix_texture pix_texture2 pix_threshold pix_threshold_bernsen pix_tIIR pix_video pix_videoNEW pix_vpaint pix_write pix_yuv pix_zoom polygon polygon_smooth pqtorusknots primTri rectangle render_trigger ripple rotate rotateXYZ rubber scale scaleXYZ scopeXYZ scopeXYZ~ separator shearXY shearXZ shearYX shearYZ shearZX shearZY shininess slideSquares specular specularRGB sphere sphere3d spline_path spot_light square teapot text2d text3d textextruded textoutline torus translate translateXYZ triangle tube vertex_add vertex_combine vertex_draw vertex_grid vertex_info vertex_model vertex_mul vertex_offset vertex_program vertex_quad vertex_scale vertex_set vertex_tabread world_light
Gem scaling problem
Hello there,
As you might have guessed... I have a problem. I'm trying to make a simple composite of two images in Gem, a still and a video stream. On the I use pix alpha to make part of the image transparant, on the second I do nothing. Then I composite them together using pix_composite.
The problem is that I want to make the first image smaller or bigger. If I just resize it using pix_resize, the two don't match in size anymore and Pix composite wants them to be the same size. The only solution I've found so far is to first first use pix_crop to isolate the part of the image I want and then use resize to scale it back up to the size it needs to be for the composite. This works, but slows everything down beyond usability.
I tried to put a scale object after the first image, but this scales up both images and I only want to scale that first layer.
Any ideas?
much thanks