Author Topic: Viscosity test Realflow  (Read 5475 times)

2016-08-11, 23:45:53

claudiostacciarini

  • Active Users
  • **
  • Posts: 62
    • View Profile
    • LumiDigital
Hi!
Viscosity test with Realflow. Corona 1.3.

« Last Edit: 2016-08-11, 23:52:12 by claudiostacciarini »

2016-08-12, 11:50:08
Reply #1

BBB3viz

  • Active Users
  • **
  • Posts: 48
    • View Profile
This is strangely enjoyable.

2016-08-12, 11:51:57
Reply #2

JacopoGrosso

  • Active Users
  • **
  • Posts: 125
    • View Profile
    • jacopogrosso.com
I'm trying to do the same on another object, but like chocolate! I like the honey effect ;)
I have one question..when I set the max number of passes and I start rendering the animation there is no fluid moving, it's like all the first frame..but if I play the animation in the viewport the liquind moves..what can I do? Thanks

2016-08-15, 18:15:40
Reply #3

BirlandCreative

  • Active Users
  • **
  • Posts: 13
    • View Profile
Hi JacopoGrosso,
I had the same issue with that too! If you render 100 frames you just get 100 frames of frame no.1!

I used a script i downloaded i don't recall the name but here is the script....

The script renders each individual frame, works for me!

...Hope it helps you.




--function to make a single digit number into a 3 digit number by prefixing 0's. Returns a string.
fn tridigit digits =
(
   if digits.count >= 3 then
      (
         print "Digit already greater than 3 numbers"
         return digits
      )
   else
      (
         if digits.count == 2 do return ("0" + digits)
         if digits.count == 1 do return ("00" + digits)
      )
)

-- close the RSD
renderSceneDialog.close()
-- set it to single frame
rendTimeType = 1
-- set the save output to true
rendSaveFile = true
-- temorarily store the main render output directory
actual_render = rendOutputFilename
--sets the variable that contains the render elements. re=Render Elements
re = maxOps.GetCurRenderElementMgr()
--calculates the number of elements
num = re.numrenderelements()
-- an array to store the element's current paths
cur_ele_path = #()
-- loop through the elements
for c in 0 to (num - 1) do
(
   append cur_ele_path (re.getRenderElementFilename c)
)
-- perform a loop between all the frames you want rendered
for a in ((rendStart as integer)/ticksperframe) to ((rendEnd as integer)/ticksperframe) do
(
   --go to the next frame to render
   sliderTime = (a as time)
   -- add's the frame number to the output filename.
   rendOutputFilename = ((getFileNamePath actual_render) + (getFilenameFile actual_render) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType actual_render))
   --loops through the elements
   for b in 0 to (num - 1) do
   (
      -- select the element
      element = re.getrenderelement b
      -- grabs the current element path
      current_element_path = cur_ele_path[(b+1)]
      -- add's 0's to it
      new_element_path =  ((getFileNamePath current_element_path) + (getFilenameFile current_element_path) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType current_element_path))
      -- assigns it to the element
      re.SetRenderElementFilename b new_element_path
   )
   -- render the output
   max quick render
)
-- reset the render outputs for the main renders...
rendOutputFilename = actual_render
-- ... and the elements
for d in 0 to (num - 1) do
(
   re.setRenderElementFilename d cur_ele_path[(d+1)]
)
   

2016-08-15, 19:24:23
Reply #4

JacopoGrosso

  • Active Users
  • **
  • Posts: 125
    • View Profile
    • jacopogrosso.com
Hi JacopoGrosso,
I had the same issue with that too! If you render 100 frames you just get 100 frames of frame no.1!

I used a script i downloaded i don't recall the name but here is the script....

The script renders each individual frame, works for me!

...Hope it helps you.




--function to make a single digit number into a 3 digit number by prefixing 0's. Returns a string.
fn tridigit digits =
(
   if digits.count >= 3 then
      (
         print "Digit already greater than 3 numbers"
         return digits
      )
   else
      (
         if digits.count == 2 do return ("0" + digits)
         if digits.count == 1 do return ("00" + digits)
      )
)

-- close the RSD
renderSceneDialog.close()
-- set it to single frame
rendTimeType = 1
-- set the save output to true
rendSaveFile = true
-- temorarily store the main render output directory
actual_render = rendOutputFilename
--sets the variable that contains the render elements. re=Render Elements
re = maxOps.GetCurRenderElementMgr()
--calculates the number of elements
num = re.numrenderelements()
-- an array to store the element's current paths
cur_ele_path = #()
-- loop through the elements
for c in 0 to (num - 1) do
(
   append cur_ele_path (re.getRenderElementFilename c)
)
-- perform a loop between all the frames you want rendered
for a in ((rendStart as integer)/ticksperframe) to ((rendEnd as integer)/ticksperframe) do
(
   --go to the next frame to render
   sliderTime = (a as time)
   -- add's the frame number to the output filename.
   rendOutputFilename = ((getFileNamePath actual_render) + (getFilenameFile actual_render) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType actual_render))
   --loops through the elements
   for b in 0 to (num - 1) do
   (
      -- select the element
      element = re.getrenderelement b
      -- grabs the current element path
      current_element_path = cur_ele_path[(b+1)]
      -- add's 0's to it
      new_element_path =  ((getFileNamePath current_element_path) + (getFilenameFile current_element_path) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType current_element_path))
      -- assigns it to the element
      re.SetRenderElementFilename b new_element_path
   )
   -- render the output
   max quick render
)
-- reset the render outputs for the main renders...
rendOutputFilename = actual_render
-- ... and the elements
for d in 0 to (num - 1) do
(
   re.setRenderElementFilename d cur_ele_path[(d+1)]
)

