Skybar Posted March 23, 2014 Share Posted March 23, 2014 Say I have a simulation of some Packed RBDs. In the middle of those there is a point which has some attributes like Trans, Orient, Pivot etc. I then want to replace the simulated geometry with something else. If I use a Copy SOP it works fine, it copies my geo to the points and orients them properly. So right now I use a Foreach SOP to single out each point and each piece of my custom geo, and Copy SOP them. It works, sure. But it feels kinda "blackbox", I have no idea what is going on really. So I'm wondering how I could do this without the Copy SOP? What is it doing under the hood? I'm guessing it takes the Orient, Trans etc. attributes, but how could I do this manually in say a VOPSOP? If I only want the position it's kinda straightforward, but I want the rotation as well so that my custom geo matches the simulated ones exactly. I'm only guessing but I believe the Orient attribute has something to do with the orientation (naturally, hehe). But that is a 4 float and I have no idea what those represent, or how to use it? Cheers Quote Link to comment Share on other sites More sharing options...
magneto Posted March 23, 2014 Share Posted March 23, 2014 Have you tried using Make Instance Transform VOP? Quote Link to comment Share on other sites More sharing options...
johner Posted March 23, 2014 Share Posted March 23, 2014 Have a look at the Transform Pieces SOP, which is designed to transform geometry according to the standard instancing attributes without any copying. It's just an asset that uses the Make Instance Transform VOP internally. 1 Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 23, 2014 Author Share Posted March 23, 2014 I'll have a look at that! Cheers guys 1 Quote Link to comment Share on other sites More sharing options...
Netvudu Posted March 24, 2014 Share Posted March 24, 2014 Just to complement that info, the orient attribute is a quaternion or vector 4. When you work with quaternions in VOPs you usually multiply them with a Quaternion Multiply. There is a help card that shows when and why the Copy SOP and Instances use those attributes (Orient first, otherwise, N and up, otherwise v, then rot, etc...) Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 24, 2014 Author Share Posted March 24, 2014 Just to complement that info, the orient attribute is a quaternion or vector 4. When you work with quaternions in VOPs you usually multiply them with a Quaternion Multiply. There is a help card that shows when and why the Copy SOP and Instances use those attributes (Orient first, otherwise, N and up, otherwise v, then rot, etc...) Thanks Javier. Was this what you were referring to? http://www.sidefx.com/docs/houdini13.0/copy/instanceattrs Guess I need to delve deeper into the docs, lots of nice info like that I've probably missed. Quote Link to comment Share on other sites More sharing options...
Netvudu Posted March 24, 2014 Share Posted March 24, 2014 (edited) yup. That one. Have you seen Scott Keating´s Halloween tutorial at SESI´s site? If not you should. Wonderful info regarding the orient attribute and how to deal with it. Edited March 24, 2014 by Netvudu Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 25, 2014 Author Share Posted March 25, 2014 Ah no I haven't, I'll try to do that when I have the chance. Thanks again Quote Link to comment Share on other sites More sharing options...
csp Posted May 28, 2014 Share Posted May 28, 2014 (edited) How to convert the orient(4v) to rotation(3v) vector and get the same result? I tried using makeinstancexform and extractxform but something looks wrong, does not match with the result with when I copy the geometry on points using the orient. *for some reason I can't have an attached example file. Get it from this link Edited May 28, 2014 by cparliaros Quote Link to comment Share on other sites More sharing options...
dobin Posted May 28, 2014 Share Posted May 28, 2014 this thread is quite old but might help in this situation especially the file from Tomas: http://forums.odforce.net/topic/16834-pops-glass-shatter-effect/page-2#entry102788 Quote Link to comment Share on other sites More sharing options...
csp Posted May 29, 2014 Share Posted May 29, 2014 The file from Thomas is awesome but what I am looking is just to convert the orient in rotation vector. He is using rot which is a quaternion similar to orient to rotate geometry in vops but I want the actual vector with values in degrees to export it with point cloud for another software. Quote Link to comment Share on other sites More sharing options...
edward Posted May 31, 2014 Share Posted May 31, 2014 Quaternion to Matrix3 -> Extract Transform ... (might need a Matrix3 to Matrix4 in between) Quote Link to comment Share on other sites More sharing options...
august Posted August 11, 2015 Share Posted August 11, 2015 Quaternion to Matrix3 -> Extract Transform ... (might need a Matrix3 to Matrix4 in between) I did this trying to get some RBD bullet geo converted for an fbx export to unreal. It works, but there is horrible euler flipping going on. How do I fix that? My vop graph is simple. getAttr(orient) > quattomatx > extractxform > parm(rotation). The quaternion to extract transform has a dashed line, but adding a m3 to m4 conversion doesn't change anything. 1 Quote Link to comment Share on other sites More sharing options...
edward Posted August 12, 2015 Share Posted August 12, 2015 Are you getting non-identity values in the scale? You might also need those values as well. 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.