anicg Posted November 23, 2022 Share Posted November 23, 2022 I attach the hipfile. Here is what I've done: starting from an exact orientation for each shape (only 2), I turned each into a point and tried to render as instances instead of having the duplicate geometry, but I loose the orientation when I instance to the points. I do not want to have random orientation. It MUST be the exact same place, the exact same scape, the exact same orientation as the original. Is it possible? instance.hiplc Quote Link to comment Share on other sites More sharing options...
Yader Posted November 24, 2022 Share Posted November 24, 2022 Instancing looks for attributes on those points, otherwise it doesn't know how Pos Rot Scale should look like. You can go very different ways about this. The easiest is to probably save your transforms as a transform attribute and set all transforms on your points to zero. See attached scene. I marked the changed nodes yellow. instance_yader.hiplc Quote Link to comment Share on other sites More sharing options...
anicg Posted November 24, 2022 Author Share Posted November 24, 2022 (edited) 10 hours ago, Yader said: Instancing looks for attributes on those points, otherwise it doesn't know how Pos Rot Scale should look like. You can go very different ways about this. The easiest is to probably save your transforms as a transform attribute and set all transforms on your points to zero. See attached scene. I marked the changed nodes yellow Thank you. I've tried to use "Each Connected Piece" instead of chasing each piece separately with transform and attribute promote, but it doesn't seem to work. I get a file imported that has a lot more pieces as input, without their individual transform nodes, too many to work on each manually. Any advise? Edited November 24, 2022 by anicg Quote Link to comment Share on other sites More sharing options...
anicg Posted November 25, 2022 Author Share Posted November 25, 2022 (edited) I attach a new hip file to show the problem. [instance_v2.hiplc] is the original but with file nodes which matches the kind of imported input. [instance_v2 method not working.hiplc] is where I apply the method you've given with a for each connected piece, but but it doesn't work. There are usually a lot more individual pieces than 3 or 4. These are only for demonstration purposes, easily hundreds per combo in reality. instance_v2.hiplc combo1.bgeo.sc combo2.bgeo.sc shape2.bgeo.sc shape1.bgeo.sc instance_v2 method not working.hiplc Edited November 25, 2022 by anicg Quote Link to comment Share on other sites More sharing options...
Yader Posted November 25, 2022 Share Posted November 25, 2022 You can use the Extract Transform Sop for that. It just needs the objects once with transforms applied and once without any transforms and calculates a proper transform attribute for each of them useable while instancing. You can either use the foreach approach or copy your reference object as much as you have target geometry, both methods work. instance_v2_yader.hiplc 1 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.