The quest for the perfect OTL continues…
I have an OTL I'm building now for weather effects. I'd like it to be able to support light rain, snow, hail, heavy rain, etc. I have all the controls in my OTL to make my setup achieve all these different effects. I want to be able to pass this along to a user who can select from a list of preset parameters and have all the parameters in my OTL update accordingly. I could setup a huge network under the hood and then “switch” between different effects, but I'd much rather be able to do it through preset parameters in my OTL controls to make things simpler. Any ideas?
Presets in OTLs
9866 9 3- the_squid
- Member
- 132 posts
- Joined: July 2005
- Offline
- edward
- Member
- 7868 posts
- Joined: July 2005
- Offline
- mtucker
- Staff
- 4517 posts
- Joined: July 2005
- Offline
Just to expand on the regular presets facility… If you create a bunch of presets for your digital asset, you'll end up with a file called $HH/presets/Object/myasset.idx, or something similar. This is the file that contains all the preset definitions you have saved. Find this file and remember where it is. Now open the Operator Type Manager and find the definition of your asset. Right-click on it and choose “Edit Contents…”. On the left is a list of “sections” that make up your digital asset definition. Below that list is a spot to enter the name of a file. Use the Plus button to open up a file browser and find the .idx file containing your presets. The “Section Name” will be set to the name of the .idx file. Change the Section Name to “Presets”. Hit the Add File button. Hit Accept. Now those presets are stored with the digital asset.
This ability to store presets directly in a digital asset definition isn't well advertised because it is far from being an automatic process. Updating that Presets section requires saving it out to the .idx file, adding or editing the presets in that external file, then re-adding the .idx file using the Edit Contents dialog. It's not pretty, but it can be a very useful feature.
Mark
This ability to store presets directly in a digital asset definition isn't well advertised because it is far from being an automatic process. Updating that Presets section requires saving it out to the .idx file, adding or editing the presets in that external file, then re-adding the .idx file using the Edit Contents dialog. It's not pretty, but it can be a very useful feature.
Mark
- Lyubomir Popov
- Member
- 29 posts
- Joined: Oct. 2015
- Offline
Apologies for digging out this really old thread, but I've been trying to do exactly this:
What is the best way to do that? I've only managed to do it with a hex editor, but that allows me to only swap bites - if I want to change a value that is one bite say 0 to something with more bites, for example 0.5, then it stops working.
Is there a more sane way to deal with presets?
mtucker
or editing the presets in that external file
What is the best way to do that? I've only managed to do it with a hex editor, but that allows me to only swap bites - if I want to change a value that is one bite say 0 to something with more bites, for example 0.5, then it stops working.
Is there a more sane way to deal with presets?
Edited by Lyubomir Popov - July 15, 2018 10:04:28
- animatrix_
- Member
- 4672 posts
- Joined: Feb. 2012
- Offline
If you wanna bundle your presets with your OTL, just rename the idx file to Presets and then add this file in the Extra Files tab of the Edit Type Properties dialog of the OTL. It should be called “Presets” without the extension.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Lyubomir Popov
- Member
- 29 posts
- Joined: Oct. 2015
- Offline
Thanks animatrix3d, embedding presets in an asset works fine, no issues there. But let's say I accidentally recorded a transform along the Z axis into a preset (Regardless of whether that preset is in the $HIP/presets folder, or added as an extra file to the hda).
What is the recommended way to edit individual values inside the Presets.idx file? In other words, If I want to change the translate vector in Presets.idx, which looks like so:
In simple .idx files, changing -0.07 to say -0.075 works fine. But in a larger preset file, changing the number of bytes per value corrupts the file and houdini doesn't recognise it. I'll try to narrow it down and upload an example that shows how an idx file that is failing as described.
Either way, I'm curious how do other people edit existing presets? Text editor / hex editor, or is there a better way to do it through the houdini interface.
What is the recommended way to edit individual values inside the Presets.idx file? In other words, If I want to change the translate vector in Presets.idx, which looks like so:
t [ 0 locks=0 ] ( 0 0 -0.07 )
In simple .idx files, changing -0.07 to say -0.075 works fine. But in a larger preset file, changing the number of bytes per value corrupts the file and houdini doesn't recognise it. I'll try to narrow it down and upload an example that shows how an idx file that is failing as described.
Either way, I'm curious how do other people edit existing presets? Text editor / hex editor, or is there a better way to do it through the houdini interface.
Edited by Lyubomir Popov - July 15, 2018 14:36:44
- luijee
- Member
- 16 posts
- Joined: April 2015
- Offline
Lyubomir Popov
In simple .idx files, changing -0.07 to say -0.075 works fine. But in a larger preset file, changing the number of bytes per value corrupts the file and houdini doesn't recognise it. I'll try to narrow it down and upload an example that shows how an idx file that is failing as described.
Did you ever find a solution? Run into this now while trying to batch change parameter expressions over multiple idx files, presets are proving to not be as manageable as they could be.
- jsmack
- Member
- 8026 posts
- Joined: Sept. 2011
- Offline
- pbowmar
- Member
- 7046 posts
- Joined: July 2005
- Offline
- pbowmar
- Member
- 7046 posts
- Joined: July 2005
- Offline
-
- Quick Links