change point color with lookup SOP?

   4561   8   1
User Avatar
Member
36 posts
Joined: July 2005
Offline
Hi. I'm trying to change the colors of a grid of points (actually, circles) to correspond with the corresponding color on a bitmap. I'm pretty sure that I need to use the color/lookups COP's, but I'm stumped as to how to address the specific row/column coords from the point SOP.

Could anyone give me a kick?

User Avatar
Member
4256 posts
Joined: July 2005
Offline
You can use either the pic() expression if your image is a COP or tex() if its a image on disk.


“exhelp tex” in the textport.

Attachments:
pts.zip (7.0 KB)

if(coffees<2,round(float),float)
User Avatar
Member
36 posts
Joined: July 2005
Offline
Ahhh, thankyou! I knew it must be simpler.

Point-image trickery here I come!
User Avatar
Member
36 posts
Joined: July 2005
Offline
What would I have to do if I wanted to change the scale of each circle according to COP UV colors?
User Avatar
Member
4256 posts
Joined: July 2005
Offline
Couple of different ways.

You could use stamping with the copy sop. But since scaling is something that people need to do a lot you can just use the pscale point attribute.

On the Point SOP take a look at the second tab. (Each circle is scaled by the luminance.)

Attachments:
scale.zip (7.0 KB)

if(coffees<2,round(float),float)
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Ouch! I smell a flagrant abuse of Copy Stamping! :evil:

You DON'T need stamping to color the individual pieces. Just transfer over the color attribute and you're done. Either that or transfer any attribute to the copied geometry then use a subsequent Primitive or Point SOP to do the work.

Some of you out there know how I jump on improper use of Copy Stamping.

Just because it is convenient, doesn't make it right.
There's at least one school like the old school!
User Avatar
Member
4256 posts
Joined: July 2005
Offline
jeff
Ouch! I smell a flagrant abuse of Copy Stamping! :evil:

You DON'T need stamping to color the individual pieces. Just transfer over the color attribute and you're done.

That's exactly what I did in the second example…. :cry:
if(coffees<2,round(float),float)
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Yeah I know.

It's just that Copy-Stamp doesn't scale well when dealing with complicated datasets that grow larger and larger. It's difficult to do things piecewise with Stamping: It is difficult to cascade Copy-Stamp operations.
There's at least one school like the old school!
User Avatar
Member
4140 posts
Joined: July 2005
Offline
One of my new passions in life is stopping all stamping ops as much as possible. They're so powerful, and soooooo slow…

Cheers,

J.C.
John Coldrick
  • Quick Links