attribute create sop

I would like to add an attribute to a line SOP as I have done in the Houdini scene depicted below.

The AttibCreate node in Touch is vastly different though. Is there another node I can use to add a custom attribute to a SOP?

Currently the only node that can create custom attributes is the Limit SOP. We need extend the Attribute Create SOP to match what Houdini does.

Another way is to create a non-custom Attribute using the Point/Vertex/Primitive SOPs, and then use the Attribute SOP to rename them.

Thanks Malcom,

I think the point SOP workaround did the trick.

However, I’ve run into an error whilst trying to use the attribute I created.
Here’s a screenshot.

The error reads (roughly) ‘unable to evaluate expression in tube height attribute’. It could be down to my misuse of the stamp function but I couldn’t see an example of correct use in the Wiki.
For the tube height variable I entered ‘stamp(“stamp_height_copies”,“boxHeight”,1)’
Do I have the correct number of parameters? Is my syntax correct?
Could it be that I misused the point SOP when I tried to create a new attribute? I simply added the point SOP and then changed the vertex attribute name from ‘uv’ to boxHeight.
Did I rename the correct attribute?

Also I ran into an error on the Wiki site ([url]http://www.derivative.ca/wiki/index.php?title=Copy_SOP#Parameters_-_Stamp_Page[/url]) whilst trying to follow the links to the gif images, it sent me to the image upload page instead of to an image.

Thanks,
T

touch doesn’t have Houdini’s stamp expression, you have to use param() param("boxHeight",1)

Fixed. Thanks Achim.

I’ve attached the file I’ve been working on as I guess it’s easier to spot the mistake when you can navigate around the network…

I’m recieving a warning on a channel SOP saying it’s ignoring some attributes (the attributes I created in my previous posts) can anyone help me with this?

T
bars_01.8.toe (21.5 KB)

This .toe files crashes on startup for me, so I’m having the programmers look into that before I can take a look at your file.

ah, apologies, it could be because I have an audio stream node in there. I’ve switched it for and ‘audio in’ in this version:
bars_01.9.toe (16 KB)

Thanks, this one opened. It looks like there is a bug or issue with the Pitch CHOP, it is creating invalid floating point numbers. We’ll get back to you with any findings.

Woah, yea thats throwing out some crazy data!
Is there another way I can achieve the same result?

We’ve fixed the junk value being created in the Pitch CHOP, but this will not be released until our next build posting, date TBD.

The junk values were being created because the sample rate of the Pitch CHOP’s input is much too low. A larger set of samples is needed or the Pitch CHOP to give valid results.

If you do get valid info going through, there is a warning on the read_boxHeight SOP, but the values are being set properly for the first boxHeight attribute. The warning is telling you that the second and third boxHeight attributes are being skipped. You can inspect boxHeight’s value in the Geometry Spreadsheet pane. You’ll need more channels to fill in the rest of boxHeight.

Alternatively, you could change the read_boxHeight’s Method to Static, and then use just 3 channels to define the 3 boxHeight attributes, and the samples in each channel will will be mapped to the point’s attributes (ie 80 samples for 80 points). Either way, your setup will properly map the CHOP values to your custom attribute.

Another note, you probably don’t need Unload turned on for all these CHOPs. It is pretty untested at this stage, and for small channel lengths it may not be worth it. It is a left over from Houdini that has not been maintained in Touch.