Jump to content

Otl Reading A String Outside


Recommended Posts

I'm making a curve width visualize otl, it's easy and almost done, but there is one flaw I can't omit.

Instead of going into the otl and typing an expression into attribute value of attribcreate sop I'd like to write it into my otl parameter window.

I created a string parameter in my otl and connected attrib create from inside this otl via ch("../../blah/my_string_parameter") or chs.

It works with numbers and expressions (in backticks) as long as the expression doesn't make use of local variables like $PT.

I'd like to create a link which would not read this expression in otl level but inside it. To put the same expression as is into inside attribcreate and evaluate it there.

Hope I made myself clear, are there any clues?

Link to comment
Share on other sites

Sorry, try this

evals(chsraw("../width_value"))

28122[/snapback]

I'd never figure it out, thanks a lot it works great now!

I'll post my otl after finishing, now I'm working on getting width from custom channel, curve or just chops.

Link to comment
Share on other sites

I ended some phase and post a result, If anybody could tell me why $F expression doesn't work in the expression field I'd be grateful.

I thought of something like this from the beginning of my houdini experience, after using 3ds max loft with similiar functions.

I'm going to improve it to a series of tiny otls.

If you have any ideas for improvement or any critics please share. This is mostly for training.

Thanks

k_showidth_02.hipnc

Link to comment
Share on other sites

I ended some phase and post a result, If anybody could tell me why $F expression doesn't work in the expression field I'd be grateful.

I thought of something like this from the beginning of my houdini experience, after using 3ds max loft with similiar functions.

I'm going to improve it to a series of tiny otls.

If you have any ideas for improvement or any critics please share. This is mostly for training.

Thanks

28133[/snapback]

Hello,

in your fetch_widthcurve, change the Channel Range to "use Start/End", and then in your Start field, type $RFSTART and End field, type $RFEND.

Hope that's what you're looking for.

Take care,

Alex

Link to comment
Share on other sites

Thanks but no :( , it does constrain channel length to animation length but this is not the case.

If you try putting an expression using $F or $FF into "width_val" of the otl, you'll notice that it doesn't work, so it's impossible to make automatic animation of eg. sinus or anything using current frame.

I don't know why id doesn't work, Ithought $F is a global variable.

Link to comment
Share on other sites

I ended some phase and post a result, If anybody could tell me why $F expression doesn't work in the expression field I'd be grateful.

28133[/snapback]

Not sure I follow what you mean here, if I put $F in your expression field and press play the width changes for each frame as I'd expect. Could you post an example with it not working?

If you mean how to make it read an animation curve that has an expression in it based on $F take a look at the attached.

You need evals not just eval

k_showidth_si.hipnc

Link to comment
Share on other sites

Thanks for the example.

I meant that when I put "clamp(sin($PT*$F+8)*20,5,20)" (the same expression only $F instead of a number)

it doesn't work but gives blank viewport and red triangle.

When I put $F alone or sin($F)*100 it works ok.

When I combine $F with $PT there is a problem.

Link to comment
Share on other sites

Interesting, how come my example doesn't work if you eval but does if you use evals like I did?

I thought that by using evals it returns a string that is then parsed correctly by the parameter as a written expression, however if you use eval it fails because eval can't evaluate the $PT and $F parts correctly.

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.

Guest
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...