Hidden gems (attributes..spritescale...)

   6799   12   2
User Avatar
Member
65 posts
Joined: July 2005
Offline
Hi..

Can anyone direct me to where I can find attributes such as spritescale, etc…
Hescape does not have POPs, so I must rely on such attributes and
finding them is appears to be impossible…

Regards
Tom
User Avatar
Member
412 posts
Joined: July 2005
Offline
they don't exist automatically.. you create the attributes with the attribute create sop.. there's a sprite tut here:

http://sidefx.vislab.usyd.edu.au/houdini_video/by_topic/effects/index.html [sidefx.vislab.usyd.edu.au]

i thought about creating a sprite sop a little while back to throw up on the exchange.. it would just be a real simple otl of attrib create sops nested in a subnet with a few controls.. maybe i'll actually get around to doing that..
Dave Quirus
User Avatar
Member
412 posts
Joined: July 2005
Offline
hey tom.. i went ahead and made that otl real quick.. you can find it here:

http://www.sidefx.com/exchange/info.php?fileid=218&versionid=218 [sidefx.com]

The only drawback as of now is that certain expressions can't be used inside the scale and rotation parameters. For example, rand($PT) can't be used, but $F can. I have a feeling this has to do with the expressions i'm using to reference the control channels but i didn't have time to figure it out. I tried ch(),chs(),`chs()`, eval(), evals() but nothing was a go.. hopefully someone will come on here and inform me of what to use as i'm feeling kinda dumb right at this moment.. ops: once i know how to fix it, i'll upload another version to the exchange..

hope someone finds it useful..
Dave Quirus
User Avatar
Member
65 posts
Joined: July 2005
Offline
Hi.. deecue

Great and Thanks..

I'll grab it and play around with it…
Dumb you are not…

I think that word is reserved for me…

Regards
Tom
User Avatar
Member
65 posts
Joined: July 2005
Offline
Hi deecue..

What a great little tool..

I never really consider creating OTLs, I think I will have to start
creating OTLs more often. I have a habit of trying to remmember
everything so as not to forget…

A little daft I know, but it allows me to improve on any previous
networks I may have worked on.

Thanks again deecue

Tom
User Avatar
Member
412 posts
Joined: July 2005
Offline
no problem.. yea. otl's are great..they can just increase the workflow by a ton.. not to mention the ability to share it with others.. :wink:

anyways.. glad it worked out for you.. i would still go check out those sprite tut's anyways so you know what exactly is going on..

as far as that expression channel referencing issue i was having in the otl, anyone wanna give some pointers with that? basically i'm having control channels on the sop being referenced by the value parameter in each of the attrib create sops (that are located within the otl subnet).. only problem is that it's not recognizing variables like $PT..
Dave Quirus
User Avatar
Member
2199 posts
Joined: July 2005
Online
Actually I think you may have hit on an interesting bug/limitation there, I'm really surprised not to have hit this before, the problem is the control panel of the asset doesn't recognise any local variables, which is fair enough since it doesn't actually process any data itself, I surprised though that the chs function doesn't allow the expression to be transferred into the attribcreate sop before it trys to evaluate it. I can't find any way round this, definately worth bugging Sesi on this. The only way round it that I can find is a total hack and kinda makes the whole point of having as an asset a bit of a waste.
The trick is finding just the right hammer for every screw
User Avatar
Member
7726 posts
Joined: July 2005
Offline
Try using eval(chsraw(“../control_param”)) where control_param is your parameter at the top level.
User Avatar
Member
412 posts
Joined: July 2005
Offline
of course the only combination i didn't try.. :evil: i was all like chs() chsraw() eval(chs()) evals(chs()) eval(ch()) `chs()` and nothin'…

i uploaded another version with the fix.. this should work just fine..

thanks for help on that one edward.. i was pulling my hair out on it..
Dave Quirus
User Avatar
Member
7726 posts
Joined: July 2005
Offline
No prob. The reason why local variables don't work through regular ch() expressions (as Simon noted) is because they're evaluated at the top level for which the local variables don't exist. So you need to take the raw expression via chsraw() and then evaluate it using eval() at the bottom level.

chs() won't work because that says to evaluate the given parameter as a string. What you want is to simply take the contents of the parameter to be used in the AttribCreate SOP itself.
User Avatar
Member
2199 posts
Joined: July 2005
Online
That might be a really handy thing to put in the exhelp stuff, you've got to admit it's a pretty obscure combination to do something that is default behaviour everywhere else. Perhaps a single expression that does both the eval and the chsraw together would be useful.

Better yet it should automatically get generated if you link to a channel with an expression in it.

Can I RFE that?
The trick is finding just the right hammer for every screw
User Avatar
Member
7726 posts
Joined: July 2005
Offline
Hi Simon,

All RFEs should go through support. I'm not sure if doing eval(chsraw()) will work for time dependent expressions though. It is also probably slower than just a regular ch().
User Avatar
Member
276 posts
Joined: July 2005
Offline
Another thing to note about this kind of expression is that it won't correctly resolve op paths. For example if you had an expression in the top-level parm that uses relative paths (e.g. point(“../xform1”, 0, “P”, 0)) by the time it is evaluated by the low-level op, the path won't resolve to the same operator. So that is something to watch out for.

George.
  • Quick Links