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 to iterate through list of files in a folder ?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
moiamy
1021 Views, 7 Replies

How to iterate through list of files in a folder ?

Hello

I need to load into Bifrost Graph 100 files named : Flat_Clouds.0001.vdb to Flat_Clouds.0100.vdb

I can't figure how to use iterate node for a file system.

Any ideas ?

Thanks

 

7 REPLIES 7
Message 2 of 8
moiamy
in reply to: moiamy

It says in documentation :

https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_build_a_graph_file_io_html

 

To include frame numbers in file names, use the token #. Use multiple characters for frame padding, for example, #### for 0001, 0002, etc. You can also use @.

 

But it doesn't really help me to build appropriate compound.

Message 3 of 8
moiamy
in reply to: moiamy

So far this one works.

 

The fact is I need 100 read_OpenVDB_volume ! What is the correct process to loop ?

 

maya forum bifrost iteration 2.jpg

Message 4 of 8
Christoph_Schaedl
in reply to: moiamy

Maybe you could read in the frames.?

 

frame.JPG

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 5 of 8
moiamy
in reply to: Christoph_Schaedl

Nice clue, but with that method it just creates one by frame (and not 100 at the same time), which means at frame 100 you will have only one bif object in your outiner.

Message 6 of 8
mjcg91
in reply to: moiamy

You could load you VDB files inside a for_each loop, and build the file path proceduraly using the build_string node.
something like the following. In this case, all the VDB volumes will be contained inside the same array.

 

multiVDB.jpg


You can change the start value by changing "current_index". The last loaded frame will be: current_index + (max_iterations - 1). So in this exemple, it will load from frame 0 to 9. You may want to make a more advanced setup if you want to load a specific frame range.

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 7 of 8
moiamy
in reply to: mjcg91

You made it ! I didn't get I needed to go inside the "For Each".

 

Actually just connected the output of current_index to frame seems ok.

 

Now I  need to understand how to translate each cloud as a volume, as they are all together.

 

But it will be another thread.

 

maya bifrost.jpg

Message 8 of 8
mjcg91
in reply to: moiamy

Ah!  I made it over complicated.

Indeed, this is much easier like this 🙂

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts

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

Post to forums