Point Alpha in VOP network

   4068   5   1
User Avatar
Member
156 posts
Joined: July 2005
Offline
Sorry… very little VOP editing experience… I'm looking for a pointer (help) on how to add point Alpha recognition to an existing VOP network. I don't see this functionality in any of the shipped VOP materials (9.1.124).

Additionally, is there a way to incorporate “exist” type functionality in a VOP shader without using texture maps? Perhaps using the Alpha value of a point?

Thanks
Floyd Gillis
User Avatar
Staff
2595 posts
Joined: July 2005
Offline
fgillis
Sorry… very little VOP editing experience… I'm looking for a pointer (help) on how to add point Alpha recognition to an existing VOP network. I don't see this functionality in any of the shipped VOP materials (9.1.124).

Additionally, is there a way to incorporate “exist” type functionality in a VOP shader without using texture maps? Perhaps using the Alpha value of a point?

Thanks

If you create a float parameter named “Alpha”, the value of the parameter should be picked up if geometry has an attribute named “Alpha” (of the same size). If the geometry doesn't have the attribute, then the default you specify will be used.

You can then take that parameter value and use it however you want (i.e. convert to a vector and send it to Of, don't forget to multiply Cf by the alpha).

As a note, if you make the Alpha parameter a “color”, then you can have an RGB per-point alpha if you choose.

Hope this helps.
User Avatar
Member
156 posts
Joined: July 2005
Offline
Damn, that was easy. (Well, with detailed instructions).

I've gotta jump into the deep end of VOPS.

Thank you Mark
Floyd Gillis
User Avatar
Member
156 posts
Joined: July 2005
Offline
Why do so many answers lead to new questions?

Here's a simplified example of my new problem…

A scene with dozens of spheres… many of them overlapping. I'm animating the Alpha of each sphere using a random function in a point SOP. Everything works fine and the spheres dissolve on at random times.

The problem is that foreground spheres that have not yet dissolved on are acting like matte objects, cutting away the spheres behind them.

I don't have this problem when using the supplied Super Material shader… only with one of the newer supplied VOP shaders that I modified to recognize point Alpha.

Any additional pointers?

It would be nice to have a VOP example of the Super Material shader.

Thank you.
Floyd Gillis
User Avatar
Staff
2595 posts
Joined: July 2005
Offline
fgillis
Why do so many answers lead to new questions?

Here's a simplified example of my new problem…

A scene with dozens of spheres… many of them overlapping. I'm animating the Alpha of each sphere using a random function in a point SOP. Everything works fine and the spheres dissolve on at random times.

The problem is that foreground spheres that have not yet dissolved on are acting like matte objects, cutting away the spheres behind them.

I don't have this problem when using the supplied Super Material shader… only with one of the newer supplied VOP shaders that I modified to recognize point Alpha.

Any additional pointers?

It would be nice to have a VOP example of the Super Material shader.

Thank you.

The Of variable will make the spheres opaque. So, you want to plug the Alpha into the Of (as well as scaling the color).

The VEX code should be something like:


surface foo(float Alpha=1)
{

Cf = Cf * Alpha;
Of = Alpha;
}
User Avatar
Member
156 posts
Joined: July 2005
Offline
Thanks Mark,

I just multiplied the Of by Alpha and it now works fine.

Strange though… I'm keeping Alpha as a float when multiplying with Cf and Opacity. When I converted Alpha to a vector before multiplying I got strange results.

Lot's to learn.
Floyd Gillis
  • Quick Links