Instance question

   11423   25   0
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
I have gone through many of the tutorials on instancing but have not found anything that talks about playing back a baked file on a per instance basis, and being able to control the speed/frame/offset of the file per instance.

This is something I currently use a lot in my current software, would really like to know how to do it in Houdini.

This is example of type of effect I am talking about.
It is frame of a baked file being controlled by animated paint stroke per instance.

http://www.youtube.com/watch?v=ehqD1QQZCWc [youtube.com]
User Avatar
Member
330 posts
Joined: July 2007
Offline
Bry Phi
I have gone through many of the tutorials on instancing but have not found anything that talks about playing back a baked file on a per instance basis, and being able to control the speed/frame/offset of the file per instance.

This is something I currently use a lot in my current software, would really like to know how to do it in Houdini.

This is example of type of effect I am talking about.
It is frame of a baked file being controlled by animated paint stroke per instance.

http://www.youtube.com/watch?v=ehqD1QQZCWc [youtube.com]

hi ,

maybe you should refer to the official docs some times ( esp when tutes fail ) ..

http://www.sidefx.com/docs/houdini11.1/nodes/sop/timewarp [sidefx.com]



.cheers
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Yeah, I have been reading the docs. They are better in some areas than others, and what you posted I already came across twice in my search. Is there any examples of this in the docs implemented on instances or copied geometry (I could not find any)? That would be very helpful. Or even a quick simple example would have been all the help I needed, but thanks for showing me something I already saw twice in my search.

I will keep searching though, I am sure I will work it out eventually.

Thanks,
User Avatar
Member
184 posts
Joined: June 2010
Offline
The docs are generally pretty good. The answers are there, but how you digest them is going to depend on how you connect all the dots.

In this case, Copy and Timewarp nodes with stamping are all you need (attached example). There's usually many ways to accomplish one thing in Houdini, so just see this as an easy sample rather than the only or even best way to achieve whatever effect you're after.

Attachments:
copyStampTimeWarp.hipnc (57.7 KB)

User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Thanks so much!!! I am usually pretty good at “digesting” info, and I am sure I would have figured this out in do time. I was on the right path, but was having trouble putting the last few pieces together.

I really am trying to learn this software in a quick manner. The easiest way for me to do that is to convert things I already know how to do over to Houdini.

Thanks again…
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
OK… I dont mean to sound ungrateful, but I already knew how to do that. What I am trying to do is pretty much save out an object sequence or cache file, and play that back per instance at different rates, or control the frame/speed/offset of the cache file with texture or random or whatever.

I could only find one example of this on the net in Houdini , and this is it…

http://www.youtube.com/watch?v=L1eDW2sINkw [youtube.com]
User Avatar
Member
184 posts
Joined: June 2010
Offline
Remember that in Houdini, everything is data, and you can often use the same tools and techniques to manipulate and process data coming from different sources.

In the example above, the geometry was being animated in the timeline. In the attached example, the animation is coming from a baked sequence of geometry files - the key thing here is, the TimeWarp recognises the geometry animation as such, so it's controls work the same way.

If you read the TimeWarp help card, you'll see that Output Range remaps the incoming framerange…which is how you'll control the playback speed (by scaling it to a new range). I've stamped a speed attribute back to the TimeWarp from the Copy SOP to vary each instance's playback speed.

The grid scatter points, I've fed into a particle network, and in turn wired than into the Copy SOP.

