kgmcnamara Posted December 10, 2014 Share Posted December 10, 2014 (edited) Hi, I am rotating a piece of geometry that has a point uv attribute. However, when I use the HDK's transform() function and feed it a matrix, I get pretty funky UVs coming out the other end. Is there a way to stop GEO_Detail::transform() from modifying my uv's? I have tried using some of the extra arguments, but there isn't much explanation in the docs around what they actually do. // up_vec is the up vector. y_rotate is a float rotation value UT_Matrix4 rot_mat = UT_Matrix4(1); rot_mat.rotate(up_vec, PI*y_rotate / 180); my_geo->transform(rot_mat); Edited December 10, 2014 by kgmcnamara Quote Link to comment Share on other sites More sharing options...
eetu Posted December 10, 2014 Share Posted December 10, 2014 This might be a long shot, but are you by any chance using a build earlier than 13.0.483? I don't know if this might apply to your case as well: https://www.sidefx.com/index.php?option=com_journal&Itemid=213&page=index&journal=default&view=FULL&logfile=ALL&icon=ALL&version=ALL&buildstart=483&buildend=483&perpage=20&search=transform&find=Find Houdini 13.0.483: Fixed a bug that caused non-transforming attributes (such as "rest") to be affected by the Transform SOP if the transform only contained a translation. Quote Link to comment Share on other sites More sharing options...
kgmcnamara Posted December 10, 2014 Author Share Posted December 10, 2014 Unfortunately no, I'm on a later version but maybe this is a bug? Nice catch though! Quote Link to comment Share on other sites More sharing options...
symek Posted December 10, 2014 Share Posted December 10, 2014 This behavior would be correct if uv were vector type, not float[3], H13 is very strict here. Are you sure isn't it a vector type? Judging from the docs, quickxform = true will disable attributes' transforms, but for all of them. Perhaps updateaffectednormals=true will force normals transform despite quickxform settings... Quote Link to comment Share on other sites More sharing options...
petz Posted December 10, 2014 Share Posted December 10, 2014 if the uvs are of type vector and you don´t want to change this for some reason, just set the attribute to nonTransfoming. for example: GA_RWAttributeRef uvAttrib = gdp->findFloatTuple(GA_ATTRIB_POINT, "uv", 3); uvAttrib.get()->setNonTransforming(1); Quote Link to comment Share on other sites More sharing options...
kgmcnamara Posted December 10, 2014 Author Share Posted December 10, 2014 (edited) EDIT: Didn't see Petz's post. That did it! Thanks! Original reply below ------------------------------------------------------------------- Thanks for the reply symek. I believe the attribute is indeed a float3, since it is displayed as [0][1][2] instead of [x][y][x] in the details pane? I have tried with quick transform = 1, as below, but with no luck. For more information, I have included the UVs before and after transform. Any ideas? UT_Matrix4 rot_mat = UT_Matrix4(1); rot_mat.rotate(up_vec, PI*y_rotate / 180); my_geo->transform(rot_mat, my_geo->getPrimitiveRange(), 1, 1, 1, 1, 0, NULL, 0); Edited December 10, 2014 by kgmcnamara Quote Link to comment Share on other sites More sharing options...
freaq Posted December 10, 2014 Share Posted December 10, 2014 (edited) hmm the float3 vs vector 3 would have had my guess as well...maybe try making a simple scene where you manually create a uv attribute as bothsee it it makes a difference, it should. (colours don't change upon rotation for example) if still having problems contact SideFX support? edit: NVM glad to see it resolved Edited December 10, 2014 by freaq 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.