Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I move a former cached liquid simulation in the timeline?

26 REPLIES 26
SOLVED
Reply
Message 1 of 27
Anonymous
2987 Views, 26 Replies

How can I move a former cached liquid simulation in the timeline?

Hello to everyone, this is the first time I ever asked something "new" on a forum, cause I normally  find solutions on others problems.

 

I'll introduce my question: I've been "playing around" with Bifrost liquids for the first time, so I set the liquid simulation setting before animating the scene. I run a cached simulation of some... 360 frames, and my PC ain't a working station, so I took me some 7hs to run it all. I don't wanna repeat that process all over, because no object included in the scene moves in the animation, just the camera that has no incidence in the Bifrost simulation.

 

The problem is that I need to move that whole simulation from starting on frame 01 to frame 280.

What have I tried so far and hasn't work:

- Changing the "Start Frame" value from the former 1 to 280.

- Renaming each file of the cached files. They are named in sequence, so changed the "0001" to start with "0280" and so on, and....reload it, but still the simulation is fixed and starting on frame 01.

 

Any ideas?

26 REPLIES 26
Message 2 of 27
syracoj
in reply to: Anonymous

I've tried a few things and unfortunately I don't think you will be able to do this.

Message 3 of 27
mspeer
in reply to: syracoj

Hi!

 

@Anonymous  and @syracoj 

The solution is pretty easy.

The bifrost nodes have a connection to the global time node.

Just check this in Node Editor

By adding nodes in-between or using an expression you can add a negative value (offset) to the time values fed into these nodes, then the animation starts later.

Message 4 of 27
Anonymous
in reply to: mspeer

@mspeer 

 Would share some simple snapshots of what you describe?

 

I'm a serious noob in this area, so for sure I'm gonna have do dig more into Node Editor capacities, but for the time being I'd really appreciate you shared some "go here" snaps (considering you mentioned is pretty easy task), so I can actually know where to scavenge in order to add this expression, and offset the time values of this simulation.

 

I'm relief is actually possible : ) cause as I said, I really didn't wanna re-simulate the whole deal when "nothing changed", I really thank you (you too @syracoj for taking the time too).

Message 5 of 27
mspeer
in reply to: Anonymous

Hi!

 

Here is one possible solution by using a addDoubleLinear (or floatMath) node between time and bifrostLiquidContainer.

bifrost_time.gif

 

Message 6 of 27
Anonymous
in reply to: mspeer

Ok! I'll try it as soon as I can, and let you know if I succeeded : )

Thanks a lot!

Message 7 of 27
Anonymous
in reply to: mspeer

@mspeer  my lvl 11 Mentor! It works. ****, I thank you so much.

 

I just had a hard time finding "time1" just....anywhere, until I found on Google that it appears from the shadows actually after disabling a feature on the Outliner options. But after so I did as you showed, and....kablam! The input 2 of that AddDoubleLinear modifier (or expression or however is properly called, pardon my ignorance my dear Mentor) works as an offset to the "CurrentTime" of the liquid simulation.

Again...I thank you cause I never ever asked a technical thing in a forum, so my hopes weren't high, and you monsieur were kind enough to show me the way to Valhalla.

 

Hope it helps many other noobs like me!

Message 8 of 27
mspeer
in reply to: Anonymous

Hi!

 

Just selecting bifrostLiquid in Outliner and then in Node Editor

"Input and Output connections" icon in menu

should also display the connected nodes incl. the time node inside the Node Editor.

Message 9 of 27
syracoj
in reply to: mspeer

I tried that but with the floatMath node and it didn't work. When I hover over the time out_time port it doesn't give a data type (it just says 'Type:time') so I figured if the floatMath didn't work then offsetting using math wouldn't work. But I am glad to know the addDoubleLinear approach works! thanks!

 

 

Message 10 of 27
mspeer
in reply to: syracoj

Hi!

 

@syracoj 

Here the floatMath node works too ( Maya 2019.2 )

Because of the different Types a timeToUnitConversion node is needed, but this will be inserted by Maya automatically when connecting the ports.

Message 11 of 27
syracoj
in reply to: mspeer

hmmm....

not sure what I did wrong then because when I tried it did not work. Will revisit.

Message 12 of 27
syracoj
in reply to: mspeer

I know what I did.

 

My arithmetic was wrong. I was adding time (which would have worked if I would have checked negative frames) when I should have been subtracting time. 

Message 13 of 27
mspeer
in reply to: syracoj

Hi!

I made this mistake too.

