archz2 Posted October 10, 2022 Share Posted October 10, 2022 What is the difference between a vector and a 3 floats vector? Quote Link to comment Share on other sites More sharing options...
madebygeoff Posted October 10, 2022 Share Posted October 10, 2022 The short answer is that they are very similar, except that houdini interprets a "vector" as 3 float values describing a vector is space and "3 floats" as just that, an array of 3 float values, something other than a vector in space. So a vector can be transformed (by a transform SOP, say) and a 3 floats shouldn't. Color is a good example of a 3 floats attribute that you wouldn't want to respond to a transform. In practice that is the only difference I worry about: if it's a vector in space (P, N, etc.) use vector. If it's something not spatial like color, use 3 floats. The long answer, and someone's gonna have to check my work on this one since I'm probably going to get the details wrong is: 3 floats, vector, normal, point, and direction are ALL different types of 3 float arrays that respond to transforms differently. I think: 3 floats shouldn't respond to transforms (although in practice I think if you create a value P, N, or some other common attrib and set its type to 3 floats, Houdini will still interpret it as a vector and it will respond to transforms. Vector responds to rotations and scales, but not translation. Normal responds to rotations and non-uniform scales, but not uniform scales. Point responds to translation, rotations and scales. Direction I can never remember... If you want to experiment, create a sphere. Add normals. Then add an attribute create. Make a 3 float point attribute called "myattrib" and append a transform SOP. Next to type "float" use the second drop down to switch between "none", "position", "normal", and "color". For each one, check out the Attributes drop down in the transform SOP. You'll see that when it's set to "color" for instance, it doesn't show up in the Transform SOP since a color is a 3 float value and can't be transformed. If it's set to position or normal, you can set the transform SOP to transform it (or not by excluding it). 1 Quote Link to comment Share on other sites More sharing options...
Sepu Posted October 10, 2022 Share Posted October 10, 2022 https://www.sidefx.com/forum/topic/21036/ 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.