tex function obsolete?

   3374   4   2
User Avatar
Member
85 posts
Joined: June 2015
Offline
I'm trying to use the tex function within a PointSop in order to use a luminance value from a Cop2Network to move my points up. But I get a message while typing that it has been replaced by PixelColorByFileinUV. In the documentation however I read that its not implemented yet. At the same time I am unable to make the tex function work for me (could well be a user error though).

So whats the deal here, does anyone know if tex is stil working or not?

Thanks a lot for helping.

Kind regards, Robert
Houdini, Cinema4D, 3Dcoat, Marvelous Designer
User Avatar
Staff
2687 posts
Joined: July 2005
Offline
Robert Glotzbach
I'm trying to use the tex function within a PointSop in order to use a luminance value from a Cop2Network to move my points up. But I get a message while typing that it has been replaced by PixelColorByFileinUV. In the documentation however I read that its not implemented yet. At the same time I am unable to make the tex function work for me (could well be a user error though).

So whats the deal here, does anyone know if tex is stil working or not?

Thanks a lot for helping.

Kind regards, Robert

You might consider using point wrangle – it's way more efficient than the tex() function in the point SOP
float ss = v@uv.x;
float tt = v@uv.y;
@Cd = texture(“opimg/comp1/file1”, ss, tt);

This assumes a point attribute named “uv” exists.
User Avatar
Member
5312 posts
Joined: Feb. 2012
Offline
mark
Robert Glotzbach
I'm trying to use the tex function within a PointSop in order to use a luminance value from a Cop2Network to move my points up. But I get a message while typing that it has been replaced by PixelColorByFileinUV. In the documentation however I read that its not implemented yet. At the same time I am unable to make the tex function work for me (could well be a user error though).

So whats the deal here, does anyone know if tex is stil working or not?

Thanks a lot for helping.

Kind regards, Robert

You might consider using point wrangle – it's way more efficient than the tex() function in the point SOP
float ss = v@uv.x;
float tt = v@uv.y;
@Cd = texture(“opimg/comp1/file1”, ss, tt);

This assumes a point attribute named “uv” exists.

Isn't uv one of the recognized attributes, which means you can get away not specifying the vector qualifier? I assume you just want to be explicit
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
hscript tex() function works fine in the point SOP but it doesn't update with animated COP inputs unless you force cook and update texcache. No such issue with the Attribute Wrangle SOP as it updates fine as the image changes.

Remember that Point SOP will only work with point type uv attributes, not vertex type uv attributes.

Hscript functions don't seem to recognize the @variable syntax inside the hscript expressions. You have to use $MAPU and $MAPV to fetch the incoming uv's.

The VEX Wrangle SOP is better as Mark said on so many levels.


Also gives me an excuse to touch the Point SOP. I don't use it any more.

Attachments:
tex_from_cop.hip (80.9 KB)

There's at least one school like the old school!
User Avatar
Member
85 posts
Joined: June 2015
Offline
Thanks a lot everyone for answering, very much appreciated.
I see now why I could not get it to work; I failed to add the original y-value to tex, great to have the example file Jeff :-)
I will stick indeed to the attibwrangle.

Kind regards, Robert
Houdini, Cinema4D, 3Dcoat, Marvelous Designer
  • Quick Links