Reading image pixels to a grid with VOPSOP

   4136   2   0
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
Hi all, I'm currently learning Houdini and have been messing around in VOPS trying various things to get my head around it.

What I'm trying to do is get the rgb values of an image and transfer it to a grid of points, so essentially my points create the image. I can break down the logic but seem to be unable to get it wired up in VOPS.

I'm looping through all the points using a for loop node, and trying to extract the colour for each pixel to transfer to the point inside the for loop. Colormap only looks at a single pixel though and I'm having trouble getting this to loop through every pixel.

Any advice would be much appreciated!

Attachments:
loop_pixels.hipnc (75.7 KB)

www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
Member
1112 posts
Joined: Aug. 2008
Offline
You dont need to loop through the pixels, VOP's sorta does that for you.

Here is a example of how you can do it, you could also just uv map the geo and use the uv attribute instead of Y and Z as I am in this example.

Attachments:
loop_pixels_104.hipnc (63.5 KB)

/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
Thanks for the help Magnus and also explaining that I don't need the for loop node in VOPS, it makes more sense now. With your advice and example I got it working using a UV project node and import attribute in VOPS.

Attachments:
loop_pixels_working.hipnc (74.9 KB)

www.carlocarfora.co.uk [www.carlocarfora.co.uk]
  • Quick Links