Jump to content

the 'AGE' or birthframe attempt ... ( Py )


zarti

Recommended Posts

hi ,

after reading few threads about storing the age of an 'event' over the geometry and getting no real solution ( esp for me , an Escapist , not a Master ); i decided to try with Python .

.. so in other words storing birth .. frames in an attribute called 'birthday' , is the main goal here .

my idea is this:

1. > to get and write out files for each frame pressing the Play button in timeline ( kind of 'simulation' ).

2. > to process the written files and generate a unique one which practically has the ID-s and the BirthFrames .

3. > create an attribute to the geometry with the recorded values ( for points not in Records assign a value of 0 , since Hou scenes start in frame 1 )

oc , in order to speed up things , during the first 2 procedure points :

1-only the points involved are written and 2-files with no data ( 0Kb in size ) are ignored .

on another note , my idea is to use folders of RadioButtons type as wizard-kind of setup . but , the main reason i chose those is that those act like separators for the whole process , and once the file which feeds the 'birthday' attrib column is build there is no more need to 'simulate' . the node is active , you can move the timeline while birthframes are stored =).

the 1st screen shows its parameter pane and the 2nd is a screenshot of a simple test : the Tube SOP is animated . the "catcher" group is used as a "bounding object" for the points of the Grid . the"group1" node now has all the 'records' and a new point-attrib is created storing their birth..frame ..

seems promising .

post-5487-130772536012_thumb.pngpost-5487-130772536793_thumb.png

i'll keep posting here its progress and usage examples ..

while critiques, suggestions from everyone are welcomed , as always .

.. esp from Python Gurus =)

.cheers

Link to comment
Share on other sites

Instead of saving out geometry files, you can probably use a Cache SOP to record cooked geometry. They can be retrieved in turn in your Python SOP by getting your input geometry at different times.

oops , my mistake .. i didn't described my self correctly .

i'm not writing all the geometry files . the otl creates ( if there is none ) a dedicated folder where it simply puts *.txt files with the data i'm interested . so, it writes empty files if no 'event' happens to any point or point IDs and frames if it happens. basically a sequence of *.txt files for every frame scrubbed while the "record" tab is active ( record mode ).

the "process" state ( section of the script ), deals only with the recorded txt files, not the scene. it creates another unique *.txt file for latter to be used by the "attri" tab . this ignores totally the timeline.

saving out geo could be an additional feature just to deal with different scenarios .. not thought about it yet .

.cheers

Link to comment
Share on other sites

two videos ; 1st - a pretty simple test / example . 2nd - node's usage in that example .

the mesh has almost 27,000 points and skipping the 'print option' should go faster theoretically ..

by the way , is there a option or 'a way' i can save data from a Print VOP node to a text file ??

.cheers

Link to comment
Share on other sites

You may also want to have a look at the feedback sop, which you have to install manually, search the forum for "proto install".

The feedback sop is basically a sop solver in sops (= iterative sops).

Hope that helps

Link to comment
Share on other sites

thanks Div for the suggestion ,

searched , found and installed the 'feedback' node . nothing more than that .

the 'feedback CHOP' portion in docs seem to be not enough for me without an example .

so , can anyone explain to me in few words how that node is supposed to be set up usually ?

a simple example wd be enough ..

!thanks

Link to comment
Share on other sites

thanks Div for the suggestion ,

searched , found and installed the 'feedback' node . nothing more than that .

the 'feedback CHOP' portion in docs seem to be not enough for me without an example .

so , can anyone explain to me in few words how that node is supposed to be set up usually ?

a simple example wd be enough ..

!thanks

at the very bottom of this post there is an example using the feedback-sop

petz

Link to comment
Share on other sites

thank you to both of you ; petz and Div ! i appreciate that ..

im going to do some tests in terms of performance and workflow ..

maybe i can cook something with both 'ways', but im not very optimistic since it is a hidden and unsupported feature .

.cheers

p.s.: a suggestion to Hou-Makers :

put the petz's example file inside the docs . it is really useful to users like me in the future ..

or , at least , something similar in CHOPs context ..

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...