To get the kind of crowd movement (or any movement that's not simple linear), the areas you may want to look into are how to control particles and so forth. Dig around online for tutorials that go beyond simply contexts - I do remember seeing one somewhere that was about implementing working AI even.

Attachments:
CopyStampWithTimeWarp.zip (55.8 KB)

User Avatar
Member
330 posts
Joined: July 2007
Offline
hi again ,

i added few nodes in Adam ‘s first example

so , nodes in blue were added , node in yellow was modified ( expression ) .

basic logic ; whatever value ( as attribute , in my case named ’speed' ) you assign to each point , you feed that into the TimeWarp in / out parameters .

the complexity ( in expressions ) and easiness ( creating additional ui parameters to not mess often with expressions while you are animating ) is up to you .

possibilities and the level of control are amazing in Hou .



.cheers

Attachments:
copystamptimewarp_Adams_modified_by_z.hipnc (66.2 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Thanks to the both of you… I see now that the actual loading files will also respect the timewarp node. That is very nice to see. Now I get it!!! Is there any teething problems with converting to instances. Or is it exact same process. I assume I will need to use the instancepath attribute in a similar way as the file load (am I on the right track)??? I am fairly sure I can figure it out from here. If I cant I will be back

Thanks guys…
User Avatar
Member
330 posts
Joined: July 2007
Offline
glad i partially helped !



coincidentally 1 year + 11 days ago i was working with something similar and posted this on youtube :

http://www.youtube.com/watch?v=wBKoTsJ0iPM [youtube.com]

- im showing only viewport results there ‘walking through nodes’ , not the nodal setup .

- the second half might be boring since the whole procedural geometry was calculating ( and caching ) and i didnt prerendered out a seq of geometry on disk .



.cheers
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
zarti
glad i partially helped !



coincidentally 1 year + 11 days ago i was working with something similar and posted this on youtube :

http://www.youtube.com/watch?v=wBKoTsJ0iPM [youtube.com]

- im showing only viewport results there ‘walking through nodes’ , not the nodal setup .

- the second half might be boring since the whole procedural geometry was calculating ( and caching ) and i didnt prerendered out a seq of geometry on disk .



.cheers

Yeah, that is exactly the functionality I am looking for. That was cool animation.
Edited by - Aug. 29, 2013 13:25:55
User Avatar
Member
184 posts
Joined: June 2010
Offline
zarti
the second half might be boring since the whole procedural geometry was calculating ( and caching ) and i didnt prerendered out a seq of geometry on disk .

Actually I found it quite hypnotic

Really nice approach - I remember having to do this more than a few times for games in the past, in Max/Maya, and being stuck with clunky, difficult to re-purpose methods.

I've only had a month or so to get into Houdini properly (after many failed attempts…always too busy), and it already feels like I've travelled well beyond what I could do previously even with over a decade of 3D behind me. Houdini really is another world.
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
This is not related to earlier issue, but can one of you take a look at this file and see whats is going wrong? Its very simple file.

I am trying to use vop network to calculate the distance from its second input. I dont seem to get result I would expect.

I use import attribute set to 1, but distance does not seem to be calculated properly… or I am not understanding it properly.

Attachments:
vop_distance_issue.hipnc (66.4 KB)

User Avatar
Member
184 posts
Joined: June 2010
Offline
Hi Bry,

Try setting sphere1 to a Primitive Type other than Polygon… not sure why it doesn't work on Polygon, maybe someone can explain?
User Avatar
Member
330 posts
Joined: July 2007
Offline
thanks guys for liking my video !


AdamT
..

Actually I found it quite hypnotic

..
ha-haa !

so i wd define it " boring with hypnosis as a side-effect "

AdamT
.. (after many failed attempts…always too busy), and it already feels like I've travelled well beyond what I could do previously even with over a decade of 3D behind me. Houdini really is another world.
Words ! and exactly my own experience with Houdini .



Bry Phi
This is not related to earlier issue, but can one of you take a look at this file and see whats is going wrong? Its very simple file.

I am trying to use vop network to calculate the distance from its second input. I dont seem to get result I would expect.

I use import attribute set to 1, but distance does not seem to be calculated properly… or I am not understanding it properly.

you didnt gave any point index from second input to ‘import_P’ vopnode ..

here i modified your hip file ( added few option on VOP 's ui ; nodes in yellow inside VOP )

Attachments:
vop_distance_issue_106_Zmoded.hipnc (82.1 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
330 posts
Joined: July 2007
Offline
! oops !

i was fooled from sphere shapes but something is wrong ; it is taking only one point into account .

here is attached another way “ pointcloud method ” ..

Attachments:
vop_distance_issue_106_Zmoded_pcMethod.hipnc (84.0 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Thanks guys, I had already found the point cloud solution, but that is over complicating what I am trying to do. That set up is searching for distance of nearest point on other mesh. I just want distance from the object. This is something I use a lot for surfacing and displacements purposes. Is it a bug?
User Avatar
Member
184 posts
Joined: June 2010
Offline
The one I posted should have been doing that, no?

Personally, for something as simple as this I'd go with a wrangle sop with a VEX snippet, as attached.

(Distance value is in the Detail attributes)

Edit: To get rid of the spare P2 attributes, change the code to:

vector P2 = point(@OpInput2,“P”,0);
f@distance = distance(@P,P2);

Attachments:
VEX_WrangleDistance.hipnc (55.5 KB)

User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
That set up seems to be giving me only the distance between 2 objects, not the distance between one object, and the points on another. If each point on object 2 had a detail named “d” that would be what I was going for.

SO basically, if you were to turn one of those spheres to polys and get the distance of each point to the centroid of the other sphere primitive. I was hoping that something like this could be done purely nodaly. It is a fairly easy task. We have the point positions in vops, and we should be able to get another position to compare against…. no?

I do have to say one thing that I find a bit disappointing so far. I am a real big fan of nodal workflows because it allows the user to not have to worry about syntax, only the relationships between data. Its not that I have a huge problem with learning the syntax, but for simple relationships between vectors I would hope I could do it with pure nodal workflow.
User Avatar
Member
184 posts
Joined: June 2010
Offline
Unfortunately I've not delved into VOPnets yet (I prefer code, admittedly), so I can't help much further.

In VEX, as you've seen, you can pull in detail attributes - if you're able to do this in a VOP network then you just need to For Loop the distance between points of Input1 against the single point from Input2. Perhaps Bounding Box or Point In Bounding Box can return the central point?
  • Quick Links