Expression using variables

   1226   1   1
User Avatar
Member
3 posts
Joined: 4月 2018
Online
Hi guys !

I've begun to learn Houdini since a few days and I can't seem to find the way to use variables in expressions.
Basically, I want to build a tower like the Leeza Soho in Beijing.
I want to do the exterior part by creating a cylinder, duplicating & shifting it in the y-axis and I want to be able to scale those cylinders by using a math expression & their copy number.
I try inputting this expression in the scale attribute of the copy node :

“−0.0004*$CY^²+0.04*$CY+1”

I believe $CY is the variable which hold the number of copies, maybe I'm wrong.
I do think it's really basic & i'm probably just dumb.
I probably isn't plug in it in the right place or maybe there's a syntax error.

Thanks for your help
Lead Tech Anim @ Light VFX
User Avatar
Member
11 posts
Joined: 10月 2016
Offline
I haven't had much luck with the copy stamping, but I've tried using your math expression in a transform node in a for-each loop instead. I just iterated the cylinder over a circle, and used the iteration number I've attached a screen shot of the result and the hip file, just in-case this is something close to what you were looking for. Let me know if this helps, or if I totally misunderstood your math expression.

screengrab:
Edited by SirClarks - 2018年7月28日 18:42:16

Attachments:
screengrab_houdini_01.png (285.6 KB)
scale.cylinder.with.math.hipnc (71.3 KB)

Your friendly neighborhood FX student.
  • Quick Links