Pancho Posted January 13, 2017 Share Posted January 13, 2017 What I need to do is render the same frame over and over again, BUT with another sim file. What I did so far: Use the Wedge node in the OUT context to export one frame of a simulation. This simulation has been executed each time with a different seed, so that the particles were influenced by the same forces, but with a slightly different end position. What I need to do now is reload each sim file on the same frame, render it and save it to disk. So far I can't get H to evaluate the File node in a proper way. I want to alter the name of the file with the help of the $WEDGENUM variable, but it doesn't evaluate it correctly. Any ideas what's going wrong? Cheers Tom P.S.: Screenshots 1+2 show the File load node, Screenshot 3 the Wedge node. The channel is set to the file name path. Quote Link to comment Share on other sites More sharing options...
Gavin Posted January 13, 2017 Share Posted January 13, 2017 It sounds like you want to be using the File Merge node instead of the File node. The expression stays similar to what you have, but you must define the merge variable that contains your wedge number. Example screenshot below. Quote Link to comment Share on other sites More sharing options...
Pancho Posted January 14, 2017 Author Share Posted January 14, 2017 THanks for the tip. But the problem remains. The file path doesn't evaluate correctly. The SL'ICE variable should in this case be an integer between 1 and 4. Why don't the evaluation brackets work in this case. I guess that's for the same reason why it didn't work before. Quote Link to comment Share on other sites More sharing options...
Pancho Posted January 14, 2017 Author Share Posted January 14, 2017 (edited) Somehow the ` ` doesn't evaluate correctly. Is this the wrong syntax? Edited January 14, 2017 by Pancho Quote Link to comment Share on other sites More sharing options...
acey195 Posted January 16, 2017 Share Posted January 16, 2017 I think you maybe shouldn't put the $SLICE inside the ``, as it is a local var and will evaluate to a string already I think. It does when you start your file path with $HIP for instance Quote Link to comment Share on other sites More sharing options...
Pancho Posted January 16, 2017 Author Share Posted January 16, 2017 (edited) Mmmh. But then the math wouldn't evaluate at all? I though tried to work with your idea that this might be a string and therefore the calculation doesn't work. So I tried something I found in another thread, but it doesn't work either. Very annoying..... Strange that the first ` ` evaluates to nothing, while the second just prints what's inside the ` `. Edited January 16, 2017 by Pancho Quote Link to comment Share on other sites More sharing options...
Gavin Posted January 17, 2017 Share Posted January 17, 2017 (edited) A drawback of the $SLICE variable is that it wont show you the evaluated string in the file path at the top level. If you dive inside the asset you'll see that there is a foreach loop with another file node inside. It's this file node that's loading your files and if you take a look there you can see the python code that runs your script. The string isn't expanded until this python code is run. The variable will work just fine within backticks so that's not an issue. Your original expression should be evaluating to something. Is there maybe some frame padding on your file numbers that the expression isn't accounting for? Edited January 17, 2017 by Gavin Quote Link to comment Share on other sites More sharing options...
Gavin Posted January 17, 2017 Share Posted January 17, 2017 Try taking variables out of this entirely and see if you can get it to output something for you. If that doesn't evaluate then there's a different problem at play here. Quote Link to comment Share on other sites More sharing options...
Shalinar Posted January 17, 2017 Share Posted January 17, 2017 (edited) I believe in the File Merge node, you should change your Merge Variable to be WEDGENUM to keep the naming consistent, then you can merge based on your WEDGENUM in your filepath. The File Merge is going to try to replace every instance of your Merge Variable with the values in the Merge Range (start to end by increment). So your starting value should be your lowest seed value and the end value should be your highest seed value (not 1 and 1 as yours are now ). Then just make sure to set Missing Files to No Geometry so it doesnt error out for inevitable missing files in the range from start value to end value. I just tested this with a simple scene: had a cube, sphere, and pyramid written out with a switch controlled by $CLUSTER variable (0=cube, 1=sphere, 2=pyramid). Then I used the File Merge node with Merge Variable set to CLUSTER and read them in with the same variable, setting the Merge Range to (0, 2, 1), and Missing Files to No Geometry -- that way, when I deleted the file where $CLUSTER=1, files 0 and 2 still imported just fine So you can see here I just have the cube and pyramid being read in without error. You'll definitely need the same for your particles Edited January 17, 2017 by Shalinar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.