Jump to content

Chop data to instanced (copy) geometry


lavadht

Recommended Posts

Hi,

I've got a setup in which I want a value for an extrusion to be determined by a calculation done within a CHOP

The CHOP has

Input; a vertical line with N points, which bends on the Z axis, forwards or backwards.

Output; from a math node, somewhat like; TZ(n)-TZ(n-1) = deltaTZ. This calculates the deviation between one point on the line and the previous.

On the line's every point, geometry is copied, creating the stories for a building/skyscraper.

For every story, there's a staircase and a corresponding gap in the floor to accomodate it.

However, since the building is bend, the staircases are never precisely above eachother, and most of the time, they're quite far off.

This creates two problems, which promts me to post this question.

- the staircase and the gap above dont align

- the railing around the gaps, which extends from the railing of the actual staircase, don't fit around the gap

These problems an their solutions are the same, namely; using extrusions with a value from the CHOP's calculated deviation.

I tried to refer to the CHOP's calculation with a channel node, then storing this in an attribute node, and then refering to this attribute from the extrusion node; but I failed getting it to work. Is this a propper solution, and if so, how should this be done?

Another way I can imagine, is to perform the calculation on SOP level, but this would involve a way of using expressions I'm unfamiliar with.

Like, there is a $TZ attribute, but not a $TZ(for point -1) attribute. Or there is, but I dont know about it. If there is, I could use stamping through the copy node. Is this possible? and again, if so, how do I do it?

Thanks in advance!

Link to comment
Share on other sites

slightly embarassed, but not as much as I am happy to have found the solution :]

point("../point1",$PT,"P",2)-point("../point1",$PT-1,"P",2)

^ does the same as what I did in the CHOP, but can be used in stamps refering to copy nodes.

Edited by lavadht
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...