protean Posted February 1, 2017 Share Posted February 1, 2017 (edited) Hi, I'm having a small problem getting transformations from OBJ into SOPs. The idea is to convert the layout at object level into a point cloud for copying. I'm clearly not handling the primitive intrinsic data correctly so any pointers would be helpful. I'm using an object merge to pack the primitives and hopefully use the the primitive intrinsic attribs to orient the copies. Cheers J OBJ_to_points.hip Edited February 1, 2017 by protean Quote Link to comment Share on other sites More sharing options...
davpe Posted February 1, 2017 Share Posted February 1, 2017 well if you have identical objects and you just need to match obj transform to the SOP level, then this wrangle would work: @P = point(1, "P", @ptnum); first input is the original object without transform, second input is the one transformed and object merged (see the pic) Quote Link to comment Share on other sites More sharing options...
protean Posted February 1, 2017 Author Share Posted February 1, 2017 Thanks. I'm not sure that helps though. I don't want to deform the objects in SOPs, I need to generate a point for each object transform at object level so I can recreate the distribution via a copy sop. Not only that but understanding why the transform matrix is not working as I assumed it should would be beneficial as a learning experience. Cheers J Quote Link to comment Share on other sites More sharing options...
davpe Posted February 1, 2017 Share Posted February 1, 2017 like this? check the file... reconstructTransforms_example.hip Quote Link to comment Share on other sites More sharing options...
protean Posted February 1, 2017 Author Share Posted February 1, 2017 Thanks! I would say the file isn't quite working for me as pscale is 0 but I get the idea anyway. Perhaps I was overcomplicating it by using primitive intrinsics but OK. Cheers J Quote Link to comment Share on other sites More sharing options...
protean Posted February 1, 2017 Author Share Posted February 1, 2017 Well I finally managed to sort out using the primitive intrinsic. This means I don't need to add any attribs to the objects and all it needs is for the object merge to pack the objects. J 2 Quote Link to comment Share on other sites More sharing options...
davpe Posted February 1, 2017 Share Posted February 1, 2017 could you post a hip file pls? I couldn't make it work like this... Quote Link to comment Share on other sites More sharing options...
dchow1992 Posted February 2, 2017 Share Posted February 2, 2017 you can also apply the transformation after the copy sop which might give you a little more control matrix3 x = primintrinsic(1, "transform", @ptnum); setprimintrinsic(0, "transform", @ptnum, x); @P = point(1, "P", @ptnum); where input 1 is your object merge 2 Quote Link to comment Share on other sites More sharing options...
protean Posted February 2, 2017 Author Share Posted February 2, 2017 (edited) Here it is. To be properly integrated with the packed disk primitive setup I assume 'scale' would need to be 'pscale' but it's no problem. OBJ_to_copySop_002.hip I had a setup to do this after the copy as you suggest which was great but the setup/tools our environment artists are using don't really allow for that. Edited February 2, 2017 by protean 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.