Thank you very much, I'll try it as soon as I'm at the computer, I'll let you know! Maybe you saved my life ahah

2016-08-15, 19:42:58
Reply #5

claudiostacciarini

  • Active Users
  • **
  • Posts: 62
    • View Profile
    • LumiDigital
I'm trying to do the same on another object, but like chocolate! I like the honey effect ;)
I have one question..when I set the max number of passes and I start rendering the animation there is no fluid moving, it's like all the first frame..but if I play the animation in the viewport the liquind moves..what can I do? Thanks

Hi JacopoGrosso,
When you import mesh in Max, sometimes the solution is start with frame 0001 and no 0000, because frame 0000 has "no mesh", and I think this cause a problem in Max to read the other frames.
I export/import alembic format and think is a good solution , but I will try the script that anbirks show below.

Hi JacopoGrosso,
I had the same issue with that too! If you render 100 frames you just get 100 frames of frame no.1!

I used a script i downloaded i don't recall the name but here is the script....

The script renders each individual frame, works for me!

...Hope it helps you.




--function to make a single digit number into a 3 digit number by prefixing 0's. Returns a string.
fn tridigit digits =
(
   if digits.count >= 3 then
      (
         print "Digit already greater than 3 numbers"
         return digits
      )
   else
      (
         if digits.count == 2 do return ("0" + digits)
         if digits.count == 1 do return ("00" + digits)
      )
)

-- close the RSD
renderSceneDialog.close()
-- set it to single frame
rendTimeType = 1
-- set the save output to true
rendSaveFile = true
-- temorarily store the main render output directory
actual_render = rendOutputFilename
--sets the variable that contains the render elements. re=Render Elements
re = maxOps.GetCurRenderElementMgr()
--calculates the number of elements
num = re.numrenderelements()
-- an array to store the element's current paths
cur_ele_path = #()
-- loop through the elements
for c in 0 to (num - 1) do
(
   append cur_ele_path (re.getRenderElementFilename c)
)
-- perform a loop between all the frames you want rendered
for a in ((rendStart as integer)/ticksperframe) to ((rendEnd as integer)/ticksperframe) do
(
   --go to the next frame to render
   sliderTime = (a as time)
   -- add's the frame number to the output filename.
   rendOutputFilename = ((getFileNamePath actual_render) + (getFilenameFile actual_render) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType actual_render))
   --loops through the elements
   for b in 0 to (num - 1) do
   (
      -- select the element
      element = re.getrenderelement b
      -- grabs the current element path
      current_element_path = cur_ele_path[(b+1)]
      -- add's 0's to it
      new_element_path =  ((getFileNamePath current_element_path) + (getFilenameFile current_element_path) + "_" + (tridigit ((a as integer) as string)) + (getFilenameType current_element_path))
      -- assigns it to the element
      re.SetRenderElementFilename b new_element_path
   )
   -- render the output
   max quick render
)
-- reset the render outputs for the main renders...
rendOutputFilename = actual_render
-- ... and the elements
for d in 0 to (num - 1) do
(
   re.setRenderElementFilename d cur_ele_path[(d+1)]
)

Thank you very much, I'll try it as soon as I'm at the computer, I'll let you know! Maybe you saved my life ahah

Hi antbirks, thanks for script, I will try here! :)

2016-08-16, 13:50:58
Reply #6

JacopoGrosso

  • Active Users
  • **
  • Posts: 125
    • View Profile
    • jacopogrosso.com
Hi JacopoGrosso,
I had the same issue with that too! If you render 100 frames you just get 100 frames of frame no.1!

I used a script i downloaded i don't recall the name but here is the script....

The script renders each individual frame, works for me!

...Hope it helps you.
........

I created a txt document (notepad), saved, changed extension from .txt to .ms
After in 3Ds..I imported all (animation and meshes .bin) and saw the same problem..tried to run the script but every frame I had to press OK on the tab that was appearing, saying "error creating file output", so I pressed 100 times OK ahahah

What I'm doing wrong? :(

EDIT: Ok now it works, I set the animation and the save folder and it starts rendering every frame, thank you very much :)

MY PASS:
1) set frames, folder where 3ds saves
2) run script
3) done
« Last Edit: 2016-08-16, 14:08:45 by JacopoGrosso »

2016-08-17, 13:35:04
Reply #7

BirlandCreative

  • Active Users
  • **
  • Posts: 13
    • View Profile
You're welcome!

I'm glad i could be of some help. It took me a while to realize the issue and find the script that works.