mcjObjBasedAnim V3 - Render Blender Fluids in Daz Studio or any .obj sequence

mCasualmCasual Posts: 4,607
edited August 2020 in Freebies

https://sites.google.com/site/mcasualsdazscripts9/mcjobjbasedanim

Video demo >>>> https://www.youtube.com/watch?v=cuKjlrbx7sM&feature=youtu.be

This script will let you render sequences of .obj files in Daz Studio

for example a series of obj files containing a Blender Fluid Simulation

AUGUST 14TH 2020 - 12:55PM - VERSION 3

The script now leaves the render in the Render-To-New-Window mode,

else for unknown reasons, the renderer insisted to render to the 3Dviewport

here's the lines of code i added upon exiting the script

you could run this as a standalone script to repair a renderer that insists on rendering to the 3D viewport instead of a New Window

var renderMgr = App.getRenderMgr();
var settings = renderMgr.getRenderOptions();
settings.isCurrentFrameRender = true;
settings.renderImgToId = settings.NewWindow ;

teaout0044.jpg
540 x 960 - 140K
blenderfluidsimrendererfordaz.jpg
450 x 800 - 68K
inflow.jpg
1080 x 1920 - 355K
Post edited by mCasual on

Comments

  • unbelievable! I have known your work for many years and your work is excellent, thank you for everything you do ;)

  • atoxicatoxic Posts: 141

    Thanks

    very appreciated. I am looking forward to add some liquid to the next scenes.

  • DigiDotzDigiDotz Posts: 515
    edited August 2020

    Oh cool! I've also tried mcjObjsToMorphingProp to bring a blender ocean animation into Daz a while back too. Works very well ;-)

    *testing now....Seems to be working great yes  -screams-

    + i can preview the results inDJV sequence player while still rendering in Daz -double scream-

    Post edited by DigiDotz on
  • Nice, Thank you

     

  • mCasualmCasual Posts: 4,607
    edited August 2020

    another big test 180 frames

    the objs were about 4.5G ... so ... 

    https://www.youtube.com/watch?v=kkLrmKO_vz8

    outwatah0111.png.jpg
    1080 x 1920 - 460K
    Post edited by Chohole on
  • DigiDotzDigiDotz Posts: 515

    yes gonna try a little shoreline slice next

     

  • mCasualmCasual Posts: 4,607

    make sure to get version 3 which i posted right now, 

    just running and exiting the script, made the renderer refuse to render to a new window and instead rendered to the 3D Viewport

    maybe that's my many versions of Daz Studio fighting 

     

    DigiDotz said:

    yes gonna try a little shoreline slice next

     

     

  • mCasualmCasual Posts: 4,607

    Get Version 3 and avoid the nasty side-effect 

    August 11th 2020 - 9:56AM - Version 1 - Release

    August 11th 2020 - 10:35AM - Version 2 - Now saves/restores the user's looping choice

    AUGUST 14TH 2020 - 12:55PM - VERSION 3 -The script now leaves the render in the Render to new window mode, else for unknown reasons, the render insisted to render to the 3Dviewport

    here's the lines of code i added upon exiting the script

    you could run this as a standalone script to repair a renderer that insists on rendering to the 3D viewport instead of a New Window

    var renderMgr = App.getRenderMgr();

    var settings = renderMgr.getRenderOptions();

    settings.isCurrentFrameRender = true;

    settings.renderImgToId = settings.NewWindow ;

    ---------------------------

    sorry about that !

  • mCasualmCasual Posts: 4,607

    Welcome !

    make sure to get version 3

    AUGUST 14TH 2020 - 12:55PM - VERSION 3 -The script now leaves the render in the Render to new window mode, else for unknown reasons, the render insisted to render to the 3Dviewport

     

    Nice, Thank you

     

     

  • mCasualmCasual Posts: 4,607

    welcome !

    Make sure to get version 3, it prevents an annoying side effect

    AUGUST 14TH 2020 - 12:55PM - VERSION 3 -The script now leaves the render in the Render to new window mode, else for unknown reasons, the render insisted to render to the 3Dviewport

     

    atoxic said:

    Thanks

    very appreciated. I am looking forward to add some liquid to the next scenes.

     

  • mCasualmCasual Posts: 4,607

    Welcome ! Thank you

    make sure to get version 3

    AUGUST 14TH 2020 - 12:55PM - VERSION 3 -The script now leaves the render in the Render to new window mode, else for unknown reasons, the render insisted to render to the 3Dviewport

     

    unbelievable! I have known your work for many years and your work is excellent, thank you for everything you do ;)

     

  • DigiDotzDigiDotz Posts: 515
    edited August 2020

    Getting a few crashes now crying  "error at 335 occured while importing file"  Latest render attempt in just openGL

     600 obj files. Largest is 24-26 MB

    In this case, it got around frame 341 befor failing. see error log

    I could just split the render in to batches of 50 I suppose.

    txt
    txt
    error log.txt
    5K
    Post edited by DigiDotz on
  • GreymomGreymom Posts: 1,112

    Amazing!  Many thanks!

     

  • mCasualmCasual Posts: 4,607
    edited August 2020

    maybe you're on a MAC?

    line 9 of the thing.pp2 prop

    looks like this on a PC

    objFileGeom 0 0 "D:\fountain\watah_000180.obj"

    in your error log the prop loader part of Daz Studio seems to complain about your 

    D:/New folder (2)/shorelineexport/ramp4_000341.obj

    maybe try with a folder with a name that doesnt have spaces parenthesis and brackets

    i will test the script on my antique macbook ( which i bought just to make the mac versions of my plugins )

    Note that in one of my tests i kept an eye on the Memory usage by Daz Studio ( in Task Manager )

    and it seems to release the memory after each render, so it's probably not a case of running out of memory

    maybe open thing.pp2 in a text editor and check what line 9 looks like

    ------

    other error messages suggested that for some reason the rendered images could not be rendered in your C:\tmp\ folder ... if it exists

    ----

    now i also see a message that reads "WARNING: QImage: out of memory, returning null image"

    so maybe you should avoid texturing the .obj thing using images

    unless the out-of-memory problem occurs in the OpenGL renderer

     

     

    DigiDotz said:

    Getting a few crashes now crying  "error at 335 occured while importing file"  Latest render attempt in just openGL

     600 obj files. Largest is 24-26 MB

    In this case, it got around frame 341 befor failing. see error log

    I could just split the render in to batches of 50 I suppose.

     

    Post edited by mCasual on
  • DigiDotzDigiDotz Posts: 515
    edited August 2020

    On a PC.  Ok will try later yes

     

    Post edited by DigiDotz on
  • DigiDotzDigiDotz Posts: 515

    It was just opengl render.  Restarted the pc, changed the folder path/name. Iray rendering this time and all seems fine so far yes

    Oh wait..about the previous OpenGL rendering ... "remember to move this window aside before OpenGL renders" -I didn't,  so maybe that was it + Seems a windows update was happening in the background at that time

  • mCasualmCasual Posts: 4,607
    edited August 2020

    in one of my tests the PC rebooted, i dont know if it's the fault of Win10's bully-reboots or if my video card/cpu overheated

    so for my recent render i had a 14" fan blow on the open PC case.

    in openGL render mode, having a window in front of the 3DViewport doesnt prevent saving the renders buf the rendered image misses the section under the obstruction

    maybe openGL renders waste more Image memory than iRay renders and can cause a run-out-of-QImage memory

    then Studio's attempt to save a non-image causes it to crash

    https://www.youtube.com/watch?v=1QtSl6V3Lgw

     

     

     

     

    DigiDotz said:

    It was just opengl render.  Restarted the pc, changed the folder path/name. Iray rendering this time and all seems fine so far yes

    Oh wait..about the previous OpenGL rendering ... "remember to move this window aside before OpenGL renders" -I didn't,  so maybe that was it + Seems a windows update was happening in the background at that time

     

    Post edited by mCasual on
  • spaspa Posts: 43

    mCasual said:

    https://sites.google.com/site/mcasualsdazscripts9/mcjobjbasedanim

    Your scripts are really a great help, thanks a lot! 

     

    I've played around with this.
    I've 120 blender generated obj's in the directory (zero padding zero, so obj1 .. obj120), but the script shows 99 as "Last obj on disk".

    Any idea why that happens?

  • spaspa Posts: 43

    spa said:

    mCasual said:

    https://sites.google.com/site/mcasualsdazscripts9/mcjobjbasedanim

    Your scripts are really a great help, thanks a lot! 

     

    I've played around with this.
    I've 120 blender generated obj's in the directory (zero padding zero, so obj1 .. obj120), but the script shows 99 as "Last obj on disk".

    Any idea why that happens?

    When i rename them to 001-120 it works 

  • mCasualmCasual Posts: 4,607
    edited March 2023

    someday i may fix that ! :)

    I guess all my tests were using zero-padded objs

    that one was from the poser cloth sim room or blender

     

    spa said:

    spa said:

    mCasual said:

    https://sites.google.com/site/mcasualsdazscripts9/mcjobjbasedanim

    Your scripts are really a great help, thanks a lot! 

     

    I've played around with this.
    I've 120 blender generated obj's in the directory (zero padding zero, so obj1 .. obj120), but the script shows 99 as "Last obj on disk".

    Any idea why that happens?

    When i rename them to 001-120 it works 

    wakabowt_by_mcasual_d98ajf5.gif
    400 x 300 - 1M
    Post edited by mCasual on
Sign In or Register to comment.