Problem with expression input on Fuse Node

   3184   8   0
User Avatar
Member
32 posts
Joined: Nov. 2012
Offline
Hello
I was trying to implement a system to have a fuse node acting dynamically based on the distance from the camera, to compute it I am using this expression

distance(ch(“../cam1/tx”), ch(“../cam1/ty”), ch(“../cam1/tz”), $TX, $TY, $TZ)

in the distance parameter input on the fuse node it doesn't accept it and is unable to evaluate it. The expression does work though according to the textview and trying it on other nodes (such as transform or polyextrude). I tried using another expression using originoffset, or creating a custom attribute, but still no luck (the fuse node doesn't recognize the custom variable I created). I can't seem to plug anything in the distance parameter which isn;t hard-coded numbers.

Anyone can enlight me?
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
Most likely the distance parameter does not support being set per point. You can use an expression but it can't contain any geometry component specific variables like TX, TY, etc… It's a global setting for all points.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
32 posts
Joined: Nov. 2012
Offline
I see, but shouldn't it work then if I just set it as an attribute before and use that float variable as a distance paramater?
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
yeah, or you could use point(opinputpath(“.”, 0), $PT, “P”). havent tried it but i think it should work
.
User Avatar
Member
32 posts
Joined: Nov. 2012
Offline
zdimaria
yeah, or you could use point(opinputpath(“.”, 0), $PT, “P”). havent tried it but i think it should work

That's the case, it doesn't seem to recognize the attribute I create anyway. Having no luck with opinputpath as well.
I attached the hip file with all the different methods I have tried if anyone feels kind enouth to have a look at it.

Attachments:
fuse_by_distance.hipnc (74.4 KB)

User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
As I said before, it's a geometry wide setting. It does not work by processing on a per point basis and therefore has no knowledge of what $PT is. If you look at the help card, it doesn't list any other supported local variables either.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
graham is right, you cant vary the fuse dist parm. i have set up the distance from cam to work, and fed it into color so you can see how to do it.. but fuse will not use it.

Attachments:
fuse_by_distance_108.hipnc (92.3 KB)

.
User Avatar
Member
32 posts
Joined: Nov. 2012
Offline
I see, many thanks for your patience guys. So I assume the dist paramer just doesn't accept variables related to geometry as input? It does work with $F…
Hm, still don't get it why it shouldn't work if I just tell it to use a specific float value.
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
because the frame is the same value for all the points. you cant vary the value across the points meaning every point has to have the exact same value for dist. if you really need this to work you can try using a point cloud in vops and just find the closest point to the current point (minus itself) and if its closer than your distance attribute, move it to the current position, if not, go to the next point. after this, use a fuse sop with dist set to a very small number(.00000001), so that it fuses all the ones that have been moved.
.
  • Quick Links