magneto Posted August 3, 2012 Share Posted August 3, 2012 (edited) Hi, I have some vector parameters in my asset at the asset level. I don't think it's possible to normalize their values at the asset level, i.e. everything that uses these parameters get pre-normalized vector values. So my question is what's the best way to normalize these parameters so everything that uses these parameters inside the asset would get normalized vector values. I could limit the parameters to -1 to 1, but I still want to give the user the ability to specify any kind of vector values, otherwise the values would get clamped. But even then 1,1,1 isn't unit vector either. Right now what I am doing is using an Add SOP with 1 point and then have a vector parameter in a VOP where it references the vector parameter. Inside the VOP network, I normalize this value and set the point's position to this value. Then a null after this that reads this point's position and stores it as a parameter, which I reference anywhere I need the original parameter at the asset level. Is there a simpler, better way than this? Thanks Edited August 3, 2012 by magneto Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted August 4, 2012 Share Posted August 4, 2012 (edited) Create a hidden parameter that normalizes that parameter and then only reference the hidden. Edited August 4, 2012 by hopbin9 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 4, 2012 Author Share Posted August 4, 2012 Thanks hopbin, that's a good idea. I only found the normalize expression which takes a vector value. So you create a vector from all components of the parameter, normalize and get the appropriate component for each field? Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted August 4, 2012 Share Posted August 4, 2012 (edited) Thanks hopbin, that's a good idea. I only found the normalize expression which takes a vector value. So you create a vector from all components of the parameter, normalize and get the appropriate component for each field? Sadly yes. I wish would improve the UI to allow expressions to work on float3/vector values as a single expression, since those types are defined in both hscript and python. Edited August 4, 2012 by hopbin9 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 4, 2012 Author Share Posted August 4, 2012 Thanks hopbin, I agree. Just wanted to be sure Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.