H15 - Local Variables in PolyExtrude

   12684   13   1
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
first of all amazing release with houdini15. So far I really love what I have tested. I had one question so far after testing the new PolyExtrude.

I used to do something like rand($PR) in the Extrusion scale or inset etc. With the old PolyExtrude SOP this was possible. Now in H15 I cant get a random parameter per primitive for the inset value. What would be the new way of doing something like this? I tried with @attribute but it doesnt work.

I saw there is a z depth attribute which kind of works but for the inset there is no option.
User Avatar
Member
1703 posts
Joined: 3月 2009
Online
The locals are being phased out.
Creating an attribute and then working with that is the new workflow (more verbose, but apparently a lot easier to grasp for people coming from the “outside” world).

Maybe the inset got overlooked, perhaps file a bug/RFE for it?
Martin Winkler
money man at Alarmstart Germany
User Avatar
Member
99 posts
Joined: 7月 2007
Offline
rand($PR) is now rand(@primnum)

edit: nevermind its not working
User Avatar
スタッフ
107 posts
Joined: 2月 2009
Offline
local variables like $PR are being phased out in order to encourage working with attributes.

To achieve a random extrusion in the new polyextrude, you could do something like:

Create an “attribute randomize” node, set the attribute name to something like,“extrudeamount”. Make sure to se the Attribute Class to Primitive.

On the Polyextrude Node, set the “z-scale” parameter to the name of the attribute you just created.

This attribute becomes a scale for your distance parameter, so setting it to 1 will give you your standard random extrusion.

This may seems like a more complicated solution in comparison to rand($PR), however it offers you much more control and ensures that your scene will be evaluated as quickly as possible. Something quite important as your scenes grow in complexity.
—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
sakeating
local variables like $PR are being phased out in order to encourage working with attributes.

To achieve a random extrusion in the new polyextrude, you could do something like:

Create an “attribute randomize” node, set the attribute name to something like,“extrudeamount”. Make sure to se the Attribute Class to Primitive.

On the Polyextrude Node, set the “z-scale” parameter to the name of the attribute you just created.

This attribute becomes a scale for your distance parameter, so setting it to 1 will give you your standard random extrusion.

This may seems like a more complicated solution in comparison to rand($PR), however it offers you much more control and ensures that your scene will be evaluated as quickly as possible. Something quite important as your scenes grow in complexity.

that is great and i already know about this but tbh its not a solution in my case since i want to use it on inset too and not only the depth. So can i RFE a paramter like the zscale in the polyextrude to control inset?

i am a bit confused since i really liked using rand($PR) in the polyextrude. It seems like a step backwards now. ? like i have to loop thru the polygons and use prim(opinputpath(“.”, 0), 0, attribute, 0) to achieve the same result at a much much slower speed.

Also if you want people to use attribtues why i cant use @primNum in the polyextrude? there needs to be a way to access these type of variables on the fly without having some sops being able to use them and some not. And maybe document this better? as you can see other people are getting confused too.
User Avatar
スタッフ
107 posts
Joined: 2月 2009
Offline
The lack of an “inset” scale is an oversight, there is an RFE in place to add it to the new Polyextrude so that you can control it via an attribute.

We are currently in a transitional period where we are switching from the local variable approach ( $whatever ) and the new attribute driven approach ( @whatever ). This is bound to cause some confusion and we are working to alleviate that frustration on the user side, however this is not an overnight ( Or over…version? ) process.

Remember that this is for performance reasons in the long run, so at the moment there are some stumbling blocks, but as houdini evolves the benefits of this workflow will hopefully become clear.

I'm not sure why you need to loop through anything to use an attribute, unless you mean for the “inset”, in which case that is in the process of being fixed, as I mentioned above.

I hope this helps!

-scott
—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
Hi Scott,
thanks a lot for your reply and clarification. Sorry, I didnt know the inset was just an oversight. hope it will be added soon.

You are right, for the long run this will be much better to work with.

Houdini 15 is really Amazing. I expected much but I got more. ♥
User Avatar
スタッフ
107 posts
Joined: 2月 2009
Offline
No problem! I'm glad you're enjoying the new version, and happy to see the new modelling tools are being put through their paces!

-scott
—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
4686 posts
Joined: 2月 2012
Offline
@attribute is something I wanted for so long, glad SESI is taking that direction. IMO it's superior to local variables which are meaningless and clutter the whole workflow, and also inconsistent throughout Houdini.

So +1000 for SESI
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
btw:

It would also be cool to be able to use @attribute in the Divisions of the Polyextrude.

With the old Polyextrude I can use a local variable in Divisions. Therefor we can have the divisions based on the height Attribute -> @localzscale
User Avatar
Member
81 posts
Joined: 7月 2010
Offline
I really like the new @attribute system, makes it much easier to teach too.

I'm a little confused with using attributes in the polyextrude node. The intuition is to put @extrudeamount (a prim attribute on our geometry) into the Distance parameter. But that doesn't work.

If we go to the Local Control and put extrudeamount into the Distance Scale parameter, it works.

However, it seems like it would be more consistent if we could just put attributes straight into the Distance parameter, not have separate local control parameters. Should that be working?
User Avatar
Member
80 posts
Joined: 6月 2013
Offline
Unifying the expression language is great but where do you get information on what attributes are available? There is nothing in the docs now. Did all the local variables just disappear?

For example, doing a simple deform of a grid, can use $PT to identify the point ID and plug it into an expression. What is the new way of doing it and where do you find what attributes are available to work with?

edit: My bad. The locals are associated with the PointSOP and not the gridSOP.

edit2: and the PointSOP is depreciated anyway and I should be using VOPs or Wranglers.
Edited by Rebus B - 2016年7月1日 13:43:09
User Avatar
Member
7 posts
Joined: 4月 2015
Offline
seth_ro18
I really like the new @attribute system, makes it much easier to teach too.

I'm a little confused with using attributes in the polyextrude node. The intuition is to put @extrudeamount (a prim attribute on our geometry) into the Distance parameter. But that doesn't work.

If we go to the Local Control and put extrudeamount into the Distance Scale parameter, it works.

However, it seems like it would be more consistent if we could just put attributes straight into the Distance parameter, not have separate local control parameters. Should that be working?

I second this. I have just driven myself crazy trying to use attributes to change the standard parameters of both polyextrude and peak sop, until I found this post!
User Avatar
Member
732 posts
Joined: 12月 2006
Offline
I second this. I have just driven myself crazy trying to use attributes to change the standard parameters of both polyextrude and peak sop, until I found this post!
And I third this! I too drove myself crazy trying to figure it out, I thought it was just broken and worked around it.
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
  • Quick Links