Jump to content

Randomize time offset on alembic instanced objects/files


Recommended Posts

Is there a way to use instanced alembic cache and time offset them without create bgeo sequence files?

 

The way I am using instance alembics now is having multiple alembic nodes with different time offsets and instance them on points.

 

Is there a way to have only one alembic file loaded and randomize its time offset between the points?

 

Thanks.

  • Like 1
Link to comment
Share on other sites

I am trying "setprimintrinsic(geoself(),"abcframe",@primnum,"150", "set");" on a primitive wrangle inside my instance node, the alembic file is in a node outside and I am instancing it on my points using the "instance" attribute.

I am sure that I am doing something wrong, any tips?

Link to comment
Share on other sites

prim vs point seems to be an issue here.  you're instancing on points, but trying to adjust the frame with a prim intrinsic.  seems like it's doomed to failure.

 

how are you instancing?  i would suggest a copy sop with your alembic prims, then you could stamp with a time offset to pull the stamp value and calculate random offsets.  shouldn't be any heavier than using point instances....

Link to comment
Share on other sites

Can't do it with copy, to many geometries like thousands of high res trees with animation the only way I could make it possible is with instancing I am just trying to get a right workflow with instancing in a more procedural way possible.

I am trying now to use the "instancepoint()" expression but so far I am not sure that this can work with instanced alembics.

Link to comment
Share on other sites

If I have bgeos I can use the "instacefile" attribute to change the offset between the sequences in the instances because I can have access to the frames I can't do the same with alembic, if I could do the same with alembics it would spare me the labor to convert all the alembics in to bgeos just to do that.

 

Any tip will be welcome.

Link to comment
Share on other sites

Can't do it with copy, to many geometries like thousands of high res trees with animation the only way I could make it possible is with instancing I am just trying to get a right workflow with instancing in a more procedural way possible.

I am trying now to use the "instancepoint()" expression but so far I am not sure that this can work with instanced alembics.

 

if they're alembics, they should stay as instances.  when you read them in with an alembic sop, set display to bounding box.  the actual render geo will be a delayed load alembic prim.... it should be pretty light even with a copy stamp.

Edited by fathom
Link to comment
Share on other sites

30k polys in an animating alembic cache.  100k instances via copy stamp offset by anywhere between 1 and 100 frames:   5.02gb to render.

 

using point fast point instances (instance node).  same 100k points.   no offsets (cuz it's not possible this way):  5.61gb to render.

 

a copy sop with packed geo and caching will generate geometry with internal instancing that's pretty much equivalent to class instancing.

 

a stamp function in an alembic prim sop (timeshift probably would also work) can easily offset your geo.

Link to comment
Share on other sites

I'll try with copy sops just to be sure but my instances are much higher res, I have multiple tress between 800k to 1mil polys each and probably more than 100K instances counting with bushes and grass.

 

To give you an idea I have to accomplish something like this but with camera traveling a higher distance.

 

https://vimeo.com/147444340

 

Thanks for the tips, I'll let you know what I've got.

Link to comment
Share on other sites

polycount should not be the issue, that's why Houdini has packed alembics and packed disc primitives

so if you load your alembics as packed and display them just as bounding boxes or  as hidden

then you can copy them on your points and vary filename and frame instrinsics as suggested and you should be fine, better than instancing

 

if you want to push it further, you can create a library of leaves, branches etc, then assemble your trees just from those loaded as packed disc or packed alembics and then assemble your forest from such assembled trees

then all your forest will be using the same library which can be extremely lightweight on memory

Edited by anim
Link to comment
Share on other sites

- if you keep objects in alembics split per material, you will have them as different packed alembic primitives so you can easily assign materials to them

 

- if you however need to assign materials on polygonal subselections of packed primitives you may want to have a look at material stylesheets

https://www.sidefx.com/index.php?option=com_content&task=view&id=3186&Itemid=412

 

- or you can as well unpack, assign primitive level materials and save as bgeo's then load as packed disc primitives copy on your points (or you can as well instance files directly using instancefile attribute), randomize pahs and render. . 

You'll still need to have all shaders in your scene and set Mantra/Declare Materials to Save All SHOPS since bgeos will just contain paths to the shaders

Edited by anim
Link to comment
Share on other sites

I want to avoid to convert alembics as bgeos I want to use alembics directly because there are a lot of assets to be done and I want to spare the time, labor and disk space.

Wouldn't splinting be the same as use the alembic directly? Without having to load as packed?

As for stylesheets I can use them as long I have them separated right?

Link to comment
Share on other sites

- having alembics that contain separate objects per material will allow to load them as packed and still be able to assign materials to individual objects as they will be separate packed alembics, then you can copy them and enjoy the power of packed primitives

 

- not sure what you mean by separated, but you should be able to use stylesheets to set rules for material assignments within packed primitives without unpacking them, but I'm not sure if it will still be as efficient as having materials assigned before copying

Link to comment
Share on other sites

Cool! I'll try that, I really though so far that instancing was the best way to handle huge amount of geo.

 

I just don't how to set the the "intrinsic:abcframe" attribute I tried on a wrangle 'setprimintrinsic(geoself(),"abcframe",@primnum,@timeoffset,"set")' but it doesn't seem to be working.

 

Cheers!

Edited by Mzigaib
Link to comment
Share on other sites

copying packed primitives is a form of instancing

if they are packed alembics then you can use wrangle to set their intrinsic abcframe

 

but not if you are using point instancing, what advantage you have with traditional instancing you are not getting with packed?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...