Jump to content

Polyextrude - transform extruded front - by attribute


Recommended Posts


inside a polyextrude SOP node i have ticked the "transform extruded front" option and i want to scale depending on the @primnum, but the attribute is not recognized. i am using this expression

fit(rand(@primnum * 123), 0.0, 1.0, 0.2, 1.2)

there is no zscale attribute equivalent, how can i go about this without creating a foreach loop?

Link to comment
Share on other sites

C is here the Center point (prim center), substracting it will the prim center to zero.

M is an orientation matrix (rotation) constructed by the normal of the prim and the difference vector between the first and second point. It should represent the orientation of the primitive.

Applying transpose(M) is the inverse of M, which makes the prim X,Y,Z aligned.

Now we can perform our scale just on x and y.

After scale we apply M and add C to transform the prim back to original position.


P.S. M is not a rotation in this case (determinant(M) = -1 ~ reflection) but this does not matter.

Edited by Aizatulin
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.

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...