Jump to content

Randomize all digital asset parameters?

Recommended Posts


I have a digital asset, and I would like to use to copy node to make a bunch of them and somehow randomize all of its parameters so that each copy will be a bit different.

I have no idea how to go about this, though. I only made the interface of the asset. How do I link all the interface variables to one 'random seed variable' and then link that one with the copy stamp?

If anyone could shed some light on this, I'd appreciate it. Thanks!

Link to comment
Share on other sites

I don't know sure if relative references work with stamps, I know it should work if you stamp each and every parameter directly...

Alternatively, you could randomize it by $F and write a bunch of these models to disk using a file sop.

Then you can load the models back in using a single stamps (string stamp)

Link to comment
Share on other sites

I'm sorry, I don't really get it. My knowledge of Houdini is very basic. I understand what relative reference copying is, but how would I implement this?

Could you explain how to use the copy-SOP with the digital asset and randomize the parameter input of the asset in a fool proof way? Sorry.

Link to comment
Share on other sites

No problem at all ;),

It depends on how the digital asset works,

if the copy sop is Inside the digital asset, then my alternative method described in my previous post will not really work well.

Basically the copy node allows you to copy the left input on top of each point of the right input, which is my preferred way to use it.

It is also possible to copy things at 0,0,0 with an offset using the translation/rotation/scale parameters of the node itself.

To stamp properly, first make sure the stamping is enabled in the second tab of the copy node.

Then set a variable which can be anything, like "stamp", the value on the right depends on the method you are using:

if you are copying on points, you most likely want $PT, if you are copying using the copy's nodes parameters, you most likely want the value to be $CY

on the digital asset you can use an expression like rand(stamp("../copy1","stamp",0)+X) which will give you a number between 0 and 1 which you can use to create random settings.

the "X" must be different each time you want a different outcome for a separate parameter.

I've added a basic example



Stamping Example.hipnc

  • Like 1
Link to comment
Share on other sites

Thank, you for your efforts, that is definitely helpful. :)


By the way, not to be impolite, but maybe you could take a look on my other topic on this page.

For some reason my digital asset can't be selected from the TAB menu in the network editor, nothing happens. No error either.

Maybe you'd know something about it. :D

Edited by turbosheep
Link to comment
Share on other sites

That could because you are trying to use it in a context for which the asset was not designed, or it has not been correctly installed.

Contexts are the type of things you are trying to achieve, particles, dynamics, modeling, rendering and compositing all have different contexts and most digital assets only work inside one of them.

also note that there is a /obj context for storing complete objects and a /sop context for surface operations, which are inside an object of the /obj context.

So if your digital asset is designed for modeling, it may be designed for the use alongside other SOPS or in the /obj context above.

If the latter is the case, copying stamped results is going to be more difficult to do, unless you are allowed to edit the digital asset itself.

If you could link me to the page where you found the digital asset, or if it is freely available, link it in the topic I could help you better.

Link to comment
Share on other sites

  • 1 year later...

Just something like this will do, just add the same expression to all the parameters with a different number for "X" : rand(ch("sort1_pointseed")+X)


There are more elegant ways to do this of course, but this would be the most straight forward.

If you want to instance the boxes, you may have to pack this otl inside another one and promote the seed attribute to there, so the expressions are stored correctly,

or the values may revert to their defaults if you place a new node of your otl type.


Edited by acey195
  • Thanks 1
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...