Point SOP with fit()

   5105   3   1
User Avatar
Member
436 posts
Joined: July 2005
Offline
I admit that coding, whether it be MEL or Hscript has always been my weakest area. The problem is getting syntax right. I guess I am a justt a visual kind of guy.

Anyway, I thought I had done right on this yet I am getting the red arrow.

I appeand a PointSOP to a SOP net in order to randomize the postion of vertices.

In Piont tab I use following expression. I relace $TX or ($TY, or $TZ) with

fit(rand($P),0,1,-.1,.1) in order to add random value to a point position on a per point basis. I thought this is correct syntax, but I am getting a red arrow. So obvious the syntax is incorrext.

I also tried the ‘mel’ approach.

$TX = $TX + fit(rand($P),0,1,-.1,.1) $TY = $TY + fit(rand($P),0,1,-.1,.1)
$TZ = $TZ + fit(rand($P),0,1,-.1,.1)

So what is the correct syntax for randomising point position in pointSOP?

Thank you kindly

Dave Rindner
User Avatar
Member
141 posts
Joined: July 2005
Offline
replace $P with $PT in your expressions


fit(rand($PT), 0, 1, -.1, .1)
/Rick
User Avatar
Member
639 posts
Joined: July 2005
Offline
$PT is point number for every point. If you want position for every single points, you have to use $TX, $TY, $TZ instead.
User Avatar
Member
436 posts
Joined: July 2005
Offline
Thanks

I thought it might be my syntax. All I was missing is T after my $P

I deployed Houdini at work as geometry server for Maya and Cinema4D.
I export sngle frame geo as OBJ, and animated sequences as either OBJ seqs or RealFlow .bin meshes that are read into Maya or C4D using NextLimit's RF import.
I am looking for a freelance C++ programmer knowledgable with both Houdini and Maya SDK to write a bgeo FileIn node for Maya, that works same as FileSOP.

Dave Rindner
  • Quick Links