Copying animated geometry to points.

   3918   4   2
User Avatar
Member
29 posts
Joined: Dec. 2016
Offline
Hi, everyone. My current challenge is to have some animated growth along an edge as it travels across the source geometry. The trouble I'm currently running into is to get the growth to look right. I'm trying to assign spheres to points, which works just fine. I want the spheres to simply scale from zero to a set value (preferably random to make it more interesting) then shrink back down again so it's a nice, smooth transition and nothing I've tried has worked as I hoped. Randomizing the scale through the Copy SOP just makes it look like jittery noise. I think at one point I managed to get it to scale from nothing, but the size just kept growing exponentially until it filled the entire viewport. I've tried animating the scale prior to being input into the Copy Sop, Time shifting, among others that I can't even recall. None of the tricks I've come across to scale the geometry based on point age/life seems to work in this application. I've only been using Houdini since the beginning of the year, so I'm sorry if this seems pretty clueless. I've included a file to show what I'm working with.

Any help would be much appreciated!
Edited by RandomGex - March 9, 2017 11:33:02

Attachments:
Pig_Edge.hiplc (315.0 KB)

User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi RandomGex!

Only had a chance to have a quick look, but it looks like you nearly got it. If you look in the point VOP where you set the pscale, you've used the ‘age’ and ‘life’ attributes as inputs. These attributes don't actually exist on your geometry, so the random VOP looks like it might be using 0 as a default seed. Anyway, the input value never changes so the (psuedo)random number never will either.

If you watch the red colour spreading, it seems to be doing for colour what you want it to do for scale. Try just plugging your Cd.r into pscale and see what you get. You've got some negative values coming out for Cd.r though, so you might want to do something like @pscale = max(0, Cd.r).

Sorry I couldn't be more helpful with a file at the moment, but I hope that's of some help
Henry Dean
User Avatar
Member
29 posts
Joined: Dec. 2016
Offline
Thanks for your input! You've at least help me to narrow down where the problem lies. Part of the problem that I've since rectified was the lack of static point ID's. An attribute create to create those ID's did the trick so, now I can have my spheres be random sizes and stick to their assigned points. I've thought about using the point color to animate the scale, but I'm not sure what I would plug that code into since what I've tried so far doesn't seem to work with that VEX.
User Avatar
Member
402 posts
Joined: June 2014
Offline
I may be way off the mark here. But I made a little experiment which I think may be be the effect you're after. Unless you're dealing with deleting points and keeping track of them over time, dealing with static point IDs and such may be overkill.

All you need to do is tell the Copy SOP which points you'd like to copy to, i.e. in the Template Group parm. You can always use an expression in here to whittle them down. I used @pscale>0.0 there, which just keeps things a bit tidier than having loads of copied primitives with zero scale.

Anyway, have a look and see what you think

Attachments:
animated_pscale.hip (76.5 KB)

Henry Dean
User Avatar
Member
29 posts
Joined: Dec. 2016
Offline
Ah, I see what you're going for there. It never occurred to me to animate a gradient like that and delete the points after the fact. Though, a few of the effects I'm working on are relying on keeping the point ID's frozen and keeping track of them over time before and after deleting. I'll keep your ideas in mind for the future, thanks!
  • Quick Links