Offsetting $F per instance

   3015   2   2
User Avatar
Member
5 posts
Joined: July 2005
Offline
can it be done?

As far as I've been able to disern, there are primarily two ways to change Instances, shader strings and pscale, Is there anything else I can do? I'd love to know any other ways I can manipulate Instances… If you find that the above is true as far as you know, please reply so I know to move on…

Here's the sitch: One geo with animation cycle, Instanced N times. Can I offset its animation in such a way as to make each instance play at a different place in its cycle thus no two instances are in sink? I can offset animation cycles all day long without the geometry being Instanced but thats not what I'm trying to do here.

Thanks a bunch for any help
a
User Avatar
Member
109 posts
Joined: July 2005
Offline
I do this by adding a custom point attribute to the particle system called “offset” and then use the point SOP to add the instance attribute which takes into account this offset attribute.

Do the following:

Add attribcreate SOP
Set Group Type to Points, set Name to offset, set Class to Point, set Type to integer, set first fielnd Value to something like:

int(round(rand($PT*16.7)*7))

This will create a custom attribute and OFFSET variable with interger values ranging from 0 to 7 (the 16.7 value is arbitrary, I just found that feeding the rand function a float number is more random than giving it a int).


Now attach a point SOP and in the particles tab, Add Instance fill in something along the lines of:

/obj/Instance_animation1/instance_`(($F+$OFFSET)%8)+1`

(this is an object path, not a sop path) This will assign each particle an instance attribute with a string value that is offset by the $OFFSET variable (the one that got created automatically with attributecreate) and will range from 1 to 8.

Unfortunately, I believe you can't make the instance attribute point to a file on disk, meaning that you have to have an object node in houdini somewhere for every stage of your baked animation, unless I can be proven wrong. I think this is a standing rfe.

I've made a digital asset that generates copies of a base object automatically when you point it to a baked animation. It's clunked together for my own purposes, but if you want it, let me know and I'll update and post it.
User Avatar
Member
5 posts
Joined: July 2005
Offline
What you're suggesting is pretty much what I allready have, I'm using 3 sets of random lookups that point to a serries of offset /objs, (obj/name_offset1_offset2_offset3)
I put up that post yesterday in hopes of gleeming some knowledge that I hadn't run into in any of the formus… You hit the nail on the head saying that “you can't make the instance attribute point to a file on disk”, thats really what I was hoping to get around. As it stands the system I'm currently using is working pretty good.

I'm still going to put it out there: Does anyone know of any other ways to manipulate instances, other than shader strings and pscale?..

Thanks again DriesD

a
  • Quick Links