|
Scripts obj for render tS7.6 cloth animation to files
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Scripts obj for render tS7.6 cloth animation to files // The Garage
Post by Johny // Jul 31, 2008, 7:43am
Johny
Total Posts: 672
|
Hello all, here I wrote script for render cloth animation to files (Realtime rendering and VRay rendering).
To use this script:
1. load it into your keyframe and cloth animation scene.
2. set your physEngine continue flag to Active.
3. set physEngine total time to 0.001
4. Select your render engine
5. Read more step info on "MUST READ" tab inside this scripts before click start rendering....
enjoy. :) |
Post by TomG // Jul 31, 2008, 8:12am
TomG
Total Posts: 3397
|
Now that's what I call community. Awesome to see extensions like this begin to show up already!
Tom |
Post by trueBlue // Jul 31, 2008, 8:38am
trueBlue
Total Posts: 1761
|
Wow! You are the Bomb! Thanks Johny!
FYI: I was able to render to my C:/ drive with no problems and it works great. Not saying anybody should try as I have Taken Ownership of my C:/ drive and all folders within.
tS7.6/Vista32
I tried to add to your Reputation again but it seems I have to spread the love around first. :) |
Post by frootee // Jul 31, 2008, 8:47am
frootee
Total Posts: 2667
|
yes, Very Nice Johny!
Froo |
Post by Steinie // Jul 31, 2008, 8:52am
Steinie
Total Posts: 3667
|
Johny gets the FIRST cookie!!! Great Job! |
Post by Ambrose // Jul 31, 2008, 9:23am
Ambrose
Total Posts: 261
|
This is what it's all about, even MS understood this.
Wonder how long for all the rest :D
good work Johny boy, keep it up :banana::banana::banana:
SeYa/Ambrose... |
Post by jhowell // Jul 31, 2008, 9:23am
jhowell
Total Posts: 400
|
So far its working great. I now get to include cloth in my large real time rendered scenes. Thanks again .. :jumpy: :jumpy: 2 jumpies!
.
.
http://4webs.biz/truespacestuff/july31tankgirlgettingshotandfire.gif |
Post by Délé // Jul 31, 2008, 9:34am
Délé
Total Posts: 1374
|
What can I say...You da man Johny! :D :banana: |
Post by ed_baker // Jul 31, 2008, 3:22pm
ed_baker
Total Posts: 355
|
I'm having trouble with this one.
I can get it to run, but then try to play back the keyframes and nothing happens, am I misunderstanding the instructions?
Ed |
Post by ed_baker // Jul 31, 2008, 3:28pm
ed_baker
Total Posts: 355
|
I'm having trouble with this one.
I can get it to run, but then try to play back the keyframes and nothing happens, am I misunderstanding the instructions?
Ed
Nevermind I figured it out. I didn't realize the images were being written to the C: drive.
Very cool. just need it to render to lightworks now :)
This |
Post by jhowell // Jul 31, 2008, 3:47pm
jhowell
Total Posts: 400
|
I got it working. Realtime rendering display to FILE. However, it takes forever. Each frame of rendering from this cloth script must scrub the rendering of all the frames of your animation before it writes the next cloth frame. Maybe Iam doing something wrong but if you have an animation over 100 frames it would take forever to render to file, even if the actual cloth keyframes is small it still needs to render threw the whole animation timeline before writing the next cloth frame. I will keep playing with it. Very cool though! |
Post by Johny // Aug 1, 2008, 3:45am
Johny
Total Posts: 672
|
Hi all, glad to know this works with your tS7.6 too. :)
Jhowell, if you have total 100 frames and cloth animation only on fram 30 until 50. You can render frame 1-39 and frame 51-100 with tS76's real time render tool. then use this script for render frame 30-50.
You also can play with change physEngine 'total time', 'time step',and 'frame rate' parameters values for test and find better result. (try to make keyframe frame rate equal with phys frame rate).
or insert below script beetwen 'FrameSteping' obj and 'RenderCommand' obj as shown on below image (go inside 'Render Cloth to File' obj)
try with change pause period value too for test if result will better with lower or higher value.
or maybe by change some code inside scripts.
HTH! ;) |
Post by jhowell // Aug 1, 2008, 10:33am
jhowell
Total Posts: 400
|
Hi Johny, Thanks so much for all your efferts. That helped alot. I am speeding all up!
[QUOTE=Johny;74270]Hi all, glad to know this works with your tS7.6 too. :)
.
.
...wait for gif video to load ...
CLICK HERE TO VIEW THIS ON BLIP.TV!! (http://www.blip.tv/file/1136849)
http://4webs.biz/truespacestuff/august1poserskeletonswinging.gif |
Post by kena // Aug 1, 2008, 8:43pm
kena
Total Posts: 2321
|
This will com in handy when I finally get around to trying out the cloth animation :D |
Post by Johny // Aug 2, 2008, 2:59am
Johny
Total Posts: 672
|
Hello Jhowell, thanks for gift video :) but its not possible for me to watch it with my slow dial-up connection. ;) |
Post by transient // Aug 3, 2008, 3:07am
transient
Total Posts: 977
|
Very nice.:) |
Post by frootee // Oct 7, 2008, 2:07pm
frootee
Total Posts: 2667
|
To speed things up,
in the truespace interface, click the Render To File button, and deselect 'Save animation from frame'.
That way, the entire timeline will not be looped through for each physics time increment.
BUT:
There should be a way for us to know when the real time renderer is finished rendering. Same for VRay.
(Anyone know what it is? Please post here! :D )
The Pause event does work, but if we have a render which takes a long time, it sounds like we'd have some
trial and error on setting that value.
If we could get a return value from the renderer which indicates the renderer has completed the render job,
we could eliminate the trial and error aspect.
But I gotta say, my hat's off to Johny for getting this to work. This can also work for rendering which does not involve physics. |
Post by Johny // Oct 8, 2008, 1:20am
Johny
Total Posts: 672
|
I used 'Pause Event' because I also dont know how to know when the render engine finished write to disk.:(
Maybe we must request for this new command. :) |
Post by frootee // Oct 8, 2008, 1:56am
frootee
Total Posts: 2667
|
yes; posted already in beta Johny.
Thank you for this script object. Very cool!
Now, the render plugin: tsnet knows when Lightworks engine completes a frame.
We ought to know the same for VRay and D3D renderer. Maybe just need to dig to find it. |
Post by clintonman // Oct 11, 2008, 5:45pm
clintonman
Total Posts: 304
|
Here is an updated and not thoroughly tested update for my D3D render script. I only tried it once but it worked. It reads the Rosetta.log file to determine when the D3D render is complete for each frame.
Clinton |
Post by Johny // Oct 12, 2008, 12:54am
Johny
Total Posts: 672
|
Thanks for great idea Clintonman! :)
Its work better now. :) |
Post by frootee // Oct 12, 2008, 5:30am
frootee
Total Posts: 2667
|
thanks clintonman. I take it, we can use the same approach for VRay?
Froo |
Post by clintonman // Oct 12, 2008, 7:33am
clintonman
Total Posts: 304
|
thanks clintonman. I take it, we can use the same approach for VRay?
Froo
I don't have VRay so don't know. If it writes to the log file then it should work. Open the Output Console, do a render and if it makes an entry for vray render then you're set.
One thing, I don't have a pause activity in there, so there may be excessive disk access while it checks the log file. I don't have a pause because it gets logged to the log file and I wanted a clean test. |
Post by frootee // Oct 12, 2008, 7:49am
frootee
Total Posts: 2667
|
Thanks clintonman.
There is one Pause Activity in there. It is connected to the setFrame node. I'm curious; why do we need a pause after that node?
That's a very cool idea; check the Rosetta log file for completion of the render. We can probably use the same approach for checking for completion of other events as well. Good work!
Froo |
Post by clintonman // Oct 12, 2008, 8:07am
clintonman
Total Posts: 304
|
I'm doing some more tests and it's not working as expected. The test for "D3DView.RenderToFile" is returning true every time so now it's just looking for any change in the log file. On top of that the "D3DView.RenderToFile" isn't showing up in the log file anymore just a "Save player screenshot". When I was testing earlier both messages showed in the log file.
to frootee: I put the pause there to make sure that model side frame has time to set. It may be delayed because of things like particle simulation. |
Post by frootee // Oct 12, 2008, 8:19am
frootee
Total Posts: 2667
|
I think you need to reset the frameDone to 0 once you get out of the loop.
Because, even if the script does not find "D3DView.RenderToFile" in the log file,
the output connector frameDone retains its value: 1
As a result, we move on to the next frame. |
Post by clintonman // Oct 12, 2008, 9:17am
clintonman
Total Posts: 304
|
I think you need to reset the frameDone to 0 once you get out of the loop.
Because, even if the script does not find "D3DView.RenderToFile" in the log file,
the output connector frameDone retains its value: 1
As a result, we move on to the next frame.
Thanks, that was part of the problem. I also changed this
//if(curLine.search("D3DView.RenderToFile"))
if(curLine.search("Save player screenshot") != -1)
I was using the return value for search incorrectly.
After more tests I found out that the D3DView.RenderToFile command doesn't return to the script loop until after the render is complete so no checks or delays are needed. The general idea still might work for vray renders though. |
Post by frootee // Oct 12, 2008, 10:18am
frootee
Total Posts: 2667
|
Thanks clintonman.
So, since the rendertofile function does not return until rendering is complete,
it sounds like we don't need to check the rosetta log. Is this correct?
I was not sure whether the HRESULT was returned once the render completed, or it was returned immediately after the render job started (i.e. while the render was still in process):
HRESULT D3DView.RenderToFile(Val, Val)
Froo |
Post by clintonman // Oct 12, 2008, 11:01am
clintonman
Total Posts: 304
|
Thanks clintonman.
So, since the rendertofile function does not return until rendering is complete,
it sounds like we don't need to check the rosetta log. Is this correct?
I was not sure whether the HRESULT was returned once the render completed, or it was returned immediately after the render job started (i.e. while the render was still in process):
HRESULT D3DView.RenderToFile(Val, Val)
Froo
That's correct. I just finished testing the final version of the script. It works with modelside transform animations, vertex animations, particle and facial animation. It doesn't work with metaball animation. And of course it works with just plane old workspace animations. Final script is attached and it has a notes tab. |
Post by clintonman // Oct 12, 2008, 11:31am
clintonman
Total Posts: 304
|
Got a test copy of vray and this script shows the technique works.:D
This uses the log file check, but like D3D the check is not needed. |
|