So I'm working on a tool to randomly generate and texture assets all within the same Houdini file. So far I've been using the frame number as a random seed, with rand($F), so I can quickly iterate through different seeds. This has been fine for mesh generation, and for generating flat colours for meshes, but I have a positional gradient created by feeding the Y position through a Ramp Parameter node, and when I try to use the same expression for the colours within the gradient, I get an "Cannot have channels which depend on time." error. Is there a good way to make the ramp colours randomise with the frame number, or do I need to switch to a different randomisation system?
This is my first project in Houdini, so apologies if I'm overlooking something obvious! Thanks!
How to randomise the colors on a Ramp node?
1162 10 1- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
- BabaJ
- Member
- 2115 posts
- Joined: Sept. 2015
- Offline
- jsmack
- Member
- 8021 posts
- Joined: Sept. 2011
- Offline
- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
jsmack
If you hit 'u' to go up a level, do you see your ramp again on the parent node's parameters? If so, this is where you want to animate.
BabaJFor context - this is taking place directly within the /mat network, so there isn't any level above it. hip file is a bit of a mess rn but hopefully the screenshot helps.
Generally you should be able to do what you want with a ramp parameter,
but since you haven't provided a hip file we can't see the context/setup you are applying the ramp parameter in.
- jsmack
- Member
- 8021 posts
- Joined: Sept. 2011
- Offline
WanderingOwl
For context - this is taking place directly within the /mat network, so there isn't any level above it. hip file is a bit of a mess rn but hopefully the screenshot helps.
There is a level above that is implied, but doesn't exist until render time. Unfortunately, that means you can't animate it. You can create that level above explicitly by creating a material builder node and creating the material inside. This will allow parameters to properly instantiate on a parent level for interaction and animation.
- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
jsmack
There is a level above that is implied, but doesn't exist until render time. Unfortunately, that means you can't animate it. You can create that level above explicitly by creating a material builder node and creating the material inside. This will allow parameters to properly instantiate on a parent level for interaction and animation.
That's great, thank you so much! Can I double check what kind of material builder you're referring to - I get options for Karma, VEX, USD and USD Preview when searching it up. Anything special I need to do to add this material to my model, also? I feel like I'm missing something since the click-and-drag and material node methods aren't working with the ones I've tried so far.
- jsmack
- Member
- 8021 posts
- Joined: Sept. 2011
- Offline
WanderingOwljsmack
There is a level above that is implied, but doesn't exist until render time. Unfortunately, that means you can't animate it. You can create that level above explicitly by creating a material builder node and creating the material inside. This will allow parameters to properly instantiate on a parent level for interaction and animation.
That's great, thank you so much! Can I double check what kind of material builder you're referring to - I get options for Karma, VEX, USD and USD Preview when searching it up. Anything special I need to do to add this material to my model, also? I feel like I'm missing something since the click-and-drag and material node methods aren't working with the ones I've tried so far.
oh I forgot the renamed it in Houdini 20. It used to be the only one. It's the VEX material builder. It should drag and drop the same as any other VOP in /mat, but the material sop or material parameter on the object are other ways to pick the material.
- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
jsmackAbsolutely brilliant, thank you so much!!!
oh I forgot the renamed it in Houdini 20. It used to be the only one. It's the VEX material builder. It should drag and drop the same as any other VOP in /mat, but the material sop or material parameter on the object are other ways to pick the material.
- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
- jsmack
- Member
- 8021 posts
- Joined: Sept. 2011
- Offline
- WanderingOwl
- Member
- 6 posts
- Joined: Sept. 2023
- Offline
-
- Quick Links