point color control scale

   7322   4   1
User Avatar
Member
5 posts
Joined: Nov. 2007
Offline
Hi! forgive my poor english

i use copy sop duplicate cube base on some points.

can i use point's color control cube size.

thx
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Yes.

Insert a Point SOP between your colored points and the right input to the Copy SOP. In the Scale field, replace the $PSCALE with what you want.

$CR for red
$CG for green
$CB for blue
length($CR, $CG, $CB) for the magnitude of the color

No expression function for luminance.
If you want luminance to drive the scale, then you need to use a VOP sop in place of the Point SOP. Dive in. Add a Global Variables VOP. Add a luminance VOP. Wire the Cd in to a Vector To Float VOP. Add a Add Attribute VOP. Name the attribute pscale. Feed the Vector To Float VOP in to the Add Attribute VOP. Done.


See the help for the Copy SOP as to what you can do to the right input points to affect the copies.
There is also the excellent post by wolfwood on the Copy SOP and all these Instancing Attributes:
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=6679&highlight=copy+sop [sidefx.com]
All of these attributes mimic exactly the result you will get if you were to use point instancing.
There's at least one school like the old school!
User Avatar
Member
5 posts
Joined: Nov. 2007
Offline
thx jeff

pscale is uniform scale?

if just scale one channel (x or others),need vop?
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Yes pscale is a single float that scales x y and z equally.

You can build your own attribute called scale and declare it as a float three (not a vector). You can do that with an Attribute Create SOP:

Name: scale
Type: Float
Size: 3
Value: $CR $CG $CB

The Copy SOP knows to use both the scale attribute and the pscale attribute if they are bound to the right input points.
There's at least one school like the old school!
User Avatar
Member
5 posts
Joined: Nov. 2007
Offline
thank you.
  • Quick Links