I have been working on an OTL that is intended for company wide usage and requires multiple textures and geometry to function. Of course I would like to keep it tidy and hence my doubts on how to best approach it.
Should I install the content in the same folder than the OTL? and if so what would be the best way to refer to it from within the OTL? I am using an environment variable now but I reel getting the OTL location could be a better option…
Is this a matter of scripting it in the otl or there is a method associated?
thx
HDA content best practice
2434 4 2- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
- Infernalspawn
- Member
- 229 posts
- Joined: 5月 2006
- Offline
I'm not sure how its set up in your company, … i've seen the following.
if the otl & its neccesarry files get ‘installed’ an environment value gets set e.g.
$APP_MYOTL_ROOT
which you could use in your hda to reference to your texture, …e.g.
$APP_MYOTL_ROOT/tex/mytex_v01.rat
–> (+) easy to read
–> (+) easy to understand
–> (+) easy to debug
or
if you have some kind of database, you could live-query the file-location of the files and use the results in your hda.
–> (-) can be slow (db), depending on the amount of queries
–> (+) depending on your query, you could easily update files when you always query the ‘latest’/'published' texture/geometry
–> (-) the latest/published approach could lead to different results in production depending when your fx was made
or
put the geo/textures in the HDA
–> (+) all in one pack
–> (-) huge otl depending on the file-sizes of textures etc
–> (-) personally i think this is hard to maintain
I personally like the first approach.
Seb
if the otl & its neccesarry files get ‘installed’ an environment value gets set e.g.
$APP_MYOTL_ROOT
which you could use in your hda to reference to your texture, …e.g.
$APP_MYOTL_ROOT/tex/mytex_v01.rat
–> (+) easy to read
–> (+) easy to understand
–> (+) easy to debug
or
if you have some kind of database, you could live-query the file-location of the files and use the results in your hda.
–> (-) can be slow (db), depending on the amount of queries
–> (+) depending on your query, you could easily update files when you always query the ‘latest’/'published' texture/geometry
–> (-) the latest/published approach could lead to different results in production depending when your fx was made
or
put the geo/textures in the HDA
–> (+) all in one pack
–> (-) huge otl depending on the file-sizes of textures etc
–> (-) personally i think this is hard to maintain
I personally like the first approach.
Seb
- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
Thanks Seb, seems the first option (the one I am currently using) is the best of these but i was wondering if I could query the OTL (self) path so the content is found without anything extra.
Basically I would love to be able to refer to a texture like this
$THIS_OTL_PATH/mytexture.tex
rather than having to install a new variable… is this possible at all?
hope it makes sense
Basically I would love to be able to refer to a texture like this
$THIS_OTL_PATH/mytexture.tex
rather than having to install a new variable… is this possible at all?
hope it makes sense
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
A few different ways to do this.
One idea is to use the hscript command “otgetotl .” from within the otl to return the actual path on disk where the otl is saved. Then you could use this to reference the images. This will avoid using env vars which need to be maintained/updated. Or you could use this to set the env var if you wish.
One idea is to use the hscript command “otgetotl .” from within the otl to return the actual path on disk where the otl is saved. Then you could use this to reference the images. This will avoid using env vars which need to be maintained/updated. Or you could use this to set the env var if you wish.
There's at least one school like the old school!
- pbowmar
- Member
- 7046 posts
- Joined: 7月 2005
- Offline
If you don't mind you OTL files being ludicrously large, you can embed all your textures _in_ the OTL file. I'm moderately joking btw
While technically possible, I find this is only really useful/practical for something you are uploading for mass consumption. Updating textures is painful, for example.
Cheers,
Peter B
While technically possible, I find this is only really useful/practical for something you are uploading for mass consumption. Updating textures is painful, for example.
Cheers,
Peter B
Cheers,
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
-
- Quick Links