magneto Posted September 6, 2012 Share Posted September 6, 2012 Hi, Is it important to choose a type that feels more "correct" for the HDA level parameters? Basically does it matter if you choose Vector3 for your Size parameter or just Float3 (Float type where parameter size is set to 3)? To me size doesn't seem like a Vector3, but a Center parameter does since it's an actual point in space. I haven't noticed any difference when using either other than the reference difference (size1, size2, size3 vs sizex, sizey, sizez), but is it important to make this distinction for your asset parameters? Thanks Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted September 6, 2012 Share Posted September 6, 2012 I think it does matter. "sizex" implies an axis where as "size1" does not. Also, "sizex" is easier to work with numbered multiparameters. example; "sizex#" 1 Quote Link to comment Share on other sites More sharing options...
Macha Posted September 6, 2012 Share Posted September 6, 2012 (edited) Uhmm, I have a vague recollection that it can matter in a shading context... Vectors can behave differently from 3-floats when you do maths on them. They are members of a vector space but I'm not sure in how far that applies to what goes on in Houdini. Basically I'd say it does't matter but if you get weird and seemingly inexplicable behaviour then check your types and if/how they transform. It's one of those gotchas when you write shaders. Edited September 6, 2012 by Macha 1 Quote Link to comment Share on other sites More sharing options...
rdg Posted September 6, 2012 Share Posted September 6, 2012 Might be confusing to debut if a float3 sets a vector3 value, I'd think. 1 Quote Link to comment Share on other sites More sharing options...
eetu Posted September 6, 2012 Share Posted September 6, 2012 (edited) The different vector types do indeed behave differently, at least in transforms that have non-uniform scaling. I guess they might have some differences in UI behaviour/GUI widgets or something as well. Here's a small demonstration on how vectors behave when they are declared as different types. PS. Menoz should have an official word on this vector_types.hip Edited September 6, 2012 by eetu 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted September 6, 2012 Author Share Posted September 6, 2012 Thanks alot guys, very useful info. I assumed it's more for attributes but didn't realize about their importance in shading. I didn't think of axis relatedness because I feel pretty much all Vectors3 values seem axis related like Frequence, etc. Then I guess whether it's for shading or geometry, thinking about transformations is the way to go? For example you can't really transform Size or Frequence, but Center, Position could be. I also remember reading using "Float -> Vector" for attributes, and not "Vector". The latter seemed to be the old way of doing it? I assumed they still mean the same thing, but just "Float -> Vector" was recommended instead. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted November 24, 2012 Share Posted November 24, 2012 hello, sorry for the late reply. I asked to sesi the same question they answered me. It has to do with how the various vectors are transformed. Point vectors are transformed differently in VOPs/VEX than vectors and surface normal type vectors are transformed differently as well. When you define the vector, you should know if it is a point type (P, uv, rest), vector type (up, direction vector) or a surface normal type (N) then simply set the appropriate signature in the VOP. The signature shows up in the vex code as a pragma statement that the compiler will pick up. You can read all about transforming various vector types in the Advanced RenderMan book on shader writing math. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 25, 2012 Author Share Posted November 25, 2012 I also thought it's modified differently based on its type. But I also heard vector type wasn't supposed to be in Houdini, only float3 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.