How to include wedge's parameter information in the output.

   375   2   1
User Avatar
Member
10 posts
Joined: Nov. 2016
Offline
Sorry, I am sure this came up many many times already, I just didn't know what to look for..

My goal is to create a large number of geos in a sim, and have a list of the corresponding parameters, to be able to see which values resulted in something I like.


Parameters:
Noise Type
Frequency
Roughness
etc.

Now I would like to output each wedge's parameters, either to a (separate) text file or a list, with the wedgeindex and all the changing parameters
$HIPNAME.$OS.`@wedgeindex`.bgeo

Noise type: Alligator
Frequency: 0.1
Roughness: 0.5
etc.

Or, I don't know if it is bad practice to have long names.. include the parameters in the file name?

Wedge0123.$F4.NA.F0.1.R0.5.bgeo

Not sure how to achieve this
Alternatively, how could do I make the Font SOP display a Parameter's name and the currently set value?

Thanks.
tpetrick
Staff
523 posts
Joined: May 2014
Offline
If you want to include the values in the file name, you can use the @attrib syntax to access the wedge values. For example, $HIPNAME.$OS.`@noise`.`@roughness`.$F4.bgeo.sc, assuming your wedge is creating "noise" and "roughness" attributes. If you want to pad the values, for example to 4 digits, you can use padzero(4, @roughess) or @roughness:4. Finally, if the values have multiple components they can be access with their component suffix: $HIPNAME.$OS.`@roughness.x:4`.`@roughness.y:4`.bgeo.sc.

TOPs also has a Text Output node which can be used to write the values to a text file. The text field on that node can contain expressions as well -- just like any other string parm, it needs backticks. You could for example wire it after the ROP Geometry that's writing out .bgeo files, and use it to write out a corresponding .txt file with the wedge variations. For example, assuming the attributes exist:

Wedge Parameters
Noise Type: `@noise`
Frequency: `@frequency`
Roughness: `@roughness`
Edited by tpetrick - April 22, 2022 13:11:25
User Avatar
Member
10 posts
Joined: Nov. 2016
Offline
Thank you very much for the detailed and understandable explanation.
  • Quick Links