texturing video onto rectangular area

Mark Danks mdanks at Stormfront.com
Mon Feb 21 17:30:24 CET 2000


  The comments that Hannes says here are correct.  Make certain that you do
not confuse image texels and screen pixels or world coordinates.  They do
not have anything in common really.

  The "best way", at least right now, is to use polygon with the
pix_coordinate object.  pix_coordinate lets you set the texture coordinates
explicitly for each vertex.  You will use (0,0), (1,0), (0,1), and (1,1)
(not sure about the order, depends on how you set up polygon).  There is a
help file for pix_coordinate.  The default texture behavior for polygon is a
little strange.  I had assumed that people would set their own texture
coordinates.

  Sounds like GEM needs a rectangle object...

  For the "case" issues, try route.

Later, Mark

============================
= mdanks at stormfront.com
= http://www.danks.org/mark
============================
 

> -----Original Message-----
> From: umläute [mailto:zmoelnig at iem.mhsg.ac.at]
> Sent: Monday, February 21, 2000 2:36 AM
> To: pd-list
> Subject: Re: texturing video onto rectangular area
> 
> 
> > James Rojsirivat wrote:
> > 
> > hello,
> > 
> > i'm working on a project and need some advice.  in the gem_movie.pd,
> > the example has the movie file textured onto the <cube> 
> object...in a
> > version of the same project i'm working on, i used the 
> <square> object
> > onto which my file is textured.  However, ideally, i'd like 
> the movie
> > to retain its shape.  in the current version i'm working on, i have
> > the <pix_movie> object connected to a <polygon> with an argument
> > of <4>.  the x y z coordinates are assigned so that z = 0.  the
> > problem is that when i render, i can't get anything to show 
> up on the
> > screen.  what am i doing wrong?  i'm including the video section of
> > the program.  any help is greatly appreciated.
> 
> i think the way you are treating coordinates is a little bit 
> confused...
> in your demo you create a window that is sized 600*400 PIXELS.
> then you are using these numbers (600, 400) as arguments for your
> polygon, which will definitely produce something you don't want (ever
> tried tor create a square with a dimension of 600 ? - a little bit
> huge...i will mostly use sizes of 1 to 4)
> when you change the points of your polygon to range below 10 (scale it
> by 1/200 that's 3 for 600, 2 for 400) you will (hopefully, though i am
> not very sure) get what you want
> 
> 
> > also, is there a way to create a CASE like statement in pd? 
>  i'm using
> > <moses> at the moment, and it seems awfully clunky.
> > 
> > 
> > james
> 
> that was bothering me too, but i do think there are elegant solutions
> using relational-operators (in the case of an exact "case" just use
> "==") and "select"
> 
> mfg.fd.ras
> hannes
> 



More information about the Pd-list mailing list