Repeating Animation

   4570   11   2
User Avatar
Member
365 posts
Joined: April 2008
Offline
Hi,
I have 24 frame animated obj saved in Bgeo.
How can i repeat it to longer frames ? in using chops or whatever method.
Can any one help me.

Steve
User Avatar
Member
94 posts
Joined: Dec. 2008
Offline
Hi aplink !

Assuming your Bgeo is stored with 3 numbers like GEO001.bgeo and is 24 frames long this would help.

In the file parameter of the file node write:


GEO`padzero( 3 ,($F % 24 ) + 1)`.bgeo


the “+1” at the end is only necessary, if your files go from 1 to 24. Because the “%” (modulo operator) returns values from 0 to (n-1), where n is its parameter. if your files go from 0 to 23, then you just omit the “+1” at the 2nd parameter of padzero.


HTH
If you can't script/program it, it's no good at all !
User Avatar
Member
365 posts
Joined: April 2008
Offline
I am not quite sure where i should put those in file parameter.
I have File Mode para as write file
and Geometry File para to save it to the directory i assigned.
My frame start 0 to 24 and geometry file stored ending as .$F4.bgeo
Can you further help me please.

Thank you.

Steve
User Avatar
Member
519 posts
Joined:
Offline
You can add another file node and set it to read, then read the files in back from disc. Use the expression as filename.
User Avatar
Member
365 posts
Joined: April 2008
Offline
What do you mean by “ Use the expression as file name”
I did put another file node and set the File Mode as Read File.
And I put the same directory name (.bgeo) as i saved it originally in the Geometry File Parameter.
Can you further help me ?
Thank you.

Steve
User Avatar
Member
94 posts
Joined: Dec. 2008
Offline
Here is an exapmle…

the WRITE_animation part writes out a bgeo for every frame, while the READ_animation_24frames_only reads in ONLY the first 24 frames of the animation.

have a look into the filename parameters of the “file” nodes

Attachments:
untitled.hipnc (54.8 KB)

If you can't script/program it, it's no good at all !
User Avatar
Member
365 posts
Joined: April 2008
Offline
Thanks .
By the way, my animation has 25 frames.
So, i guess i should put 25 instead of 24 in the given sample.

Steve
User Avatar
Member
365 posts
Joined: April 2008
Offline
I just checked your sample file attached.
Thank you so much for your kind & thoughtful effort in helping a beginner like myself.
One question, i noticed that in the READ FILE (file2 node) there is no “File Mode ” selected. Is that OK and why ?
Thank you very much again.

BY THE WAY, I LOVE YOUR NAME, Whodjini !!

Steve
User Avatar
Member
365 posts
Joined: April 2008
Offline
Hi,
I am back with more questions.
I've tried your instruction without success.
I believe i have to apply this in the houdini file that i want to write on the disk using bgeo format. And then after I save it i guess i have to read it back again using the expression ? Is that right ?
Can you help me further please.

I've tried the both expression. But , it seems not working.
Which one is first to do. – READING file or Writing File using the expression ?
I have animated obj and saved in bgeo for 25 frmes starting frme # 0.
Thank you very much again.
I set only 25 frames on the bottom of view port.
Should i change the frame number before i do this ?

Steve
User Avatar
Member
94 posts
Joined: Dec. 2008
Offline
aplink
One question, i noticed that in the READ FILE (file2 node) there is no “File Mode ” selected. Is that OK and why ?

That is ok this way, because the file node is the first in row, it would not make any sense to write out anything… You can only read a file if the file node starts a chain…

—-

aplink
I believe i have to apply this in the houdini file that i want to write on the disk using bgeo format. And then after I save it i guess i have to read it back again using the expression ?

Yes, usually you would have a separate file, where you write out your geometry. Imagine you have a simulation, that is really excessive on resources (Memory, time… you name it) then you would write that out, and use the file read to read in the geometry in your final scene…

you should bear n mind, that $HIP holds the directory where the current .hip(nc) has been saved. So you might need to adapt it.


Try this new example. The filewriter.hipnc writes out 240 frames of a rotating torus. The filereader.hipnc reads in the same “animation”, but at different offsets. Hope that helps…

You might have to ensure, that both files are in the same directory, and that the $HIP points to the samne directory, if anything goes wrong.

Workflow would be: Load filewriter.hipnc and play the animation once, so the geometry gets written. Then open filereader.hipnc and there you go.

Hope that helps clarifying…

Attachments:
aplink.zip (14.1 KB)

If you can't script/program it, it's no good at all !
User Avatar
Member
365 posts
Joined: April 2008
Offline
Thank you so much. This is tremendous !!
Appreciate your tremendous patience and kindness.
I'll try it again and let you know how it goes.
Thank you so much again.

Steve
User Avatar
Member
365 posts
Joined: April 2008
Offline
Bravo!! I got it.
Now, my 25 frm animated obj is repeating whatever frm # i set.
Thank you very much.
You are the true WHODJINI !!

Steve
  • Quick Links