As i wanted to test an offset of +10 i entered 10 at first, but based on how it works in this setup i needed to correct this to -10.

Message 14 of 27
Anonymous
in reply to: mspeer

Hey, it’s me again. I had all set to render but some unexpected error has turned up. And I said unexpected because I rendered these frames before and had no issue, but...at this moment I am having them. I also come back to this entry, because it’s in some way related to that tweak that you @mspeer  shared with us at the solution.

 

The error is the following:

 

// Error: [BIFROST] Could not find objects in path 'E:/CacheMayabifrostLiquidContainer1/' //

// Error: [proc] liquidShape1: error in user init from  //

 

The basic thing happening is that… in the frames from 0 - 280 (being 280 the number of frames I offseted the liquid animation) I’m having this rendering error. In these frames the simulation is not visible (because of the offset) but still is what causes the problem, and as I said, in these days I executed some preview renders in this lapse of frames 

 

What I’ve tried:

 

I disabled/enabled the simulation from the channel box menu and nothing changed, still error.

I disabled/enabled the Liquid Cache, and again...same error. 

I deleted the “addDoubleLinear” node, nothing happened.

 

I changed the Input2 value of the addDoubleLinear expression to 0, and… it loads the cache properly, rendering just fine.

I turn visibility off on the layer that holds the BifrostLiquid1 and… the scene rendered just fine, but of course the liquid simulation won’t be seen. 

 

Funny thing: 

 

Using Arnold RenderView (not the regular Render View), for the first time I hit played I’d display an error and not render. After so, I hit back on the stop icon, and re-try to render it actually does it, and starts by some “impossible” render setting of (-1/3/2/2/2/2) to then start with a (3/3/2/2/2/2) when my actual setting is at (6/3/2/2/2/2)

 

I trust you @mspeer  my mentor, but you’re all welcome to help me out in this one : )

Thanks in advance for your time

Message 15 of 27
mspeer
in reply to: Anonymous

Hi!

You need to set the value for time to 1 for all frames before your fluid animation should start.

 

You can use this with either an if / else expression  (if frame < 280) ... else ...

or you can add a clamp node after the addDoubleLinear and use as min value "1" and as max value "9000",

which looks like the best option here.

As the first frame of the fluid could be visible you maybe need to hide it until it should be seen.

 

( You could also key the time values, but i would not recommend this here. )

Message 16 of 27
Anonymous
in reply to: mspeer

Good sir: what, where. and when. You're dealing with a serious noob, so I have this nice brand new Clamp node, but after playing around some minutes I have no clue exactly where I have to place the good fella.

Mind dropping me some hints?

I can't thank you enough @mspeer  you should know that by now.

Anotación 2019-11-28 131743.jpg

Message 17 of 27
Anonymous
in reply to: Anonymous

Woops! It's done. I now see how this Clamp node works. Just took some more timing wandering around the thing.

I get how it works, but I don't quite get the theory behind it, or "why this tools has fixed my animation". Could you explain me a bit more considering my low lvl of knowledge?

Thanks!

Message 18 of 27
mspeer
in reply to: Anonymous

Hi!

 

Don't be confused by the node supporting 3 channels, you only need to use 1 channel.

Also as i said you need to add / insert it after the addDoubleLinear node.

(The Output of the Clamp needs to be connected into the Input of the unit-conversion node then)

What it does, it allows only values between a certain range, Min and Max.

Regardless how small a value becomes, it can't be less than Min,

that's what we need here, as you don't want values smaller than "1", which is the init/first frame for Bifrost.

Max just needs to be high enough not to stop and hold your cache playback at a certain frame.

 

bifrost_time2.gif

 

Message 19 of 27
Anonymous
in reply to: mspeer

Yep, I got that and I thank you for the explanation. Now the final render is running so I'm finger-crossed for the next 10hs.

My question is now "where was the error?" Was it because Arnold can't render if reads a negative value as a "time value", so this Clump node kinda fools what is reading, but at the same time keep the offsetting performed previously?

 

P:S: Oh and by the way, I was checking on other posts of this forum about noise on low-light instances and you were there too, so I should thank you for that too (augmenting specular worked for me)

Message 20 of 27
mspeer
in reply to: Anonymous

Hi!

 

This seems to be a limitation.

If you use a frame where Bifrost couldn't calculate a valid Output it fails.

If you don't have a cache and jump ahead in the timeline by skipping some frames, then rendering will fail too.

 

So Bifrost has to start with the first frame that is or was set as start frame in the Simulation Attributes inside the bifrostLiquidContainer, as it can't calculate an Output for previous frames.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report