anim Posted May 15, 2016 Share Posted May 15, 2016 well, you don't need Instance SOP or Copy SOP or For to do that, and just to state my previous statement about Instance SOP more clearly, Instance SOP is just an asset using Copy SOP inside, so if you want to see what is does, look inside and voila, copystamping and all that so obviously you can create an attribute containing per point path to the file (including time offsets) and in Instance SOP or Copy SOP to stamp the File SOP path and get the same result, same speed but if the speed is what you are after, then here are 3 ways you can use instead: - you can just store your path as instancefile attribute on points and render using fast point instancing to get the result without copying or anything else - or copy just any packed disk primitive on all the points without stamping and afterwards change unexpandedfilename intrinsics per prim to the exact path you want to read per file - or if you are using packed alembics, it is abcfilename and abcframe instrinsics I would go for packed alembics most of the times as they allow for interpolating geometry between frames, which is very handy for instances with constant topology 1 1 Quote Link to comment Share on other sites More sharing options...
hatrick Posted May 15, 2016 Share Posted May 15, 2016 again, thx a lot for your help! I just realised that i used a wrong term in my prevous post. i did not mean the instance SOP. I had the instance object in mind. and related to the three options you pointed out. would you mind setting up a little example showing one of the three methods. espacially the first one sounds interesting. many thanks in advance! cheers Quote Link to comment Share on other sites More sharing options...
Popular Post anim Posted May 15, 2016 Popular Post Share Posted May 15, 2016 (edited) ok, here is the example file with 4 ways (cache the instance geometry first, both blue nodes ) 1. (Purple) rendering points with instancefile attrib directly through fast instancing 2. (Green) overriding unexpandedfilename intrinsic for any packeddisk primitive copied onto points without stamping 3. (Red) just for comparison Instance SOP, which is using copy stamping inside, so it will be slower than previous methods 4. (Yellow) copying static alembic without stamping and overriding abcframe in this case to vary time for each instance independently (if you need various alembics you can vary abcfilename as well) ts_instance_and_packed_examples_without_stamping.hip Edited May 15, 2016 by anim 23 Quote Link to comment Share on other sites More sharing options...
mestela Posted May 15, 2016 Share Posted May 15, 2016 Awesome post, thanks for making that Tomas! Quote Link to comment Share on other sites More sharing options...
hatrick Posted May 16, 2016 Share Posted May 16, 2016 awesome anim! many thanks!! Quote Link to comment Share on other sites More sharing options...
deadalvs Posted May 29, 2016 Share Posted May 29, 2016 Hi Tomas, thanks for those interesting examples! a question regarding the purple option (1): is it possible to expand this example with rotation and scale attribution? I hope I am able to do the following (as efficient for large amounts of instances) take an attributed point cloud (geometry path in houdini scene, rx, ry, rz, sx, sy, sz) and instance the defined geometries accordingly. any input welcome. thanks in advance! m. Quote Link to comment Share on other sites More sharing options...
mestela Posted May 29, 2016 Share Posted May 29, 2016 The instance sop, instance obj node, copy sop, all support attributes to alter the instances/copies as you describe. For scale its simply a vector @scale. Rotation can be handled in several ways, the most reliable one being a quaternion @orient. Vex has an eulertoquaternion() function to help convert (it requires radians, I assume your values are in degrees). In Tomas's scene, insert a point wrangle before 'create_per_point_instancefile_attribute', and assuming your attributes are named as you describe, this should work: v@scale = set(@sx,@sx,@sz); vector rotations; rotations = set(@rx,@ry,@rz); rotations = radians(rotations); @orient = eulertoquaternion(rotations,0); 1 Quote Link to comment Share on other sites More sharing options...
deadalvs Posted May 29, 2016 Share Posted May 29, 2016 hi, very cool. thanks for this. it makes sense. though I have one other challenge on this. the purple example references an external file via the attribute 'instancefile', while I'm trying to combine this with some knowledge from an other place, where an attribute called 'instancepath' was used, with an example of e.g. 'op:/obj/geo1/box1'. I'm not sure what the difference is, especially the meaning of 'op:'. basically, in the workflow above, with the instance reference, scaling and rotating, I'd like to do this with nodes in the scene, not external files (for now). on an other note: how do you decide which expression or function you do in HScript, VEX or Pyhon? All examples I see everywhere are wildly mixing things, making it very confusing to understand the basic concepts (the @, the attr-->ATTR, and so on.). Is it possible to do everything consistently in Python (I'd prefer that), or would that be too slow / too much code / .. ? Quote Link to comment Share on other sites More sharing options...
mestela Posted May 29, 2016 Share Posted May 29, 2016 Funny you should ask: http://www.tokeru.com/cgwiki/?title=Houdini#Hscript.2C_Vops.2C_Vex_.28and_python.29.2C_which_to_use.3F Quote Link to comment Share on other sites More sharing options...
deadalvs Posted May 30, 2016 Share Posted May 30, 2016 Thanks for that link. very useful again! I've seen there's a vex course on cgworkshops. This may be something for me. Though I'm not really a programmer, just sporadically doing scripts. Hope getting an input to my other question in my last post. Thx! Quote Link to comment Share on other sites More sharing options...
mestela Posted May 30, 2016 Share Posted May 30, 2016 the instance obj node is hardcoded to look for the @instancefile attribute, documented in a semi-hidden place here: http://archive.sidefx.com/docs/houdini15.0/nodes/vop/ptinstance the instance sop can use whatever attribute you want, its default is @instancepath. They should probably be consolidated I guess. The op: syntax tells houdini that its not looking on disk for a file, but rather to browse the nodes of your scene. (op = operator, eg sop, dop, cop etc) Quote Link to comment Share on other sites More sharing options...
deadalvs Posted May 31, 2016 Share Posted May 31, 2016 hmm. I am using instancefile (also have tried instancepath) as the attr now, I can see it in the geo spreadsheet of the instance node. the attr is a prim attr, on 5 faces, with different values: op:/obj/geo1/a op:/obj/geo1/b op:/obj/geo1/c op:/obj/geo1/a op:/obj/geo1/a though the instances are not rendered .. does this only work if the 'instance base geo' is points? Quote Link to comment Share on other sites More sharing options...
mestela Posted May 31, 2016 Share Posted May 31, 2016 From my quick experiment last night, the instanc obj node doesn't support op: paths, so you'd have to write your stuff out to .bgeo files on disk. I might be wrong, but I believe Tomas's setup was the same. The instance sop lets you use op: syntax however. Quote Link to comment Share on other sites More sharing options...
deadalvs Posted June 2, 2016 Share Posted June 2, 2016 YESSSAA. now it works. on small scale for now. hope this will scale nicely. thanks so much for the inputs! MUCH appreciated! Quote Link to comment Share on other sites More sharing options...
Adriano Posted March 7, 2018 Share Posted March 7, 2018 Hey guys Jumping quickly into your thread as i'm bumping into trouble while trying to offset the animation of my instances (using Redshift point instancing here) and sync the start of each instance animation with the birth of the particles. Right now it's only looking at the absolute time and playing instance animation in sycn regardless to the moment the partiucle instancing them is being born. I'm very reluctant to use Copy SOP and stamping and i'm hoping to find a simple solution to do that with Instances. Would you please be so kind to show me how to? Cheers, A. Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 16, 2018 Share Posted April 16, 2018 I am trying to recreate alembic instancing and it does not work for me, I do not get animation from alembic file. sim_A_01.abc NIS_copyABC_001.hipnc Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 17, 2018 Share Posted April 17, 2018 (edited) Bump! There should be some easy fix for that... @anim ? Option with packed disk geometry working, but something wired going on with my mesh in random frames. Se example for frame 73: Anyway, the Alembic workflow is better, so I need to figure out what is wrong with it. NIS_copyStamping_001.hipnc Edited April 17, 2018 by kiryha Quote Link to comment Share on other sites More sharing options...
Adriano Posted April 17, 2018 Share Posted April 17, 2018 Sorry, Mate. Couldn't figure out what was wrong with your .abc file earlier. Hopefully someone better skilled will jump in. A. Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 17, 2018 Share Posted April 17, 2018 I don't think the issue is with alembic file, I just convert *.bgeo.sc sequence to *.abc with the default settings. The result would be the same with any other ABC, I tried another one from Maya, simple sphere deformation, no luck as well. Quote Link to comment Share on other sites More sharing options...
garf Posted April 17, 2018 Share Posted April 17, 2018 What version/build of houdini are you using? I found that the version I was using had a bug in it - the latest build / an older build sorted it for me 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.