Question with writing the "moment" frame into attr

   7275   8   1
User Avatar
Member
20 posts
Joined: Sept. 2010
Offline
Hi guys,

The attached file is a simple setup where each point has a increasing $CR. I'd like to write a “moment” frame into point's attribute when the $CR is reaching to 1, like the hittime in Popnet. I tried couples of ways but I can't figure it out. Could you guys give me some hints or ways to deal with such the situation? Thanks in advance!

Attachments:
write_moment_frame.hip (57.7 KB)

User Avatar
Staff
3455 posts
Joined: July 2005
Offline
add an atribute_create
point
float
write value
value = if($CR >= 1, 1, 0)

note this will only be true while the $CR value is >= 1 if you animate the boxes away again this valur will go back to 0…


HTH
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
20 posts
Joined: Sept. 2010
Offline
Hi Arctor,

Thanks for your reply. But it's not what I want. Let me clarify my question in detail. For example, whenever any point's increasing $CR reaches to 1.0, and then a customized attribute will record the “moment frame” at the same time. If I wrote an expression like “if( $CR >= 1, $F, -1 ),” of course it wouldn't not record the moment frame. I tried to use Dop w/ Sop solver, but I failed. Hope my explanation could be clear!
User Avatar
Member
856 posts
Joined: Oct. 2008
Offline
Try chops.
--
Jobless
User Avatar
Member
75 posts
Joined:
Offline
I've been trying to do something like this as well, chops sort of worked for me using triggers and such, but I've found that the “animated” vs “static” mode in chops is still a bit nebulous for doing this sort of thing.
My main issue is that “animated” seems to be way too slow to be usefull for any sort of point based switching on geo that has even a reasonable number of points. Its trying to make a separate channel for each point and that is resulting in a huge amount of data obviously.

if anyone has any good examples of this method using the faster “Static” settings, that would be awesome


-johnc
User Avatar
Member
53 posts
Joined: May 2010
Offline
I think this is what you want

Attachments:
iter_over_frame.hipnc (78.6 KB)

User Avatar
Member
31 posts
Joined: Jan. 2007
Offline
File read/writes are a bit nasty, and I try to avoid CHOPs where I can (although you're arguably much better served there) - so here's my favourite implementation of this sort of data persistence, using POPs.

Incidentally this is one of my favourite POPs gimmicks, I use it a bunch.

Attachments:
activeframe.hip (65.3 KB)

Facebook [facebook.com] | Twitter [twitter.com] | Google+ [plus.google.com]
User Avatar
Member
53 posts
Joined: May 2010
Offline
haha
i mean based on some data-preserving structure we can use the vex in that file , like pop or dop(sop solver) if you have primitives.
use file read/write is because i'm a bit lazy
User Avatar
Member
20 posts
Joined: Sept. 2010
Offline
Hi guys,

Really thanks you for answering my question. That's awesome! It's a pity to miss your great discussion due to lie on a bed with a severe flu! I will digest your great files!
  • Quick Links