chops to cotume attribute

   4312   12   1
User Avatar
Member
143 posts
Joined: July 2015
Offline
hello

I have a very simple question about chops.

- a single sphere, with a costume vector attribute called “foo”.
- created a chop network and a simple wave in it.
export chop to send out the 3 channels to the attribute “foo” ( like path foo).

this method works with common parameters like t,P…etc., but doesn't update the values of the costume attribute like “foo”.

is this normal or I'm doing something wrong?
thank you very much.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
I am not sure I understand you correctly, because I don't understand what you mean with “export”.
But I think you are going about this the wrong way round.
Check out chop related expression functions.
http://www.sidefx.com/docs/houdini15.0/expressions/ [sidefx.com]

In Houdini you usually look up the CHOPs (and ramps) from your geometry context.

I attached an example. It animates based on the timeline.

Attachments:
choptest.hiplc (49.4 KB)

User Avatar
Member
143 posts
Joined: July 2015
Offline
thank you.
here is the file to show the problem.

in fact I don't know this method works or not logically.
look at the attribute “foo”, It doesn't change while the radius changes.

Attachments:
sphere attribute.hiplc (69.9 KB)

User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Interesting setup. I have not seen the export node before and I tried looking into it.
It seems to me that you can export channels that have a name onto a paramater of the same name. Look at the foo parameter I created on the sphere and look at the channel names in the chop network.
Still, it seems much easier to put an expression into a parameter to reference a specific channel in the chop network. As far as I can tell, the outcome is the same.

Attachments:
sphere attribute test.hiplc (54.4 KB)

User Avatar
Member
143 posts
Joined: July 2015
Offline
you know, ultimately I need the wave output to go the Dop network ( sop solver, “force” attribute) and acts like force to move a wire object.

so I need it (chop net: export) to affect an attribute not a parameter.
maybe I can bond the parameter to attribute later but for now I want to know is this possible to directly connect the output of chop network to manipulate the magnitude of a vector like “foo”.

hope It makes scenes.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
I would use an attribute create SOP with a chop expression in the value field to generate the attribute with the relevant values. You could also use a ch() expression to take the value from a parameter. Note that this way you can turn any parameter value into an attribute value.
Once an attribute is created you can edit it with VOPs or VEX or something like that.
User Avatar
Member
143 posts
Joined: July 2015
Offline
yes .. this works.

and I couldn't find a way to directly export channels to an attribute.
so I did create a parameter in sop solver first then I used that to drive the amount of force with chops.
User Avatar
Member
143 posts
Joined: July 2015
Offline
I have a very strange problem that I don't understand.

in DOP network, wire object (geo), I've created 5 of them ( number of objects , 5).

in chope wave function I need to vary wave phase for each object separately.
so I use stamp(“……/geo”,“OBJID”,0)… but seems like stamp function doesn't read the OBJID and always return 0.

do you know what is wrong?
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Hard to tell without a file, but the path for the stamp seems wrong:
It should be something like: stamp(“../../../geo”,“OBJID”,0)
Note you should be able to see whether the path is right thanks to the autocomplete function.
User Avatar
Member
143 posts
Joined: July 2015
Offline
well, the path is fine. It was just example.
here is the simplified file.
please look at the grid row expression.

and It needs to be stamp, no other way. because I need it for dops as I said before.

Attachments:
stamp function.hipnc (58.8 KB)

User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Stamping with the copy node works on each copy of the first input. Look at copy stamping tutorials.

Attachments:
stamp_function_198 howto.hipnc.hiplc (60.3 KB)

User Avatar
Member
143 posts
Joined: July 2015
Offline
I know about copy stamping and have no problem.

the file I uploaded is exactly what i'm trying fetch an attribute value and use it in another sops, chops or whenever…

let me say this way. you want the attribute “foo” to drive some parameter outside the copy sop chain. in a chop net for instance….
whit exactly stamp expression , not point, primitive expression..or anything else.

I hope It makes scenes.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
The stamp only works where it works. That is above the relevant copy node in the node chain leading to the first input.
You can also stamp inside a (for each) loop.
If you cannot setup things so that the node chain is maintained, you cannot solve your issue in the way you want.
Attributes are essentially variables. You can manipulate them with VOPs and other SOPs, but at the end you just have some additional information on your geometry. You than use that information to affect something. It is not a dynamic process. It is a linear process. If you animate or simulate, you can change your attribute on each frame, but it is still a linear process of taking the attribute, changing it for the frame, applying the change for the frame and then going to the next frame.
  • Quick Links