point wrangle node problem(of procedural oil painting tut)

   773   4   2
User Avatar
Member
4 posts
Joined: April 2025
Offline
Hello everyone,
I'm new to Houdini world, I've been following a tutorial of "Junichiro Horikawa", the procedural oil painting .

first part of the project includes bringing an image into comp using a cop2net, then convert it to polygons, process it into points and primitives, then clusters, extracting the outline of clusters using attribWrangle. creating a bbox_size attribWrangle node as well.
while he used compositing node (cop2net) to import the image and scale it, then converted it to polygon, I used a different approach from other tutorial to create a grid then use (attribFromMap)to copy the image over the grid.

second he creates contour lines filling each outline edge, using point distance from outline edge inside each cluster to move the points up the y axis, creating gradual elevations according to distance value.


so he applies pointWrangle using "xyzdist" function with the script :
"float dist = xyzdist(1, @P);

@P.y = dist;"


Problem:
this last node doesn't work, no elevations are created.

any idea what could be the problem ?

tutorial link :
https://www.youtube.com/watch?v=SRHxqlAthi4 [www.youtube.com]

Attachments:
Screenshot 2025-06-05 044547.png (424.8 KB)

User Avatar
Member
9280 posts
Joined: July 2007
Offline
it's difficult to see from screenshot, but it's very likely that your outline curves are closed polygons
and therefore xyzdist() will return 0 everywhere as it will measure distance to that surface and not just to it's outline curve

try inserting Ends SOP before your outline1 node
- set Close U to Unroll With Shared Points
Edited by tamte - June 5, 2025 10:53:16
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
4 posts
Joined: April 2025
Offline
tamte
it's difficult to see from screenshot, but it's very likely that your outline curves are closed polygons
and therefore xyzdist() will return 0 everywhere as it will measure distance to that surface and not just to it's outline curve

try inserting Ends SOP before your outline1 node
- set Close U to Unroll With Shared Points

Thank you, sorry for the messy arrangement of the nodes in the screenshot. I inserted Ends SOP as you suggested, it didn't work as well.

It turned out the mistake was that a Convert SOP should have been added right after (AttribFromMap) node, converting to polygons, while I somehow added AttribBlur SOP between them.
User Avatar
Member
4 posts
Joined: April 2025
Offline
I went through the tutorial, used cop2net as well, there is different outcome between compositing node (with scale to friction) and attrib from map node over a grid(with rows and columns corresponding to image resolution, scaled by multiplying both with a float).
Edited by Ali_Azam - June 6, 2025 17:04:55

Attachments:
Grid-attribFromMap SOP2.PNG (1.1 MB)
Cop2net1.PNG (495.3 KB)
Cop2net2.PNG (1.0 MB)
Cop2net3.PNG (885.1 KB)
Grid-attribFromMap SOP1.PNG (495.1 KB)

User Avatar
Member
9280 posts
Joined: July 2007
Offline
the differences can be caused by many factors, filtering, color space, sampling positions etc

if you are looking for more specific answers post a hipfile instead of screenshots
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links