DAZ Scripting: a strange experiment!

Greetings,

This time it's a weird one wink

For the visual style i want to achieve i'm perfectly happy with the iRay Preview only. I basically never render, just save the iRay Preview drawings and then do some little postwork in Photoshop.

Now i'd love to try some animations with the same style, but as @crosswind once said to me in the forum that's not possible, either you render an animation in iRay, Filament or OpenGL.

Since i'm stubborn (and i do programming work for a living) i've been thinking to create a script that does this:

  1. select the first frame of an animation (currently in the timeline, of course)
  2. load iRay Preview for, lets say, 10 seconds
  3. save the current viewport drawing
  4. select the next animation frame
  5. keep going until the last frame

Now, for the question: since i don't have a lot of free time i'd like to know in advance if that's feasible with the DAZ scripting system/language, before i start studying it. Or, if is not, if there is a better way to achieve this goal (that doesn't include doing each step manually wink)

a big Thank You in advance

Comments

  • PraxisPraxis Posts: 242
    edited September 7

    Short answer: Yes! (I use this often)

    ---Basic method: Output an Image Sequence, then use e.g. VirtualDub to stitch into a movie----------------

    var OutPutPath = '/MyFiles/';

    var FileNamePrefix = 'MyMovie_';

    var MSecsPerFrame = 3000;     // Depending on Scene, Renderer (Iray/OpenGL/Filament/etc.), and GPU speed

    var Viewport = MainWindow.getViewportMgr().getActiveViewport().get3DViewport();

    // For each Frame # Fnum:

              Scene.setFrame( Fnum );

              sleep( MSecsPerFrame );

              // Save Image:
              var NumStr      = Fnum.toString();      // You may want to '0'-pad this
              var FileSpec    = OutputPath + FileNamePrefix + NumStr + '.png';

              // Note: With Iray this outputs the Viewport contents,
              //  which may be different from the Viewport Camera dimensions, etc.
              //  Using File > Save last draw... can give different output.
              Viewport.captureImage().save( FileSpec );

    ---End--------------------------------------------------

    There are some other threads about this:

    https://hpclscruffy.daz3d.com/forums/discussion/452226/file-save-last-draw-bitmap-can-a-script-access-that

    https://www.daz3d.com/forums/discussion/512116/a-simple-script-to-utilize-the-viewport-preview-to-dramatically-redcue-animation-render-times

     

    Post edited by Praxis on
  • crosswindcrosswind Posts: 6,169
    edited September 5

    RevokedRevenant said:

    Greetings,

    This time it's a weird one wink

    For the visual style i want to achieve i'm perfectly happy with the iRay Preview only. I basically never render, just save the iRay Preview drawings and then do some little postwork in Photoshop.

    Now i'd love to try some animations with the same style, but as @crosswind once said to me in the forum that's not possible, either you render an animation in iRay, Filament or OpenGL.

    Since i'm stubborn (and i do programming work for a living) i've been thinking to create a script that does this:

    1. select the first frame of an animation (currently in the timeline, of course)
    2. load iRay Preview for, lets say, 10 seconds
    3. save the current viewport drawing
    4. select the next animation frame
    5. keep going until the last frame

    Now, for the question: since i don't have a lot of free time i'd like to know in advance if that's feasible with the DAZ scripting system/language, before i start studying it. Or, if is not, if there is a better way to achieve this goal (that doesn't include doing each step manually wink)

    a big Thank You in advance

    Ha ~~ I even don't remember if I ever told that to you... So what was the context to which I ever reverted to your thread / question ?  ...and with which way that I said it's not possible... with Daz Script ?

    Post edited by crosswind on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,035

    I am pretty sure there are settings that mimic the viewport render, IE interacctive instead of photoreal, 

  • charlescharles Posts: 810
    edited September 6

    Umm ok just avoid some shaders that will not appear in viewport iray. also..(if it matters) your sub-d for viewport has it's own setting, per object. Otherwise I see it as a cool way to animate. The keframing in the normal animation is jacked, always has, and it seems no matter how much I bitch about it, it will never get fixed.

     

     

    Post edited by charles on
  • Thank You for your comments! Especially @Praxis!

    to @crosswind: it was in https://www.daz3d.com/forums/discussion/655126/render-animations-in-iray-preview, but surely i misunderstood your answer, i'm sorry! XD

    that time i wasn't thinking about DAZ scripting at all wink

  • crosswindcrosswind Posts: 6,169

    RevokedRevenant said:

    Thank You for your comments! Especially @Praxis!

    to @crosswind: it was in https://www.daz3d.com/forums/discussion/655126/render-animations-in-iray-preview, but surely i misunderstood your answer, i'm sorry! XD

    that time i wasn't thinking about DAZ scripting at all wink

    No problem ~ actually I feel that I didn't really got your requirement at that time. Sorry ! that was my bad ~~ haha ! laugh

  • @crosswind: i can edit my post, specifying that you intended that wasn't possible without scripting, or i can remove the reference entirely if you prefer yes it was in good faith angel

  • crosswindcrosswind Posts: 6,169

    RevokedRevenant said:

    @crosswind: i can edit my post, specifying that you intended that wasn't possible without scripting, or i can remove the reference entirely if you prefer yes it was in good faith angel

    No no ~~ not necessary at all ! That was just a sort of information exchange !  no harm at all ! wink

Sign In or Register to comment.