[Fluxus] video capture

evan.raskob [lists] lists at lowfrequency.org
Fri Nov 20 03:29:49 PST 2009


great, thanks gabor!

i haven't played much with the pixel primitive yet, although it's  
been very high up on my list of things to do (been sidetracked with  
extrusions, then voxels, now camera input...)

cheers
evan



On Nov 17, 2009, at 9:06 PM, gabor papp wrote:

>> but for the sake of completeness, how would I do that?
> ; create a pixel primitive with rendering enabled
> (define pp (build-pixels 512 512 #t))
> ; hide it
> (with-primitive pp
>     (scale 0))
>
> ; render the camera texture in pixel primitive
> (with-pixels-renderer pp
>     (scale #(20 16 1)) ; scale it up to fill the whole render buffer
>     (hint-unlit)
>     (with-primitive (build-plane)
>         (texture vt)
> 	; set texture coordinates for rectangular npot camera image
>         (let ([tcoords (camera-tcoords vt)])
>             (pdata-index-map!
>                 (lambda (i t)
>                     (list-ref tcoords (remainder i 4)))
>                 "t"))))
>
> then you can use the pixel primitive as texture like this:
> (texture (pixels->texture pp))
>
> the texture coordinates here will be from 0,0 to 1,1, so you don't  
> need the texture coordinate magic. this way they wrap around, which  
> eliminates the noise.
>
> best,
> gabor
>

Evan Raskob
ML Studio
4-8 Arcola Street
London E8 2DJ
United Kingdom

http://mlstudio.co.uk
http://pixelist.info




More information about the Fluxus mailing list